/* Nyheter 2026 - Språki News Page Styles */

/* ============================================
   Prevent horizontal overflow on mobile
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
}

/* Ensure all main containers don't overflow */
.news-hero,
.news-content,
.news-section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Keep sticky elements without overflow hidden (breaks sticky) */
.level-switcher-container,
.news-nav {
    max-width: 100%;
}

/* ============================================
   CSS Variables (matching Språki design system)
   ============================================ */
:root {
    --primary: #fbc24b;
    --primary-hover: #eea94d;
    --primary-dark: #d4a43d;
    --text-dark: #4a4540;
    --text-brown: #827153;
    --text-darker: #6D5F4A;
    --text-muted: #999;
    --bg-page: #f7f4ee;
    --bg-light: #faf8f5;
    --bg-card-start: #ffffff;
    --bg-card-end: #fdfbf7;
    --border-light: #f0ebe3;
    --success: #22c55e;
    --success-dark: #16a34a;
    --info: #3b82f6;
    --info-dark: #2563eb;
    --streak-orange: #d97706;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 30px rgba(251, 194, 75, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 25px;
    --radius-badge: 20px;
}

/* ============================================
   Level Switcher
   ============================================ */
.level-switcher-container {
    position: relative;
    z-index: 100;
    background: var(--bg-page);
    padding: 5px 0 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.level-switcher-container.scrolled {
    padding: 8px 0;
}

.level-switcher {
    display: inline-flex;
    background: #eae6dd;
    border-radius: 30px;
    padding: 5px;
    gap: 4px;
}

.level-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 25px;
    background: transparent;
    color: var(--text-brown);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.level-btn:hover {
    background: rgba(251, 194, 75, 0.3);
}

.level-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(251, 194, 75, 0.4);
}

.level-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
    transition: opacity 0.3s, max-height 0.3s;
    max-height: 30px;
    overflow: hidden;
}

.level-switcher-container.scrolled .level-hint {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
}

@media (max-width: 600px) {
    .level-switcher {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        max-width: 320px;
    }
    .level-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .level-btn i {
        display: none;
    }
}

/* ============================================
   Section Navigation
   ============================================ */
.news-nav {
    position: sticky;
    top: 50px;
    z-index: 99;
    background: rgba(247, 244, 238, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.news-nav::-webkit-scrollbar {
    height: 4px;
}

.news-nav::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.news-nav-inner {
    display: flex;
    gap: 5px;
    justify-content: flex-start;
    padding: 0 20px;
}

.news-nav-item {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-brown);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    font-weight: 500;
}

.news-nav-item:hover {
    background: rgba(251, 194, 75, 0.2);
    color: var(--text-dark);
}

.news-nav-item.active {
    background: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .news-nav {
        display: none;
    }
}

/* ============================================
   News Content Container
   ============================================ */
.news-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* ============================================
   Section Styling
   ============================================ */
.news-section {
    margin-bottom: 60px;
    scroll-margin-top: 180px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.section-text {
    color: var(--text-brown);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.section-text a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.section-text a:hover {
    color: var(--primary);
}

/* ============================================
   Badges
   ============================================ */
.feature-badge {
    padding: 5px 14px;
    border-radius: var(--radius-badge);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-badge.new {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
}

.feature-badge.updated {
    background: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
}

.feature-badge.popular {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

/* ============================================
   Stats Cards (3-column grid)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px 15px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #fff8e8 0%, #fff3cd 100%);
    border-color: #fcd34d;
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-card.highlight .stat-value {
    color: var(--streak-orange);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-brown);
    margin-top: 4px;
}

@media (max-width: 600px) {
    .stats-grid {
        gap: 10px;
    }
    .stat-card {
        padding: 15px 10px;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .stat-label {
        font-size: 0.75rem;
    }
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-display {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-light);
    margin: 20px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-label {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-value {
    color: var(--text-brown);
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    background: var(--border-light);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-percentage {
    text-align: right;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 5px;
}

/* ============================================
   Weekly Activity Circles
   ============================================ */
.week-activity {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-light);
    margin: 20px 0;
}

.week-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    text-align: center;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.day-name {
    font-size: 0.7rem;
    color: var(--text-brown);
    text-transform: uppercase;
    font-weight: 600;
}

.day-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
}

.day-circle.active {
    background: var(--primary);
    color: white;
}

.day-circle.today {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(251, 194, 75, 0.2);
}

.day-circle.active.today {
    background: var(--primary-hover);
}

@media (max-width: 500px) {
    .day-circle {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    .week-grid {
        gap: 4px;
    }
    .day-name {
        font-size: 0.6rem;
    }
}

@media (max-width: 350px) {
    .day-circle {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
    .week-grid {
        gap: 2px;
    }
}

/* ============================================
   Word List Card Tiles
   ============================================ */
.wordlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.wordlist-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.wordlist-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 194, 75, 0.15);
}

.wordlist-icon {
    width: 45px;
    height: 45px;
    background: var(--bg-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.wordlist-info {
    flex: 1;
    min-width: 0;
}

.wordlist-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wordlist-count {
    font-size: 0.8rem;
    color: var(--text-brown);
}

.wordlist-progress {
    width: 70px;
    text-align: right;
    flex-shrink: 0;
}

.wordlist-progress-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin-bottom: 4px;
}

.wordlist-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.wordlist-progress-text {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.wordlist-arrow {
    color: #ccc;
    font-size: 0.9rem;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .wordlist-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Dictionary Entry Preview
   ============================================ */
.dict-preview {
    background: white;
    border-radius: var(--radius-md);
    padding: 25px;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    margin: 20px 0;
}

.dict-word {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.dict-norwegian {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.dict-audio {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dict-audio:hover {
    background: var(--primary);
    color: white;
}

.dict-class {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.dict-translation {
    font-size: 1.1rem;
    color: var(--text-brown);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.dict-example {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.dict-example i {
    color: var(--primary);
    margin-right: 8px;
    font-size: 0.8rem;
}

.dict-example-translation {
    font-size: 0.9rem;
    color: var(--text-brown);
    font-style: italic;
    padding-left: 22px;
}

/* ============================================
   Conversation Partner Card
   ============================================ */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 20px;
    margin: 20px 0;
}

.partner-card {
    background: linear-gradient(135deg, var(--bg-card-start) 0%, var(--bg-card-end) 100%);
    border-radius: var(--radius-lg);
    padding: 25px;
    border: 1px solid rgba(251, 194, 75, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.partner-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.partner-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--success);
}

.partner-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.partner-desc {
    font-size: 0.9rem;
    color: var(--text-brown);
    margin: 0 0 15px 0;
}

.partner-features {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.partner-feature {
    font-size: 0.8rem;
    color: var(--text-brown);
    background: var(--bg-light);
    padding: 5px 12px;
    border-radius: 15px;
}

.partner-feature i {
    color: var(--primary);
    margin-right: 5px;
}

.partner-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.partner-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   Before/After Comparison
   ============================================ */
.comparison-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin: 20px 0;
}

.comparison-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.comparison-old {
    color: var(--text-muted);
    font-weight: 600;
}

.comparison-arrow {
    color: var(--primary);
}

.comparison-new {
    color: var(--success);
    font-weight: 600;
}

.comparison-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.comparison-side {
    padding: 20px;
}

.comparison-side.old {
    background: #fdfcfa;
    border-right: 1px solid var(--border-light);
}

.comparison-side ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comparison-side.old li {
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.95rem;
}

.comparison-side.new li {
    padding: 8px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.comparison-side.new li i {
    color: var(--success);
    margin-right: 8px;
}

@media (max-width: 500px) {
    .comparison-content {
        grid-template-columns: 1fr;
    }
    .comparison-side.old {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
}

/* ============================================
   Feature List (bullet points)
   ============================================ */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.feature-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-brown);
    font-size: 1rem;
    line-height: 1.5;
}

.feature-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* ============================================
   Info Box / Tip Box
   ============================================ */
.info-box {
    background: linear-gradient(135deg, #fff8e8 0%, #fff3cd 100%);
    border-radius: var(--radius-md);
    padding: 20px 25px;
    margin: 25px 0;
    border-left: 4px solid var(--primary);
}

.info-box-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box-title i {
    color: var(--primary);
}

.info-box p {
    color: var(--text-brown);
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   Mode Toggle (Text vs Live)
   ============================================ */
.mode-toggle {
    display: inline-flex;
    background: var(--border-light);
    border-radius: 30px;
    padding: 4px;
    margin: 15px 0;
}

.mode-option {
    padding: 10px 20px;
    border-radius: 26px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-brown);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-option.active {
    background: white;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.mode-option i {
    color: var(--primary);
}

/* ============================================
   CTA Button
   ============================================ */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 15px;
}

.cta-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 194, 75, 0.3);
    color: white;
}

.cta-btn i {
    font-size: 1.1rem;
}

/* ============================================
   Sneak Peek / Coming Soon Cards
   ============================================ */
.coming-soon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 15px;
    margin: 20px 0;
}

.coming-soon-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px dashed var(--primary);
    text-align: center;
    transition: all 0.3s;
}

.coming-soon-card:hover {
    border-style: solid;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.coming-soon-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #d4a745;
}

.coming-soon-title {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    font-size: 0.95rem;
}

/* ============================================
   Feedback Section
   ============================================ */
.feedback-card {
    background: linear-gradient(135deg, var(--bg-card-start) 0%, var(--bg-card-end) 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(251, 194, 75, 0.3);
}

.feedback-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0 0 10px 0;
}

.feedback-card p {
    color: var(--text-brown);
    margin: 0 0 20px 0;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.feedback-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 194, 75, 0.3);
    color: white;
}

/* ============================================
   English Features Grid
   ============================================ */
.english-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0 20px;
}

.english-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.english-feature-item i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

@media (max-width: 600px) {
    .english-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Level-specific content visibility
   ============================================ */
[data-level-content] {
    display: none;
}

[data-level-content].show {
    display: block;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .section-header {
        gap: 12px;
    }

    .section-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .news-content {
        padding: 20px 15px 50px;
    }

    .news-section {
        margin-bottom: 50px;
    }
}

@media (max-width: 600px) {
    .level-switcher-container {
        top: 45px;
    }

    .news-nav {
        top: 95px;
    }

    .news-section {
        scroll-margin-top: 160px;
    }

    .news-content {
        padding: 20px 18px 50px;
    }

    .info-box {
        padding: 15px 18px;
    }

    .feedback-card {
        padding: 25px 20px;
    }

    .section-text {
        font-size: 1rem;
    }
}
