/* ═══════════════════════════════════════════════════════════
   IDC BOOKS - Main Stylesheet
   Light & Fresh Teal Design
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ─────────────────────────────────────────────────────────
   CSS VARIABLES
───────────────────────────────────────────────────────── */
:root {
    --bg: #FAFDFB;
    --bg-warm: #F2FAF7;
    --bg-cream: #E5F5F0;
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --primary: #1A8A72;
    --primary-light: #25A88A;
    --primary-dark: #126352;
    --accent: #2DD4BF;
    --accent-light: #5EEAD4;

    /* Sub-brand colors */
    --gold: #F59E0B;
    --gold-light: #FBBF24;
    --gold-dark: #D97706;
    --gold-glow: rgba(245, 158, 11, 0.25);
    --gold-surface: #FEF3C7;

    --indigo: #6366F1;
    --indigo-light: #818CF8;
    --indigo-dark: #4F46E5;
    --indigo-glow: rgba(99, 102, 241, 0.25);
    --indigo-surface: #EEF2FF;

    --teal-glow: rgba(26, 138, 114, 0.25);

    --text: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --border: #E2E8F0;
    --border-light: #F1F5F9;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 45px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
    --shadow-3d: 0 16px 36px -6px rgba(0, 0, 0, 0.16);
    --shadow-hover: 0 22px 40px -8px rgba(26, 138, 114, 0.18);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.35);

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --max-w: 1320px;
}

/* ───────────────────────────────────────────────────────
   DARK THEME
   base.html dagi inline skript tizim tanlovini ham <html data-theme="...">
   atributiga yozadi, shuning uchun bitta manba yetarli.
─────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
    --bg: #091310;
    --bg-warm: #0D1C17;
    --bg-cream: #11251F;
    --bg-card: #142822;
    --bg-elevated: #1B352E;
    --primary: #2DD4BF;
    --primary-light: #5EEAD4;
    --primary-dark: #1A8A72;
    --accent: #34D8AE;
    --accent-light: #7EEBC4;

    --gold: #FBBF24;
    --gold-light: #FCD34D;
    --gold-dark: #F59E0B;
    --gold-glow: rgba(251, 191, 36, 0.25);
    --gold-surface: rgba(245, 158, 11, 0.15);

    --indigo: #818CF8;
    --indigo-light: #A5B4FC;
    --indigo-dark: #6366F1;
    --indigo-glow: rgba(129, 140, 248, 0.25);
    --indigo-surface: rgba(99, 102, 241, 0.15);

    --teal-glow: rgba(45, 212, 191, 0.25);

    --text: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-light: #64748B;

    --border: #1E3B33;
    --border-light: #162C26;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 25px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 45px -8px rgba(0, 0, 0, 0.65);
    --shadow-3d: 0 16px 36px -6px rgba(0, 0, 0, 0.7);
    --shadow-hover: 0 22px 40px -8px rgba(45, 212, 191, 0.25);

    --glass-bg: rgba(20, 40, 34, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ─────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.25s ease, color 0.25s ease;
}

/* Skip link - klaviatura/skrin-riderlar uchun */
.skip-link {
    position: absolute;
    top: -50px;
    left: 16px;
    background: var(--primary-dark);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    z-index: 2000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    color: #fff;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─────────────────────────────────────────────────────────
   HEADER (CLEAN FROSTED GLASS & MODERN TOKENS)
───────────────────────────────────────────────────────── */
.site-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 4px 30px -4px rgba(15, 23, 42, 0.15);
}

[data-theme="dark"] .site-header {
    background: rgba(9, 19, 16, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .site-header.is-scrolled {
    box-shadow: 0 6px 34px -2px rgba(0, 0, 0, 0.6);
}

.scroll-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #1A8A72 0%, #2DD4BF 60%, #F59E0B 100%);
    z-index: 1001;
    transition: width 0.1s ease-out;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 92px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    background: rgba(15, 23, 42, 0.94);
    color: #FFFFFF;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

[data-theme="dark"] .toast-item {
    background: rgba(20, 40, 34, 0.94);
    border-color: rgba(45, 212, 191, 0.3);
    color: #F8FAFC;
}

.toast-item.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.toast-item i {
    color: #2DD4BF;
    font-size: 16px;
}

/* Category Hero */
.category-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    padding: 60px 0 40px;
}

[data-theme="dark"] .category-hero {
    background: linear-gradient(135deg, #091a15 0%, #0f2b23 50%, #153c31 100%);
    border-bottom: 1px solid var(--border);
}

.category-hero-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

.category-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
}

.category-hero-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0;
}

/* Olympiad Sub-hero (Editions & Videos) */
.oly-sub-hero {
    background: linear-gradient(135deg,
        var(--oly-hero-from, #B45309) 0%,
        var(--oly-hero-to, #D97706) 100%);
}

/* Tungi rejimda brend tusi saqlanadi, ustiga to'q qatlam qo'yiladi. */
[data-theme="dark"] .oly-sub-hero {
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.56) 100%),
        linear-gradient(135deg,
            var(--oly-hero-from, #B45309) 0%,
            var(--oly-hero-to, #D97706) 100%);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
}

/* Site Logo */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-logo:hover {
    opacity: 0.92;
}

.logo-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 2px 6px rgba(26, 138, 114, 0.18));
    transition: transform 0.25s ease;
}

.site-logo:hover .logo-icon {
    transform: scale(1.05);
}

.logo-brand-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-name {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.8px;
    color: #0F172A;
    line-height: 1;
}

[data-theme="dark"] .logo-name {
    color: #F8FAFC;
}

.logo-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.logo-badge-main {
    background: rgba(26, 138, 114, 0.1);
    color: #1A8A72;
}

[data-theme="dark"] .logo-badge-main {
    background: rgba(45, 212, 191, 0.15);
    color: #2DD4BF;
}

.logo-badge-books {
    background: rgba(99, 102, 241, 0.12);
    color: #6366F1;
}

[data-theme="dark"] .logo-badge-books {
    background: rgba(129, 140, 248, 0.18);
    color: #A5B4FC;
}

.logo-badge-oly {
    background: rgba(245, 158, 11, 0.14);
    color: #D97706;
}

[data-theme="dark"] .logo-badge-oly {
    background: rgba(251, 191, 36, 0.18);
    color: #FBBF24;
}

.logo-badge-edu {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

[data-theme="dark"] .logo-badge-edu {
    background: rgba(52, 211, 153, 0.18);
    color: #34D399;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.main-nav .nav-link i {
    font-size: 13px;
    color: #94A3B8;
    transition: color 0.2s ease;
}

.main-nav .nav-link:hover {
    color: #1A8A72;
    background: rgba(26, 138, 114, 0.08);
}

.main-nav .nav-link:hover i {
    color: #1A8A72;
}

.main-nav .nav-link--active {
    color: #1A8A72;
    background: rgba(26, 138, 114, 0.12);
    border-color: rgba(26, 138, 114, 0.2);
    font-weight: 700;
}

.main-nav .nav-link--active i {
    color: #1A8A72;
}

[data-theme="dark"] .main-nav .nav-link {
    color: rgba(248, 250, 252, 0.75);
}

[data-theme="dark"] .main-nav .nav-link i {
    color: rgba(248, 250, 252, 0.45);
}

[data-theme="dark"] .main-nav .nav-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .main-nav .nav-link:hover i {
    color: #2DD4BF;
}

[data-theme="dark"] .main-nav .nav-link--active {
    color: #2DD4BF;
    background: rgba(45, 212, 191, 0.15);
    border-color: rgba(45, 212, 191, 0.3);
}

[data-theme="dark"] .main-nav .nav-link--active i {
    color: #2DD4BF;
}

/* Header Right Controls */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Switcher - Modern Segmented Control */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 100px;
    padding: 3px;
    gap: 2px;
}

[data-theme="dark"] .lang-switcher {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.lang-form {
    margin: 0;
}

.lang-btn {
    padding: 5px 11px;
    border: none;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    background: transparent;
    color: #64748B;
    line-height: 1;
}

.lang-btn:hover {
    color: #0F172A;
}

.lang-btn--active {
    background: #1A8A72;
    color: #FFFFFF !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(26, 138, 114, 0.28);
}

[data-theme="dark"] .lang-btn {
    color: rgba(248, 250, 252, 0.6);
}

[data-theme="dark"] .lang-btn:hover {
    color: #FFFFFF;
}

[data-theme="dark"] .lang-btn--active {
    background: #2DD4BF;
    color: #091310 !important;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.35);
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 50%;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: #E2E8F0;
    color: #0F172A;
    transform: rotate(15deg) scale(1.05);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #FCD34D;
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FBBF24;
}

/* Mobile Nav Toggle (Hamburger) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.2s ease;
}

.nav-toggle:hover {
    background: #E2E8F0;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #0F172A;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
}

[data-theme="dark"] .nav-toggle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .nav-toggle span {
    background: #F8FAFC;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ─────────────────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────────────────── */
.hero {
    text-align: center;
}

.hero::before {
    inset: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero p {
    font-size: clamp(16px, 2.5vw, 20px);
    color: rgba(255,255,255,0.9);
    font-style: italic;
    font-family: var(--font-display);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.hero-stat {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    padding: 24px 36px;
    text-align: center;
    transition: all 0.3s ease;
}

.hero-stat:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-4px);
}

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: #FFFFFF;
}

.hero-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

[data-theme="dark"] .hero {
    background: linear-gradient(165deg, #071712 0%, #0c261e 40%, #11362b 100%);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .hero::before {
    background: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(45, 212, 191, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse 60% 40% at 80% 60%, rgba(26, 138, 114, 0.15) 0%, transparent 50%);
}

[data-theme="dark"] .hero h1 {
    color: #F8FAFC;
}

[data-theme="dark"] .hero p {
    color: rgba(248, 250, 252, 0.85);
}

[data-theme="dark"] .hero-stat {
    background: rgba(15, 35, 30, 0.65);
    border: 1px solid rgba(45, 212, 191, 0.25);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .hero-stat:hover {
    background: rgba(15, 35, 30, 0.9);
    border-color: rgba(45, 212, 191, 0.5);
}

[data-theme="dark"] .hero-stat-num {
    color: var(--gold);
}

[data-theme="dark"] .hero-stat-label {
    color: rgba(255, 255, 255, 0.75);
}

.hero-search-form {
    max-width: 600px;
    margin: 32px auto 0;
    position: relative;
}

.hero-search-input {
    width: 100%;
    padding: 16px 60px 16px 24px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    color: #0F172A;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    outline: none;
    transition: all 0.3s ease;
}

.hero-search-input:focus {
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(45, 212, 191, 0.4);
}

[data-theme="dark"] .hero-search-input {
    background: rgba(15, 35, 30, 0.85);
    border-color: rgba(45, 212, 191, 0.3);
    color: #F8FAFC;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .hero-search-input:focus {
    background: rgba(15, 35, 30, 0.95);
    border-color: var(--teal-glow);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(45, 212, 191, 0.3);
}

[data-theme="dark"] .hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.hero-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A8A72, #25A88A);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.hero-search-btn:hover {
    transform: translateY(-50%) scale(1.08);
}

/* ─────────────────────────────────────────────────────────
   CONTAINER
───────────────────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
}

/* ─────────────────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────────────────── */
.section-title {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ─────────────────────────────────────────────────────────
   CATEGORIES GRID
───────────────────────────────────────────────────────── */
.categories-grid {
    flex-wrap: wrap;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-tag i {
    color: var(--primary);
    transition: color 0.3s ease;
}

.category-tag:hover i {
    color: #FFFFFF;
}

.category-count {
    background: var(--bg-cream);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-tag:hover .category-count {
    background: rgba(255,255,255,0.2);
    color: #FFFFFF;
}

/* ─────────────────────────────────────────────────────────
   BOOKS GRID
───────────────────────────────────────────────────────── */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* ─────────────────────────────────────────────────────────
   BOOK CARD
───────────────────────────────────────────────────────── */
.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
    perspective: 1000px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.book-card:hover {
    transform: translateY(-8px) rotateX(3deg) rotateY(-3deg);
    box-shadow: var(--shadow-lg), 0 0 24px var(--teal-glow);
    border-color: var(--primary-light);
}

.book-card-cover {
    position: relative;
    height: 260px;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: 3px 5px 16px rgba(0, 0, 0, 0.16);
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.book-card:hover .book-card-cover img {
    transform: scale(1.05);
}

.book-card-placeholder {
    font-size: 64px;
    opacity: 0.3;
}

.book-card-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.book-card-body {
    padding: 20px;
}

.book-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-author {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.book-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.book-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.book-card-meta i {
    color: var(--primary);
}

/* ─────────────────────────────────────────────────────────
   BOOK DETAIL PAGE
───────────────────────────────────────────────────────── */
.breadcrumb {
    padding: 20px 0;
    color: var(--text-muted);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.book-detail {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 48px;
    padding: 32px 0;
}

.book-cover-wrap {
    position: sticky;
    top: 100px;
}

.book-cover-img {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.book-cover-img img {
    width: 100%;
    display: block;
}

.book-cover-placeholder {
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    background: var(--bg-cream);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(32, 184, 149, 0.4);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 184, 149, 0.5);
    color: #FFFFFF;
}

.book-info h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.2;
}

.book-author-name {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.book-meta-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 15px;
}

.book-meta-table td:first-child {
    color: var(--text-muted);
    width: 160px;
}

.book-meta-table td:first-child i {
    margin-right: 10px;
    color: var(--primary);
    width: 20px;
}

.book-meta-table a {
    color: var(--primary);
}

.book-description {
    background: var(--bg-warm);
    padding: 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.book-description h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text);
}

.book-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.author-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0;
}

.author-box h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text);
}

.author-box p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ─────────────────────────────────────────────────────────
   SEARCH RESULTS
───────────────────────────────────────────────────────── */
.search-header {
    padding: 32px 0 16px;
}

.search-header h2 {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text);
}

.search-header .query {
    color: var(--primary);
}

.search-header .search-count {
    color: var(--text-muted);
    font-weight: 400;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────
   FOOTER (REDESIGNED FOR TRUST & PRESTIGE)
───────────────────────────────────────────────────────── */
.site-footer {
    background: #0B1417;
    color: #E2E8F0;
    padding: 72px 0 0;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .site-footer {
    background: #070E11;
    border-top: 1px solid var(--border);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.35), transparent);
    pointer-events: none;
}

.footer-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1.1fr 1.3fr 1.2fr;
    gap: 48px;
    padding-bottom: 56px;
}

/* Col: Brand */
.footer-col-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.footer-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
}

.footer-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #FFFFFF;
    line-height: 1.2;
}

.footer-brand-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(226, 232, 240, 0.55);
    font-weight: 600;
    margin-top: 2px;
}

.footer-tagline {
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(226, 232, 240, 0.7);
    margin: 0 0 20px;
    max-width: 340px;
}

.footer-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 11.5px;
    color: rgba(226, 232, 240, 0.85);
    font-weight: 500;
    width: fit-content;
}

.footer-trust-badge i {
    color: #FCD34D;
    font-size: 13px;
}

/* Headings */
.footer-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #FFFFFF;
    margin: 0 0 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: #2DD4BF;
    border-radius: 2px;
}

/* Nav links */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: rgba(226, 232, 240, 0.7);
    text-decoration: none;
    transition: all 0.25s ease;
}

.footer-nav a i {
    font-size: 12px;
    color: rgba(226, 232, 240, 0.4);
    transition: color 0.25s ease;
    width: 14px;
}

.footer-nav a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}

.footer-nav a:hover i {
    color: #2DD4BF;
}

/* Contact items */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.footer-contact-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2DD4BF;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.25s ease;
}

.footer-contact-label {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(226, 232, 240, 0.5);
    font-weight: 600;
    margin-bottom: 2px;
}

.footer-contact-value {
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.9);
    line-height: 1.4;
    word-break: break-word;
}

a.footer-contact-item:hover .footer-contact-value {
    color: #FFFFFF;
}

a.footer-contact-item:hover .footer-contact-icon {
    background: rgba(45, 212, 191, 0.15);
    border-color: rgba(45, 212, 191, 0.35);
    color: #FFFFFF;
}

/* Social & Hours */
.footer-col-desc {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.65);
    margin: 0 0 16px;
}

.footer-social-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.footer-social-btn:hover {
    transform: translateY(-3px);
    color: #FFFFFF;
}

.footer-social-tg:hover {
    background: #229ED9;
    border-color: #229ED9;
    box-shadow: 0 8px 20px rgba(34, 158, 217, 0.35);
}

.footer-social-ig:hover {
    background: linear-gradient(135deg, #833AB4, #FD1D1D, #F56040);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.35);
}

.footer-social-fb:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.35);
}

.footer-social-yt:hover {
    background: #FF0000;
    border-color: #FF0000;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.35);
}

.footer-hours {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.65);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-hours i {
    color: #FCD34D;
    font-size: 13px;
}

/* Sub-footer */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0 32px;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.55);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.35);
}

.footer-bottom-links a {
    color: rgba(226, 232, 240, 0.65);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #2DD4BF;
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE - TABLET
───────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .book-detail {
        grid-template-columns: 280px 1fr;
        gap: 32px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE - MOBILE
───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 16px;
        flex-wrap: nowrap;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo-name {
        font-size: 20px;
    }
    
    .search-box input {
        width: 160px;
    }
    
    .hero {
        padding: 48px 16px 64px;
    }
    
    .hero-stats {
        gap: 12px;
    }
    
    .hero-stat {
        padding: 16px 24px;
    }
    
    .hero-stat-num {
        font-size: 28px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 32px 0;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .book-card-cover {
        height: 200px;
    }
    
    .book-card-body {
        padding: 14px;
    }
    
    .book-card-title {
        font-size: 15px;
    }
    
    .book-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .book-cover-wrap {
        position: static;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .book-info h1 {
        font-size: 26px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: left;
    }
    
    .footer-heading::after {
        left: 0;
        transform: none;
    }
    
    .footer-tagline {
        margin: 0 0 16px;
    }
    
    .footer-brand {
        justify-content: flex-start;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
}

@media (max-width: 480px) {
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-box {
        flex: 1;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .hero-stat {
        flex: 1;
        min-width: 100px;
        padding: 14px 16px;
    }
    
    .hero-stat-num {
        font-size: 24px;
    }
    
    .hero-stat-label {
        font-size: 10px;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .book-card-cover {
        height: 160px;
    }
    
    .book-card-title {
        font-size: 14px;
    }
    
    .book-card-author {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════
   IDC EDUCATION - Landing Page & Olympiad Styles
═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   HERO SECTION (Landing)
───────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    /* Gorizontal padding shart: .hero ichida .container yo'q, shuning uchun
       mobil ekranda kontent chetga tegib ketardi. */
    padding: 80px 24px 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    margin-bottom: 60px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Direction Cards */
.direction-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.direction-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text);
    text-decoration: none;
}

.direction-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.direction-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.direction-olympiad .direction-icon {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.direction-education .direction-icon {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
}

.direction-books .direction-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.direction-card h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.direction-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.direction-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.direction-stats strong {
    color: var(--primary);
}

.direction-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    margin-top: auto;
}

.direction-link i {
    transition: transform 0.3s ease;
}

.direction-card:hover .direction-link i {
    transform: translateX(4px);
}

/* ─────────────────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────────────────── */
.section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--primary);
}

.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 48px;
}

.section-title i {
    color: var(--primary);
    margin-right: 12px;
}

/* Section backgrounds */
.section-olympiad {
    background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%);
}

.section-education {
    background: var(--bg-warm);
}

.section-books {
    background: var(--bg-card);
}

.section-stats {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    padding: 60px 0;
}

/* ─────────────────────────────────────────────────────────
   OLYMPIAD PREVIEW
───────────────────────────────────────────────────────── */
.olympiad-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.olympiad-info h3 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 16px;
}

.olympiad-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.olympiad-editions-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edition-mini-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.edition-year {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    min-width: 60px;
}

.edition-name {
    flex: 1;
    font-weight: 500;
}

.edition-medals {
    font-size: 14px;
}

/* ─────────────────────────────────────────────────────────
   EDUCATION PREVIEW
───────────────────────────────────────────────────────── */
.education-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.edu-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.edu-card:hover {
    box-shadow: var(--shadow-md);
}

.edu-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.edu-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 12px;
}

.edu-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.edu-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.edu-stats i {
    color: var(--primary);
    margin-right: 4px;
}

.courses-preview h4 {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.courses-grid-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.course-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    transition: all 0.3s ease;
}

.course-mini-card:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.course-mini-card i {
    color: var(--primary);
}

.course-mini-card:hover i {
    color: #fff;
}

/* ─────────────────────────────────────────────────────────
   STATS GRID
───────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stats-grid-4 {
    max-width: 1080px;
    margin: 0 auto;
}

.stat-box {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-box .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(26, 138, 114, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.stat-box:hover .stat-icon {
    transform: scale(1.1) rotate(-6deg);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────────────────────
   PAGE HERO
───────────────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    padding: 100px 0 60px;
    color: #fff;
}

.page-hero-sm {
    padding: 80px 0 40px;
}

.olympiad-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
}

[data-theme="dark"] .page-hero,
[data-theme="dark"] .olympiad-hero,
[data-theme="dark"] .school-hero,
[data-theme="dark"] .center-hero,
[data-theme="dark"] .course-hero {
    background: linear-gradient(135deg, #091a15 0%, #0f2b23 50%, #153c31 100%);
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    color: rgba(255,255,255,0.6);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-hero h1 i {
    margin-right: 12px;
}

.page-hero p {
    font-size: 18px;
    opacity: 0.9;
}

.olympiad-logo {
    max-height: 80px;
    margin-bottom: 20px;
}

/* ─────────────────────────────────────────────────────────
   OLYMPIAD STAGES
───────────────────────────────────────────────────────── */
.stages-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.stage-item {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.stage-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.stage-content {
    flex: 1;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.stage-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-cream);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
    flex-shrink: 0;
}

.stage-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.stage-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* ─────────────────────────────────────────────────────────
   EDITIONS
───────────────────────────────────────────────────────── */
.editions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.edition-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.edition-card:hover {
    box-shadow: var(--shadow-md);
}

.edition-image {
    height: 160px;
    overflow: hidden;
}

.edition-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edition-content {
    padding: 24px;
}

.edition-year-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.edition-content h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 16px;
}

.edition-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.edition-stat {
    font-size: 13px;
    color: var(--text-secondary);
}

.edition-stat i {
    color: var(--primary);
    margin-right: 4px;
}

.edition-medals {
    display: flex;
    gap: 12px;
}

.medal {
    font-size: 16px;
}

.edition-desc {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Editions List (Full) */
.editions-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.edition-card-full {
    display: flex;
    gap: 32px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.edition-year-big {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.edition-main {
    display: flex;
    flex: 1;
    padding: 24px;
    gap: 24px;
}

.edition-image-lg {
    width: 200px;
    flex-shrink: 0;
}

.edition-image-lg img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.edition-details {
    flex: 1;
}

.edition-details h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 16px;
}

.edition-stats-row {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.edition-stats-row .stat {
    text-align: center;
}

.edition-stats-row .stat i {
    font-size: 20px;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.edition-stats-row .stat strong {
    display: block;
    font-size: 24px;
    color: var(--text);
}

.edition-stats-row .stat span {
    font-size: 12px;
    color: var(--text-muted);
}

.edition-medals-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.medal-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.medal-box.gold {
    background: #FEF3C7;
}

.medal-box.silver {
    background: #F3F4F6;
}

.medal-box.bronze {
    background: #FED7AA;
}

.medal-icon {
    font-size: 20px;
}

.medal-count {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

.medal-label {
    font-size: 12px;
    color: var(--text-muted);
}

.edition-description {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ─────────────────────────────────────────────────────────
   VIDEOS
───────────────────────────────────────────────────────── */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.videos-grid-lg {
    grid-template-columns: repeat(3, 1fr);
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.video-card:hover .video-play-btn {
    background: var(--primary);
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.video-info {
    padding: 16px;
}

.video-info h4 {
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-edition {
    font-size: 13px;
    color: var(--text-muted);
}

.video-edition i {
    margin-right: 4px;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    width: 90%;
    max-width: 900px;
    position: relative;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.video-modal-body {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ─────────────────────────────────────────────────────────
   CTA SECTION
───────────────────────────────────────────────────────── */
.section-cta {
    background: var(--bg-cream);
}

.cta-box {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    border-radius: var(--radius);
    padding: 60px;
    text-align: center;
    color: #fff;
}

.cta-box h2 {
    font-family: var(--font-display);
    font-size: 32px;
    margin-bottom: 16px;
}

.cta-box p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 24px;
}

/* ─────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* ─────────────────────────────────────────────────────────
   CONTENT BLOCK
───────────────────────────────────────────────────────── */
.content-block {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.content-block h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-block h2 i {
    color: var(--primary);
}

.text-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ─────────────────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .direction-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .olympiad-preview {
        grid-template-columns: 1fr;
    }
    
    .editions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .direction-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .education-preview {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .editions-grid,
    .videos-grid,
    .videos-grid-lg {
        grid-template-columns: 1fr;
    }
    
    .edition-card-full {
        flex-direction: column;
    }
    
    .edition-year-big {
        padding: 20px;
        font-size: 36px;
    }
    
    .edition-main {
        flex-direction: column;
    }
    
    .edition-image-lg {
        width: 100%;
    }
    
    .edition-stats-row {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .edition-medals-row {
        flex-wrap: wrap;
    }
    
    .stages-timeline {
        gap: 16px;
    }
    
    .stage-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .stage-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-hero {
        padding: 80px 0 40px;
    }
    
    .page-hero h1 {
        font-size: 28px;
    }
    
    .cta-box {
        padding: 40px 24px;
    }
    
    .cta-box h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .direction-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .video-play-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════
   EDUCATION STYLES
═══════════════════════════════════════════════════════════ */

/* Education Hero */
.education-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
}

.school-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
}

.center-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
}

.course-hero {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
}

.school-logo,
.center-logo {
    max-height: 80px;
    margin-bottom: 20px;
}

/* Education Cards (Home) */
.education-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.education-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.education-card-image {
    height: 200px;
    overflow: hidden;
}

.education-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.education-card-content {
    padding: 32px;
}

.education-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.education-card-content h3 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 12px;
}

.education-card-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.education-card-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.education-card-stats .stat {
    text-align: center;
}

.education-card-stats strong {
    display: block;
    font-size: 24px;
    color: var(--primary);
    font-family: var(--font-display);
}

.education-card-stats span {
    font-size: 12px;
    color: var(--text-muted);
}

/* School/Center Content */
.school-content,
.center-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.school-image img,
.center-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.school-info,
.center-info {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.school-info h2,
.center-info h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-info h2 i,
.center-info h2 i {
    color: var(--primary);
}

/* Advantages */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.advantage-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.advantage-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(26, 138, 114, 0.25);
}

.advantage-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.advantage-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.achievement-photo {
    height: 120px;
    overflow: hidden;
}

.achievement-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.achievement-photo-placeholder {
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary);
}

.achievement-content {
    padding: 16px;
}

.achievement-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.achievement-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.achievement-year {
    display: inline-block;
    background: var(--bg-cream);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.course-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--text);
}

.course-card-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-card-image img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.course-card-icon {
    height: 120px;
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
}

.course-card-content {
    padding: 20px;
    flex: 1;
}

.course-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.course-card-content h4 {
    font-size: 17px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.course-card-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.course-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.course-meta i {
    color: var(--primary);
    margin-right: 4px;
}

/* Course List Layout */
.courses-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.courses-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.filter-box,
.contact-box,
.sidebar-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.filter-box h3,
.contact-box h3,
.sidebar-box h4 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-box h3 i,
.contact-box h3 i {
    color: var(--primary);
}

.category-filter {
    list-style: none;
}

.category-filter li {
    margin-bottom: 4px;
}

.category-filter a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.category-filter a:hover {
    background: var(--bg-cream);
    color: var(--primary);
}

.category-filter a.active {
    background: var(--primary);
    color: #fff;
}

.category-filter a i {
    width: 20px;
    text-align: center;
}

.category-filter .count {
    margin-left: auto;
    font-size: 12px;
    background: var(--bg-cream);
    padding: 2px 8px;
    border-radius: 10px;
}

.category-filter a.active .count {
    background: rgba(255,255,255,0.2);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.contact-link:last-child {
    border-bottom: none;
}

.contact-link:hover {
    color: var(--primary);
}

.contact-link i {
    color: var(--primary);
}

.current-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.clear-filter {
    font-size: 13px;
    color: var(--text-muted);
}

.clear-filter:hover {
    color: #e74c3c;
}

/* Course Horizontal Card */
.course-card-horizontal {
    flex-direction: row;
    align-items: stretch;
}

.course-card-horizontal .course-card-image {
    width: 200px;
    height: auto;
    min-height: 160px;
    flex-shrink: 0;
}

.course-card-horizontal .course-card-icon {
    width: 120px;
    height: auto;
    min-height: 160px;
}

.course-card-horizontal .course-card-content {
    display: flex;
    flex-direction: column;
}

.course-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: auto;
    padding-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.course-details i {
    color: var(--primary);
    margin-right: 4px;
}

.course-price {
    color: var(--primary);
    font-weight: 600;
}

.course-card-action {
    display: flex;
    align-items: center;
    padding: 20px;
    border-left: 1px solid var(--border-light);
}

/* Course Detail */
.course-detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
    align-items: start;
}

.course-detail-image {
    margin-bottom: 32px;
}

.course-detail-image img {
    width: 100%;
    border-radius: var(--radius);
}

.course-detail-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.course-detail-content h2 {
    font-family: var(--font-display);
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.course-detail-content h2 i {
    color: var(--primary);
}

.course-detail-sidebar {
    position: sticky;
    top: 100px;
}

.course-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.course-info-header {
    background: linear-gradient(135deg, #1A8A72 0%, #25A88A 100%);
    padding: 32px;
    text-align: center;
    color: #fff;
}

.course-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
}

.course-price-large {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
}

.course-info-list {
    list-style: none;
    padding: 24px;
}

.course-info-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.course-info-list li:last-child {
    border-bottom: none;
}

.course-info-list i {
    width: 40px;
    height: 40px;
    background: var(--bg-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-right: 16px;
}

.course-info-list span {
    color: var(--text-muted);
    font-size: 13px;
}

.course-info-list strong {
    margin-left: auto;
    font-size: 14px;
    color: var(--text);
}

.course-action {
    padding: 24px;
    padding-top: 0;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    color: var(--text);
}

.category-link:hover {
    background: var(--primary);
    color: #fff;
}

.category-link i {
    color: var(--primary);
}

.category-link:hover i {
    color: #fff;
}

.course-category-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 12px;
}

.course-hero-content {
    text-align: center;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--text);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin: 0 auto 16px;
}

.category-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.category-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* Education Responsive */
@media (max-width: 1024px) {
    .education-cards {
        grid-template-columns: 1fr;
    }
    
    .school-content,
    .center-content {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-layout {
        grid-template-columns: 1fr;
    }
    
    .courses-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .course-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .course-detail-sidebar {
        position: static;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .advantages-grid,
    .achievements-grid,
    .courses-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-sidebar {
        grid-template-columns: 1fr;
    }
    
    .course-card-horizontal {
        flex-direction: column;
    }
    
    .course-card-horizontal .course-card-image {
        width: 100%;
        height: 160px;
    }
    
    .course-card-horizontal .course-card-icon {
        width: 100%;
        height: 120px;
    }
    
    .course-card-action {
        border-left: none;
        border-top: 1px solid var(--border-light);
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE NAVIGATION
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 6px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        padding: 14px 20px 20px;
    }

    [data-theme="dark"] .main-nav {
        background: rgba(9, 19, 16, 0.98);
        border-bottom-color: var(--border);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav .nav-link {
        width: 100%;
        padding: 12px 16px;
        border-radius: 12px;
    }

    .header-inner {
        padding: 12px 20px;
    }
}

/* ─────────────────────────────────────────────────────────
   CUSTOM SCROLLBAR
───────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 100px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ─────────────────────────────────────────────────────────
   FLOATING BACK TO TOP BUTTON
───────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    border: none;
    box-shadow: 0 8px 24px var(--teal-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 14px 28px var(--teal-glow);
}

/* ─────────────────────────────────────────────────────────
   3D BOOK COVER & SHELF STYLING
───────────────────────────────────────────────────────── */
/* Realistic spine crease */
.book-card-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(255,255,255,0.12) 40%, rgba(0,0,0,0.12) 100%);
    z-index: 3;
    pointer-events: none;
}
/* Gloss reflection */
.book-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 55%);
    z-index: 3;
    pointer-events: none;
}
.book-format-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 4;
}

/* ─────────────────────────────────────────────────────────
   BENTO GRID SYSTEM
───────────────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-top: 36px;
}
.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}
.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.bento-card-7 { grid-column: span 7; }
.bento-card-5 { grid-column: span 5; }
.bento-card-6 { grid-column: span 6; }
.bento-card-4 { grid-column: span 4; }
.bento-card-12 { grid-column: span 12; }

@media (max-width: 992px) {
    .bento-card-7, .bento-card-5, .bento-card-6, .bento-card-4 {
        grid-column: span 12;
    }
}

/* ─────────────────────────────────────────────────────────
   STEPPER & TIMELINE (OLYMPIAD STAGES)
───────────────────────────────────────────────────────── */
.stepper-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 36px 0;
}
.stepper-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stepper-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 12px 30px var(--gold-glow);
}
.stepper-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.stepper-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px var(--gold-glow);
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   MEDALS PODIUM
───────────────────────────────────────────────────────── */
.medals-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 36px 0;
}
.medals-podium .medal-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.medals-podium .medal-box:hover {
    transform: translateY(-6px);
}
.medals-podium .medal-box.gold {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--gold-surface) 0%, var(--bg-card) 100%);
    box-shadow: 0 8px 24px var(--gold-glow);
}
.medals-podium .medal-box.silver {
    border-color: #94A3B8;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.1) 0%, var(--bg-card) 100%);
}
.medals-podium .medal-box.bronze {
    border-color: var(--gold-dark);
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, var(--bg-card) 100%);
}
.medals-podium .medal-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.medals-podium .medal-box.gold .medal-icon { color: var(--gold); }
.medals-podium .medal-box.silver .medal-icon { color: #94A3B8; }
.medals-podium .medal-box.bronze .medal-icon { color: var(--gold-dark); }
.medals-podium .medal-count {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
    color: var(--text);
}
.medals-podium .medal-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .medals-podium {
        grid-template-columns: 1fr;
    }
}




/* ─────────────────────────────────────────────────────────
   REDUCED MOTION
   Foydalanuvchi animatsiyalarni kamaytirishni so'ragan bo'lsa.
───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ─────────────────────────────────────────────────────────
   KITOB: ULASHISH PANELI
───────────────────────────────────────────────────────── */
.book-share-bar {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.book-share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.book-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.book-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.book-share-btn--tg {
    background: #229ED9;
    color: #fff;
}

.book-share-btn--tg:hover {
    background: #1b8cc0;
    color: #fff;
}

.book-share-btn--copy {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border);
}

.book-share-btn--copy:hover {
    background: var(--bg-warm);
    border-color: var(--primary);
}
