/* Mars 2026 - Språki Update 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%;
}

.news-hero,
.news-content,
.news-section {
    max-width: 100%;
    overflow-x: hidden;
}

.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 Group Title
   ============================================ */
.stats-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-brown);
    margin: 25px 0 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-group-title i {
    color: var(--primary);
    font-size: 0.95rem;
}

.stats-group-title + .stats-grid {
    margin-top: 10px;
}

/* ============================================
   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;
    }
}

/* ============================================
   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);
}

/* ============================================
   Two-column side-by-side layout
   ============================================ */
.two-col-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 20px 0;
}

.two-col-block h3 {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .two-col-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   Compact Grid (replaces long lists)
   ============================================ */
.compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0 15px;
}

.compact-grid--wide {
    margin: 15px 0 20px;
}

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

.compact-item i {
    color: var(--primary);
    font-size: 0.8rem;
    flex-shrink: 0;
}

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

/* ============================================
   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;
}

/* ============================================
   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;
}

/* ============================================
   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;
}

/* ============================================
   Language Grid (for Oversette section)
   ============================================ */
.language-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0 20px;
}

.language-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;
}

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

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

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

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

/* ============================================
   Highlight card (for big features)
   ============================================ */
.highlight-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border-radius: var(--radius-lg);
    padding: 25px 30px;
    border: 1px solid #f5e6b8;
    margin: 20px 0;
}

.highlight-card h4 {
    color: var(--text-dark);
    margin: 0 0 10px;
    font-size: 1.1rem;
}

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

/* ============================================
   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;
    }
}
