/* ============================
   KHURAL.MN — Unified Design System
   Multi-tenant брэнд системийн үндсэн токен бүлэг.
   Бүх theme/aimag/duureg сайтууд энэ файлыг ашиглана.
   ============================ */

:root {
    /* ---------- COLOR ---------- */
    /* Primary — Navy (parliament authority) */
    --c-brand:        #0b3d91;
    --c-brand-light:  #1a5fb4;
    --c-brand-deep:   #061b45;

    /* Accent — Gold (emphasis, state, highlight) */
    --c-gold:         #c9a227;
    --c-gold-light:   #e0b83a;

    /* Neutral */
    --c-text:         #1a1f2e;
    --c-muted:        #6b7280;
    --c-line:         #e5e7eb;
    --c-bg:           #ffffff;
    --c-bg-soft:      #f7f8fb;

    /* Semantic (reserved use) */
    --c-success:      #1a5f3f;
    --c-danger:       #b1354e;

    /* ---------- TYPOGRAPHY ---------- */
    /* Mongolian Cyrillic-optimized stack. Inter + Noto Sans cover Ү Ө Ё properly. */
    --ff-sans: 'Inter', 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
    /* Noto Serif → PT Serif → fall back. Both have excellent Cyrillic + Mongolian coverage. */
    --ff-serif: 'Noto Serif', 'PT Serif', 'Playfair Display', Georgia, serif;

    --fs-xs:   0.75rem;   /* 12 — chip, micro label */
    --fs-sm:   0.875rem;  /* 14 — meta, caption */
    --fs-base: 1rem;      /* 16 — body, nav */
    --fs-md:   1.125rem;  /* 18 — card title, subhead */
    --fs-lg:   1.5rem;    /* 24 — h3, panel */
    --fs-xl:   2rem;      /* 32 — h2, section */
    --fs-2xl:  clamp(2rem, 4vw, 3rem);  /* h1, hero */

    --fw-normal:  400;
    --fw-medium:  500;
    --fw-semi:    600;
    --fw-bold:    700;
    --fw-extra:   800;

    --lh-tight: 1.2;
    --lh-base:  1.55;

    /* ---------- SPACING (4px base) ---------- */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;

    /* ---------- RADIUS (flat institutional default) ---------- */
    --r-none: 0;
    --r-sm:   4px;
    --r-md:   8px;
    --r-pill: 999px;

    /* ---------- SHADOW ---------- */
    --sh-sm: 0 1px 3px rgba(15,23,42,.06);
    --sh-md: 0 4px 14px rgba(15,23,42,.08);
    --sh-lg: 0 12px 40px rgba(15,23,42,.14);

    /* ---------- MOTION ---------- */
    --motion-fast: 0.15s ease-out;
    --motion-base: 0.3s cubic-bezier(.4,0,.2,1);

    /* ---------- LAYOUT ---------- */
    --container: 1240px;

    /* ---------- RESPONSIVE BREAKPOINTS (reference) ----------
       Only use these values in @media queries across the project. */
    --bp-sm: 480px;   /* phone portrait */
    --bp-md: 768px;   /* phone landscape / tablet */
    --bp-lg: 1024px;  /* small laptop */
    --bp-xl: 1280px;  /* desktop */

    /* ---------- CARD (base component) ----------
       Any .card gets a flat institutional look; variants override as needed. */
    --card-bg:     var(--c-bg);
    --card-border: 1px solid var(--c-line);
    --card-radius: var(--r-none);
    --card-pad:    var(--s-4);

    /* ============================
       LEGACY ALIASES — буцаан нийцэлд зориулсан.
       Шинэ код нь зөвхөн --c-*, --s-*, --fs-* токенуудыг ашиглана.
       ============================ */
    --brand:        var(--c-brand);
    --brand-dark:   var(--c-brand-deep);
    --brand-light:  var(--c-brand-light);
    --accent:       var(--c-gold);
    --accent-warm:  var(--c-gold-light);
    --accent-gold:  var(--c-gold);
    --national:     var(--c-brand);
    --national-deep:var(--c-brand-deep);
    --red:          var(--c-danger);
    --green:        var(--c-success);
    --text:         var(--c-text);
    --muted:        var(--c-muted);
    --line:         var(--c-line);
    --bg:           var(--c-bg);
    --bg-soft:      var(--c-bg-soft);
    --bg-dark:      var(--c-brand-deep);
    --radius:       var(--r-none);  /* flat institutional default */
    --radius-lg:    var(--r-none);
    --shadow-sm:    var(--sh-sm);
    --shadow:       var(--sh-md);
    --shadow-lg:    var(--sh-lg);
    --transition:   var(--motion-base);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-sans);
    font-size: var(--fs-base);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: var(--lh-base);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--motion-fast); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--s-5);
}

h1, h2, h3, h4 {
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--c-text);
    letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

/* Section rhythm — бүх section нь ижил vertical spacing-той */
.section { padding: var(--s-7) 0; }
.section + .section { padding-top: 0; }

/* ---------- Card base (unified) ----------
   .card = baseline. Variants: .card--flat (default), .card--elevated (shadow),
   .card--brand (navy bg, white text). All corners are flat. */
.card {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-radius);
    padding: var(--card-pad);
    transition: box-shadow var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
}
.card--flat    { box-shadow: none; }
.card--elevated { box-shadow: var(--sh-sm); }
.card--brand   { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.card--hoverable:hover {
    box-shadow: var(--sh-md);
    border-color: var(--c-brand);
    transform: translateY(-2px);
}

/* ---------- Unified card hover behavior ----------
   Бүх card-тай элемент адил hover-тэй байх — subtle lift + brand border.
   Хуучин одоо байгаа CSS rules дараа нь override хийсэн байж болно. */
.lesson-card,
.tn-card,
.media-card,
.latest-news-card,
.aimag-chip,
.news-card,
.service-card {
    transition: transform var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast);
}
.lesson-card:hover,
.tn-card:hover,
.media-card:hover,
.latest-news-card:hover,
.news-card:hover,
.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
    border-color: var(--c-brand);
}

/* ---------- A11y: focus-visible (keyboard navigation) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

/* ---------- A11y: sr-only (screen reader only — visually hidden) ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- A11y: skip-to-content link ---------- */
.skip-link {
    position: absolute;
    top: -40px;
    left: var(--s-4);
    z-index: 999;
    background: var(--c-brand);
    color: #fff;
    padding: var(--s-2) var(--s-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    text-decoration: none;
    transition: top var(--motion-fast);
}
.skip-link:focus { top: var(--s-2); }

/* ---------- Respect prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ============================
   FORM SYSTEM
   ============================ */
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
.field--row { flex-direction: row; align-items: center; gap: var(--s-3); }

.label {
    display: inline-block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    color: var(--c-text);
    letter-spacing: 0.01em;
}
.label--required::after {
    content: " *";
    color: var(--c-danger);
}

.input,
.textarea,
.select {
    width: 100%;
    display: block;
    padding: 10px 14px;
    font-family: var(--ff-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    color: var(--c-text);
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    line-height: 1.4;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background-color var(--motion-fast);
}
.input:hover, .textarea:hover, .select:hover { border-color: #b7bdca; }
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px rgba(11,61,145,.12);
    background: #fff;
}
.input:disabled, .textarea:disabled, .select:disabled {
    background: var(--c-bg-soft);
    color: var(--c-muted);
    cursor: not-allowed;
}
.input.is-error, .textarea.is-error, .select.is-error { border-color: var(--c-danger); }
.input.is-error:focus, .textarea.is-error:focus, .select.is-error:focus {
    box-shadow: 0 0 0 3px rgba(177,53,78,.15);
}

.textarea { resize: vertical; min-height: 96px; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.help { font-size: var(--fs-xs); color: var(--c-muted); }
.error { font-size: var(--fs-xs); color: var(--c-danger); font-weight: var(--fw-semi); }

/* Checkbox/radio */
.check {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--s-2);
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--c-text);
    user-select: none;
}
.check input[type="checkbox"],
.check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--c-brand);
    margin-top: 1px;
    cursor: pointer;
}

/* Field group (horizontal) */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--s-4);
}

/* ============================
   ICON SYSTEM
   ============================ */
/* Default: inherit color + line-height. Size utilities for consistent icons across the site. */
.i-xs { font-size: 0.75rem; }
.i-sm { font-size: 0.875rem; }
.i-md { font-size: 1rem; }
.i-lg { font-size: 1.25rem; }
.i-xl { font-size: 1.5rem; }
.i-brand { color: var(--c-brand); }
.i-gold  { color: var(--c-gold); }
.i-muted { color: var(--c-muted); }

/* Standalone icon button — square, consistent size */
.icon-btn-base {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-line);
    background: transparent;
    border-radius: var(--r-sm);
    color: var(--c-text);
    cursor: pointer;
    transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}
.icon-btn-base:hover { background: var(--c-bg-soft); border-color: var(--c-brand); color: var(--c-brand); }

/* ============================
   PRINT STYLES
   ============================ */
@media print {
    /* Хэвлэх үед хиддэн болох элементүүд */
    .top-bar,
    .main-menu-bar,
    .a11y-toolbar-wrap,
    .right-fixed-menu,
    .geo-panel,
    .geo-panel-overlay,
    .breaking-ticker,
    .scroll-top,
    .tn-arrow,
    .tn-dots,
    .aimag-tabs,
    .btn,
    .cta-section,
    .site-footer { display: none !important; }

    body { background: #fff; color: #000; font-size: 11pt; line-height: 1.4; }
    .container { max-width: 100%; padding: 0; }
    .section { padding: 10pt 0; }
    h1 { font-size: 20pt; }
    h2 { font-size: 16pt; margin-top: 12pt; }
    h3 { font-size: 13pt; margin-top: 10pt; }
    p  { orphans: 3; widows: 3; }

    .site-header .header-hero { padding: 0; border-bottom: 2pt solid #000; padding-bottom: 8pt; margin-bottom: 12pt; }
    .site-header .main-menu-bar { display: none !important; }

    a { color: #000; text-decoration: underline; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }

    .card, .tn-card, .lesson-card, .latest-news-card, .fund-col, .forum-panel, .poll-panel {
        border: 1pt solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    img { max-width: 100% !important; page-break-inside: avoid; }
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 8px;
}
.eyebrow.light { color: var(--accent-warm); }

/* ---------- Top Bar ---------- */
.top-bar {
    background: var(--bg-dark);
    color: rgba(255,255,255,.85);
    font-size: 0.82rem;
    padding: 8px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.top-bar i { margin-right: 6px; color: var(--accent-warm); }
.top-bar-right a {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    transition: all var(--transition);
}
.top-bar-right a:hover { background: var(--accent); color: var(--bg-dark); }
.lang-switch {
    display: inline-flex;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    overflow: hidden;
    margin-left: 8px;
}
.lang-switch button {
    padding: 3px 12px;
    color: rgba(255,255,255,.85);
    font-size: 0.75rem;
    font-weight: 600;
}
.lang-switch button.active { background: var(--accent); color: var(--bg-dark); }

/* ---------- Header ---------- */
.site-header {
    position: relative;
    z-index: 50;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--brand);
    flex-shrink: 0;
}
.logo-mark {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(11,61,145,.28);
}
.logo-mark svg { width: 28px; height: 28px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-title {
    font-family: var(--ff-serif);
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--brand);
    letter-spacing: 0.08em;
}
.logo-sub {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    border-radius: 8px;
    transition: all var(--transition);
    position: relative;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand); background: rgba(11,61,145,.06); }
.main-nav a.active::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
}
.main-nav .fa-chevron-down { font-size: 0.65rem; opacity: .6; }

.has-dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: 100%; left: 0;
    min-width: 240px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    display: block !important;
    border: 1px solid var(--line);
}
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li { display: block; }
.dropdown a {
    display: block;
    padding: 10px 14px;
    width: 100%;
    border-radius: 6px;
}
.dropdown a:hover { background: var(--bg-soft); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    color: var(--text);
    background: var(--bg-soft);
    transition: all var(--transition);
}
.icon-btn:hover { background: var(--brand); color: white; }
.menu-toggle { display: none; }

/* Search panel */
.search-panel {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.search-panel.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.search-panel form {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 12px 18px;
}
.search-panel .fa-magnifying-glass { color: var(--muted); }
.search-panel input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: var(--text);
    font-family: inherit;
}
.close-search {
    width: 32px; height: 32px;
    border-radius: 50%;
    color: var(--muted);
    transition: all var(--transition);
}
.close-search:hover { background: var(--line); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: clamp(460px, 62vh, 620px);
    overflow: hidden;
}
.hero-slider { height: 100%; position: relative; }
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    color: white;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at left center, rgba(0,0,0,.35), rgba(0,0,0,.15));
    pointer-events: none;
}
.hero-content {
    position: relative;
    max-width: 720px;
    z-index: 2;
    animation: heroFade .8s ease both;
}
@keyframes heroFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent);
    color: var(--bg-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: 20px;
    margin-bottom: 18px;
}
.hero-content h1 {
    color: white;
    font-family: var(--ff-serif);
    margin-bottom: 18px;
    text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero-content p {
    font-size: 1.05rem;
    max-width: 620px;
    color: rgba(255,255,255,.92);
    margin-bottom: 26px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
    transition: all var(--transition);
}
.hero-arrow:hover { background: white; color: var(--brand); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }

.hero-dots {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.hero-dots button {
    width: 32px; height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,.4);
    transition: all var(--transition);
}
.hero-dots button.active { background: white; width: 48px; }

/* ---------- Buttons (unified token system) ----------
   Variants: primary (navy filled), ghost (transparent on dark), outline (navy border), white (on dark bg)
   All flat (--r-none) by default. Pill variant via .btn-pill. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: 10px 18px;
    font-family: var(--ff-sans);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semi);
    letter-spacing: 0.01em;
    border-radius: var(--r-none);
    transition: background-color var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}
.btn-primary { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.btn-primary:hover { background: var(--c-brand-light); border-color: var(--c-brand-light); }
.btn-gold { background: var(--c-gold); color: var(--c-brand-deep); border-color: var(--c-gold); }
.btn-gold:hover { background: var(--c-gold-light); border-color: var(--c-gold-light); }
.btn-outline { background: transparent; color: var(--c-brand); border-color: var(--c-brand); }
.btn-outline:hover { background: var(--c-brand); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: #fff; color: var(--c-brand); border-color: #fff; }
.btn-ghost.light { color: #fff; }
.btn-white { background: #fff; color: var(--c-brand); border-color: #fff; }
.btn-white:hover { background: var(--c-gold); color: var(--c-brand-deep); border-color: var(--c-gold); }
.btn-pill { border-radius: var(--r-pill); padding: 10px 22px; }
.btn-sm { padding: 6px 12px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }

/* ---------- Quick services ---------- */
.quick-services {
    position: relative;
    margin-top: -40px;
    z-index: 5;
    padding-bottom: 40px;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}
.service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    transition: all var(--transition);
    border: 1px solid transparent;
}
.service-card:hover {
    background: var(--bg-soft);
    border-color: var(--line);
    transform: translateY(-3px);
}
.service-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(11,61,145,.1), rgba(26,95,180,.15));
    color: var(--brand);
    font-size: 1.3rem;
    flex-shrink: 0;
}
.service-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.service-info p { font-size: 0.78rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 34px;
    gap: 16px;
    flex-wrap: wrap;
}
.see-all, .see-all-sm {
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap var(--transition);
}
.see-all:hover, .see-all-sm:hover { gap: 12px; }
.see-all-sm { font-size: 0.82rem; }

/* ---------- News ---------- */
.news-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 4px;
}
.tab {
    padding: 8px 18px;
    border-radius: 30px;
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
}
.tab:hover { color: var(--brand); }
.tab.active { background: var(--brand); color: white; }

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 22px;
    min-height: 520px;
}
.news-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: all var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card.featured {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
}
.news-card.featured .news-img { height: 60%; min-height: 300px; }
.news-card.featured h3 { font-size: var(--fs-lg); }
.news-img {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
}
.news-cat {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(255,255,255,.95);
    color: var(--brand);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.news-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.news-meta {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.news-meta i { margin-right: 4px; }
.news-body h3 { margin-bottom: 10px; font-size: var(--fs-md); }
.news-body p { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; flex: 1; }
.read-more {
    color: var(--brand);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    transition: gap var(--transition);
}
.read-more:hover { gap: 10px; }

/* ---------- Stats ---------- */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--bg-dark), #14276b);
    color: white;
    position: relative;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0 L40 80 M0 40 L80 40' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.6;
}
.stats-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat { padding: 8px; }
.stat-icon {
    width: 60px; height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(201,162,39,.15);
    color: var(--accent-warm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.stat-num {
    font-size: 2.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 6px;
    font-family: var(--ff-serif);
}
.stat-label {
    color: rgba(255,255,255,.75);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ---------- Two col: chairman + sessions ---------- */
.two-col { background: var(--bg-soft); }
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
}
.chairman-card, .sessions-panel {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.chairman-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.chairman-photo {
    position: relative;
    flex-shrink: 0;
}
.photo-placeholder {
    width: 140px; height: 170px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    box-shadow: 0 8px 24px rgba(11,61,145,.25);
}
.chairman-badge {
    position: absolute;
    bottom: -10px; right: -10px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-dark);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(201,162,39,.35);
}
.chairman-info h3 {
    font-family: var(--ff-serif);
    font-size: 1.5rem;
    margin-bottom: 4px;
}
.chairman-role {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 14px;
}
.chairman-info blockquote {
    background: var(--bg-soft);
    padding: 14px 16px 14px 40px;
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 0.92rem;
    color: var(--text);
    position: relative;
    margin-bottom: 18px;
}
.chairman-info blockquote i {
    position: absolute;
    left: 14px; top: 14px;
    color: var(--accent);
    font-size: 1rem;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}
.session-list li {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.session-list li:last-child { border-bottom: none; }
.session-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: white;
    padding: 8px;
    border-radius: 10px;
    text-align: center;
}
.session-date .day { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.session-date .month { font-size: 0.7rem; opacity: .9; margin-top: 2px; }
.session-info h4 { font-size: 0.98rem; margin-bottom: 4px; }
.session-info p { color: var(--muted); font-size: 0.82rem; }
.session-info i { color: var(--brand); margin-right: 4px; }
.session-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.session-status.upcoming { background: rgba(201,162,39,.15); color: #7a5f10; }
.session-status.scheduled { background: rgba(11,61,145,.1); color: var(--brand); }

/* ---------- Docs table ---------- */
.docs-section { background: white; }
.docs-table-wrap {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.docs-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}
.docs-table th {
    background: var(--bg-soft);
    padding: 16px 20px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.docs-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table tbody tr { transition: background var(--transition); }
.docs-table tbody tr:hover { background: var(--bg-soft); }
.docs-table td:first-child { font-weight: 700; color: var(--brand); }
.docs-table td:last-child a {
    display: inline-flex;
    width: 32px; height: 32px;
    align-items: center; justify-content: center;
    border-radius: 6px;
    color: var(--muted);
    margin-right: 4px;
    transition: all var(--transition);
}
.docs-table td:last-child a:hover { background: var(--brand); color: white; }
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tag.blue { background: rgba(11,61,145,.1); color: var(--brand); }
.tag.green { background: rgba(26,95,63,.1); color: var(--green); }
.tag.orange { background: rgba(201,130,26,.12); color: #a56c0e; }

/* ---------- CTA ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(201,162,39,.2), transparent 60%);
    border-radius: 50%;
}
.cta-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.cta-text h2 {
    color: white;
    font-family: var(--ff-serif);
    margin-bottom: 8px;
}
.cta-text p { color: rgba(255,255,255,.85); max-width: 560px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,.75);
    padding-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 12px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 30px; height: 2px;
    background: var(--accent);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    font-size: 0.9rem;
    transition: all var(--transition);
}
.footer-col ul a:hover { color: var(--accent-warm); padding-left: 4px; }
.footer-col.about .logo { margin-bottom: 16px; }
.footer-col.about .logo-title { color: white; }
.footer-col.about .logo-sub { color: rgba(255,255,255,.6); }
.footer-col.about p { font-size: 0.9rem; margin-bottom: 18px; }
.socials { display: flex; gap: 10px; }
.socials a {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: white;
    transition: all var(--transition);
}
.socials a:hover { background: var(--accent); color: var(--bg-dark); transform: translateY(-3px); }
.contact-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    margin-bottom: 12px;
}
.contact-list i { color: var(--accent-warm); margin-top: 4px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
    font-size: 0.85rem;
}
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--accent-warm); }

/* ---------- Scroll top ---------- */
.scroll-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--brand-dark); transform: translateY(-4px); }

/* ============================
   Responsive
   ============================ */
@media (max-width: 1100px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    .news-card.featured { grid-column: 1 / 3; grid-row: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .main-nav {
        position: fixed;
        top: 0; right: -320px;
        width: 300px;
        height: 100vh;
        background: white;
        padding: 80px 20px 24px;
        box-shadow: -8px 0 30px rgba(0,0,0,.15);
        transition: right var(--transition);
        overflow-y: auto;
        z-index: 200;
    }
    .main-nav.open { right: 0; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
    .main-nav a { padding: 12px 16px; }
    .main-nav a.active::after { display: none; }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        border: none;
    }
    .menu-toggle { display: inline-flex; }
    .two-col-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .cta-inner { text-align: center; justify-content: center; }
    .cta-actions { justify-content: center; }
    .top-bar-left span:not(:first-child) { display: none; }
}

@media (max-width: 640px) {
    .container { padding: 0 18px; }
    .section { padding: 50px 0; }
    .services-grid { grid-template-columns: 1fr 1fr; padding: 14px; gap: 10px; }
    .service-card { padding: 12px; }
    .service-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .news-grid { grid-template-columns: 1fr; }
    .news-card.featured { grid-column: auto; }
    .news-card.featured .news-img { min-height: 200px; }
    .chairman-card { flex-direction: column; align-items: center; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .hero-arrow { width: 40px; height: 40px; }
    .hero-arrow.prev { left: 12px; }
    .hero-arrow.next { right: 12px; }
    .top-bar-left span:not(:first-child) { display: inline-flex; }
    .top-bar { font-size: 0.75rem; }
    .top-bar-left, .top-bar-right { gap: 10px; }
    .stats-grid { gap: 18px; }
    .stat-num { font-size: 2.2rem; }
}

/* Mobile menu — click-to-open dropdowns (overrides earlier "always visible" block) */
@media (max-width: 900px) {
    .main-nav .has-dropdown > a::after {
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-left: auto;
        font-size: 0.7rem;
        transition: transform .2s ease;
        opacity: .6;
    }
    .main-nav .has-dropdown.is-open > a::after { transform: rotate(180deg); }
    .main-nav .has-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .main-nav .has-dropdown .dropdown { display: none !important; }
    .main-nav .has-dropdown.is-open .dropdown {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* ============================
   Mobile nav drawer — visible X close + body overlay
   ============================ */
.nav-close { display: none; }

@media (max-width: 900px) {
    .main-nav .nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: var(--bg-soft, #f3f4f6);
        color: var(--brand, #0b3d91);
        font-size: 1.1rem;
        cursor: pointer;
        z-index: 2;
        transition: background .15s ease;
    }
    .main-nav .nav-close:hover { background: var(--brand, #0b3d91); color: #fff; }

    body.nav-open { overflow: hidden; }
    .main-nav.open { z-index: 300 !important; }
}

/* ============================
   #3 — Mobile top-bar (date, phone, email, social) — төвлөрүүлсэн + эвтээхэн
   ============================ */
@media (max-width: 720px) {
    .top-bar { font-size: 0.72rem; padding: 6px 0; }
    .top-bar .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 12px;
        text-align: center;
    }
    .top-bar-left,
    .top-bar-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 14px;
    }
    .top-bar a,
    .top-bar span { white-space: nowrap; }
    /* Утас дээр имэйл, огноо нуух сонголттой — social icon л төвд үлдээе */
    .top-bar-left > span.date-text,
    .top-bar-left > a.email-text {
        /* Хэрэв админ нэр нэмсэн бол тохиромжтой */
    }
    /* Social icons жижигхэн, цэвэрхэн */
    .top-bar .social a {
        width: 26px;
        height: 26px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
    }
}
@media (max-width: 480px) {
    .top-bar { padding: 5px 0; }
    .top-bar .container { gap: 4px 10px; font-size: 0.68rem; }
    .top-bar-left > *:not(:first-child):not(.social *) { display: none; }  /* Зөвхөн эхний info + social */
}

/* ============================
   #4 — Hero title фонт/хэмжээ утас дээр оновчтой
   ============================ */
@media (max-width: 720px) {
    .top-news .tn-slide h1,
    .top-news h1,
    .hero h1,
    .tn-headline {
        font-size: clamp(1.1rem, 3.6vw, 1.6rem) !important;
        line-height: 1.22 !important;
        font-weight: 800 !important;
        letter-spacing: -0.005em;
    }
    .top-news .tn-slide p,
    .tn-intro {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .tn-actions { flex-wrap: wrap; gap: 8px; }
    .tn-actions .btn { font-size: 0.82rem; padding: 10px 14px; }
}
@media (max-width: 480px) {
    .top-news .tn-slide h1,
    .tn-headline {
        font-size: clamp(1rem, 4vw, 1.3rem) !important;
        -webkit-line-clamp: 4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ============================
   #5 — Card border-radius багасгах / mobile эвтээхэн болгох
   ============================ */
@media (max-width: 720px) {
    .card,
    .tn-card,
    .lesson-card,
    .latest-news-card,
    .fund-col,
    .forum-panel,
    .poll-panel,
    .article-card,
    .search-result-item,
    .sidebar-card,
    .news-card,
    .stat-card {
        border-radius: 12px !important;
    }
    .geo-panel.floating { border-radius: 14px !important; }
    .rfm-item { border-radius: 10px !important; }
    .btn { border-radius: 10px !important; }
    /* Card-ийн padding утас дээр багасгах */
    .card, .lesson-card, .article-card, .sidebar-card, .forum-panel, .poll-panel {
        padding: 16px !important;
    }
    /* Grid gap багасгах */
    .cards-grid, .news-list, .latest-news-list, .lessons-grid, .fund-grid {
        gap: 12px !important;
    }
}

/* ============================
   #6 — Хайлтын хуудас (search_home) сайжруулах
   ============================ */
.search-hero {
    background: linear-gradient(135deg, var(--brand, #0b3d91), var(--brand-light, #1a5fb4));
    color: #fff;
    padding: 28px 0;
    margin-bottom: 20px;
    border-radius: 0 0 20px 20px;
}
.search-hero h1,
.search-hero .search-title {
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
}
.search-hero .search-meta {
    color: rgba(255,255,255,.85);
    font-size: 0.88rem;
}
.search-hero .search-meta strong { color: var(--accent-gold, #c9a227); font-weight: 800; }

/* Search input (results хуудсан дээр хайлт үргэлжлүүлэх) */
.search-form-inline {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    max-width: 640px;
}
.search-form-inline input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    outline: none;
    background: rgba(255,255,255,.95);
    color: var(--text, #1a1f2e);
}
.search-form-inline button {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    background: var(--accent-gold, #c9a227);
    color: var(--national-deep, #061b45);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* Result tabs (Бүгд / Тогтоол / Төлөөлөгч) */
.search-result-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-soft, #f3f4f6);
    border-radius: 12px;
    margin-bottom: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.search-result-tabs .tab {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted, #6b7280);
    white-space: nowrap;
    text-decoration: none;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.search-result-tabs .tab.active {
    background: var(--brand, #0b3d91);
    color: #fff;
    box-shadow: 0 2px 6px rgba(11,61,145,.25);
}
.search-result-tabs .tab .tab-count {
    background: rgba(0,0,0,.08);
    padding: 1px 7px;
    font-size: 0.72rem;
    border-radius: 999px;
    font-weight: 700;
}
.search-result-tabs .tab.active .tab-count {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* Result items — илүү уншихад боломжтой */
.search-result-item {
    display: block;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 14px;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    transition: all .15s ease;
}
.search-result-item:hover {
    border-color: var(--brand, #0b3d91);
    box-shadow: 0 6px 20px rgba(11,61,145,.1);
    transform: translateY(-1px);
}
.search-result-item .result-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #1a1f2e);
    margin: 0 0 6px;
    line-height: 1.35;
}
.search-result-item .result-meta {
    font-size: 0.78rem;
    color: var(--muted, #6b7280);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.search-result-item .result-meta i { color: var(--brand, #0b3d91); margin-right: 3px; }

/* Empty state */
.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted, #6b7280);
}
.search-empty i {
    font-size: 2.5rem;
    color: var(--line, #e5e7eb);
    display: block;
    margin-bottom: 10px;
}

/* Mobile search */
@media (max-width: 640px) {
    .search-hero { padding: 20px 0; border-radius: 0 0 14px 14px; }
    .search-hero h1 { font-size: 1.3rem; }
    .search-form-inline { flex-direction: column; }
    .search-form-inline button { width: 100%; }
    .search-result-tabs { padding: 3px; margin-bottom: 14px; }
    .search-result-tabs .tab { padding: 7px 10px; font-size: 0.78rem; }
    .search-result-item { padding: 14px 14px; border-radius: 12px; }
    .search-result-item .result-title { font-size: 0.92rem; }
}

/* ============================
   Article body iframe (YouTube, Vimeo гэх мэт) responsive хийх
   HTML-д width=560 height=314 хатуу бичсэн ч mobile-д багтаана.
   ============================ */
.prose iframe,
.article-body iframe,
.sub-prose iframe {
    max-width: 100% !important;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    display: block;
    margin: 16px auto;
    border: 0;
    border-radius: 10px;
    background: #000;
}

/* YouTube/Vimeo iframe ихэвчлэн <p><span><iframe></span></p> дотор ордог —
   span-д inline-block байдал тохируулж, iframe-ийг бүтэн өргөнд гаргая */
.prose p span:has(> iframe),
.article-body p span:has(> iframe),
.sub-prose p span:has(> iframe) {
    display: block;
    width: 100%;
    background: transparent !important;
}
.prose p:has(> iframe),
.prose p:has(> span > iframe),
.article-body p:has(> iframe),
.sub-prose p:has(> iframe) {
    text-align: center !important;
}

/* Prose child-үүдийн inline style-г утас дээр дарах — хатуу width, min-width гэх мэт */
@media (max-width: 720px) {
    .prose *, .article-body *, .sub-prose * {
        max-width: 100% !important;
    }
    .prose iframe, .article-body iframe, .sub-prose iframe {
        min-height: 200px;
    }
}

/* ============================
   Polls page — mobile сайжруулалт
   ============================ */
@media (max-width: 720px) {
    .poll-card {
        padding: 14px !important;
        border-radius: 12px !important;
    }
    .poll-card-head {
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        gap: 10px !important;
        align-items: start !important;
        padding-bottom: 12px !important;
    }
    .poll-number {
        width: 38px !important;
        height: 38px !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
    }
    .poll-card-title-wrap { min-width: 0; }
    .poll-status-line {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 6px;
    }
    .forum-badge { font-size: 0.65rem !important; padding: 3px 8px !important; }
    .poll-date-chip { font-size: 0.68rem !important; }
    .poll-question {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    /* Нийт санал block — доош нь шилжүүлэх */
    .poll-total {
        grid-column: 1 / -1;
        text-align: center;
        border-top: 1px solid var(--line, #e5e7eb);
        border-left: none !important;
        padding: 10px 0 0 !important;
        margin-top: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .poll-total strong { font-size: 1.3rem !important; }
    .poll-total span { font-size: 0.65rem !important; }

    /* Answers — илүү компакт */
    .poll-answer-row {
        display: flex !important;
        flex-wrap: wrap;
        gap: 4px 8px;
        align-items: center;
        margin-bottom: 6px;
    }
    .poll-answer-name {
        font-size: 0.85rem !important;
        flex: 1 1 auto;
        min-width: 0;
    }
    .poll-answer-stats {
        display: inline-flex;
        align-items: baseline;
        gap: 4px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .poll-answer-stats strong { font-size: 0.9rem; }
    .poll-answer-count { font-size: 0.7rem !important; opacity: .8; }

    .poll-answer-bar { height: 8px !important; }

    .poll-card-foot {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .poll-card-foot .btn { width: 100%; justify-content: center; }
    .poll-live-hint { font-size: 0.82rem; }

    /* Урт URL дотор дэх мэдээлэл (googledocs линк гэх мэт) */
    .poll-question *,
    .poll-no-questions * {
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }
}

/* ============================
   Footer menus — mobile ширхэглэсэн, уншихад эвтэй
   ============================ */
@media (max-width: 720px) {
    .footer-grid,
    .site-footer .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        text-align: center;
    }
    .footer-col h4,
    .site-footer h4 {
        font-size: 0.9rem !important;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        margin-bottom: 10px !important;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,.1);
    }
    .footer-col ul,
    .site-footer ul {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }
    .footer-col ul a,
    .site-footer ul a {
        font-size: 0.85rem !important;
        padding: 4px 0;
        display: inline-block;
    }
    .footer-col.about,
    .site-footer .about {
        text-align: center;
    }
    .footer-col.about .logo,
    .site-footer .about .logo {
        justify-content: center;
    }
    .footer-descr,
    .footer-col.about p {
        font-size: 0.82rem !important;
        padding: 0 10px;
    }
    .socials,
    .footer-socials {
        justify-content: center !important;
        gap: 10px;
    }
    .footer-socials a,
    .socials a {
        width: 36px !important;
        height: 36px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255,255,255,.08);
    }
    /* Contact info group */
    .footer-col address,
    .site-footer address {
        font-style: normal;
        font-size: 0.85rem;
        line-height: 1.6;
    }
    .footer-copy,
    .site-footer .copyright {
        font-size: 0.72rem !important;
        padding: 14px 0 !important;
    }
    /* Доод geo bar-ийг тооцсон bottom padding — footer давхарлахгүй байхын тулд */
    .site-footer { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0)) !important; }
}
@media (max-width: 480px) {
    .footer-col h4,
    .site-footer h4 { font-size: 0.82rem !important; }
    .footer-col ul a,
    .site-footer ul a { font-size: 0.8rem !important; }
}

/* ============================
   Санд (san/surgalt/turshlaga) дэлгэрэнгүй хуудас — mobile сайжруулалт
   ============================ */
@media (max-width: 960px) {
    .page-with-sidebar { gap: 20px !important; }
}
@media (max-width: 720px) {
    /* Page title утас дээр багасгах */
    .page-main h1,
    .page-with-sidebar h1 {
        font-size: clamp(1.1rem, 4vw, 1.5rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 14px !important;
    }

    /* Breadcrumb утас дээр compact */
    .page-breadcrumbs {
        font-size: 0.72rem !important;
        flex-wrap: wrap;
        gap: 3px 0;
        margin-bottom: 10px !important;
    }
    .page-breadcrumbs a,
    .page-breadcrumbs span { white-space: nowrap; }
    .page-breadcrumbs .sep { margin: 0 6px !important; }

    /* Article meta items утас дээр compact + 2 column grid wrap */
    .article-meta {
        flex-wrap: wrap;
        gap: 8px 14px !important;
        padding: 10px 0 !important;
        margin-bottom: 20px !important;
        font-size: 0.78rem !important;
    }

    /* Prose body — утас дээр блоквот indent хасах */
    .prose blockquote,
    .prose > blockquote {
        margin: 12px 0 !important;
        padding: 12px 14px !important;
        border-left: 3px solid var(--c-brand, #0b3d91) !important;
        background: var(--c-bg-soft, #f7f8fb);
        font-style: italic;
        border-radius: 0 10px 10px 0;
        font-size: 0.88rem !important;
        line-height: 1.6 !important;
    }

    /* Хавсралт block padding багасгах */
    .page-main > div[style*="background: var(--c-bg-soft)"] {
        padding: 14px !important;
    }

    /* Файл линк — илүү tap-friendly */
    .page-main a[href][target="_blank"] {
        padding: 10px 12px !important;
        min-height: 44px;
    }

    /* Буцах товч утас дээр full-width */
    .page-main .btn.btn-outline {
        width: 100%;
        justify-content: center;
    }

    /* Sidebar section (section_sidebar partial) */
    .page-sidebar {
        margin-top: 20px;
    }

    /* Sidebar items */
    .section-sidebar,
    .page-sidebar .sidebar-card {
        border-radius: 12px !important;
    }
    .section-sidebar .sidebar-head,
    .page-sidebar .sidebar-head {
        padding: 12px 14px !important;
        font-size: 0.85rem !important;
    }
    .section-sidebar .sidebar-item,
    .page-sidebar .sidebar-item {
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
    }
}

/* ============================
   Home page — mobile layout fixes
   Multi-column sections утас дээр stack хийх
   ============================ */
@media (max-width: 960px) {
    .funds-grid,
    .experience-grid,
    .home-dual-col {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 720px) {
    .fund-col,
    .fund-col.accent-col {
        padding: 16px !important;
        border-radius: 12px !important;
    }
    .fund-head h3 {
        font-size: 1.05rem !important;
        margin-bottom: 4px !important;
    }
    .fund-head p { font-size: 0.82rem; }

    .fund-row {
        grid-template-columns: 60px 1fr auto !important;
        padding: 10px !important;
        gap: 10px !important;
    }
    .fund-thumb {
        width: 60px !important;
        height: 50px !important;
    }
    .fund-info { min-width: 0; }
    .fund-info h4 {
        font-size: 0.82rem !important;
        line-height: 1.3 !important;
        margin-bottom: 2px !important;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .fund-info p {
        font-size: 0.72rem !important;
        line-height: 1.4 !important;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .fund-arrow { width: 28px !important; height: 28px !important; font-size: 0.8rem; }

    .exp-row {
        grid-template-columns: 70px 1fr !important;
        gap: 10px !important;
        padding: 8px !important;
    }

    /* "Бүх сан үзэх" / "Бүх туршлага" товч — full width */
    .fund-col .btn,
    .fund-col a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Latest news section — card list compact */
    .latest-news-card,
    .latest-news-list .latest-news-card {
        display: grid !important;
        grid-template-columns: 90px 1fr !important;
        gap: 10px !important;
        padding: 10px !important;
        align-items: start;
    }
    .latest-news-card .latest-news-thumb,
    .latest-news-card img {
        width: 90px !important;
        height: 68px !important;
        object-fit: cover;
        border-radius: 8px;
    }
    .latest-news-card .latest-news-meta { font-size: 0.68rem; }
    .latest-news-card h4 {
        font-size: 0.82rem !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Media cards (Фото мэдээ / Дүрстэй мэдээ) — single column */
    .media-grid,
    .photo-news-grid,
    .video-news-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .media-card {
        border-radius: 12px !important;
    }
    .media-card .media-cat {
        font-size: 0.65rem;
    }
    .media-card h4 {
        font-size: 0.88rem !important;
        line-height: 1.3 !important;
    }

    /* Lesson cards (Төлөөлөгч, иргэдэд зориулсан хичээл) */
    .lessons-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .lesson-card {
        display: grid !important;
        grid-template-columns: 110px 1fr !important;
        gap: 12px !important;
        padding: 10px !important;
    }
    .lesson-card img,
    .lesson-card .lesson-thumb {
        width: 110px !important;
        height: 80px !important;
        object-fit: cover;
        border-radius: 8px;
    }
    .lesson-card h4 {
        font-size: 0.88rem !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Section head utas дээр tightened */
    .section-head,
    .block-head,
    .home-block-head {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 6px 14px;
        margin-bottom: 14px !important;
    }
    .section-head h2,
    .block-head h2 {
        font-size: 1.15rem !important;
        margin: 0 !important;
    }
    .section-head .see-all,
    .block-head .see-all {
        font-size: 0.78rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .fund-info h4 { font-size: 0.78rem !important; }
    .fund-info p { font-size: 0.68rem !important; }
    .lesson-card { grid-template-columns: 90px 1fr !important; }
    .lesson-card img,
    .lesson-card .lesson-thumb { width: 90px !important; height: 68px !important; }
    .latest-news-card { grid-template-columns: 80px 1fr !important; }
    .latest-news-card .latest-news-thumb,
    .latest-news-card img { width: 80px !important; height: 60px !important; }
}

/* ============================
   Footer about section — mobile center + бүтэн өргөн
   ============================ */
@media (max-width: 720px) {
    .footer-col.about,
    .site-footer .about {
        text-align: center;
        max-width: 100%;
    }
    .footer-col.about .logo,
    .site-footer .about .logo {
        justify-content: center !important;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
    }
    .footer-col.about .logo-text,
    .site-footer .about .logo-text {
        text-align: left;
    }
    .footer-col.about .footer-descr,
    .footer-col.about p,
    .site-footer .about .footer-descr,
    .site-footer .about p {
        max-width: 100%;
        padding: 0 10px;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.82rem !important;
        line-height: 1.55;
        color: rgba(255,255,255,.75);
    }
}

/* ============================
   Fund-row (Бусад аймгийн туршлагаас, Орон нутгийн судалгаа) — 
   admin-ийн inline color span-уудыг хүчээр dar дарж card-ийн ижил өнгөтэй болгох
   ============================ */
.fund-col.accent-col .fund-row,
.fund-col.accent-col .fund-row * {
    color: inherit !important;
}
.fund-col.accent-col .fund-row h4,
.fund-col.accent-col .fund-row h4 *,
.fund-col.accent-col .fund-row p,
.fund-col.accent-col .fund-row p *,
.fund-col.accent-col .fund-info h4,
.fund-col.accent-col .fund-info h4 *,
.fund-col.accent-col .fund-info p,
.fund-col.accent-col .fund-info p * {
    color: #fff !important;
    background: transparent !important;
    font-weight: inherit !important;
}
.fund-col.accent-col .fund-row p,
.fund-col.accent-col .fund-row p * {
    color: rgba(255,255,255,.75) !important;
}

/* Non-accent fund-col (цагаан background) мөн адил — inline color span дардаг */
.fund-col:not(.accent-col) .fund-row h4,
.fund-col:not(.accent-col) .fund-row h4 *,
.fund-col:not(.accent-col) .fund-info h4,
.fund-col:not(.accent-col) .fund-info h4 * {
    color: var(--c-text, #1a1f2e) !important;
    background: transparent !important;
}
.fund-col:not(.accent-col) .fund-row p,
.fund-col:not(.accent-col) .fund-row p *,
.fund-col:not(.accent-col) .fund-info p,
.fund-col:not(.accent-col) .fund-info p * {
    color: var(--c-muted, #6b7280) !important;
    background: transparent !important;
}

/* Fund thumb background-image зөв дүүргэх */
.fund-thumb {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: rgba(255,255,255,.1);
    border-radius: 8px;
}
.fund-col:not(.accent-col) .fund-thumb {
    background-color: var(--c-line, #e5e7eb);
}

/* ============================
   Latest news card — заавал ил харагдах хил + background
   ============================ */
.latest-news-card,
.latest-news-list .latest-news-card {
    background: #fff;
    border: 1px solid var(--c-line, #e5e7eb);
    border-radius: 12px;
    transition: all .15s ease;
}
.latest-news-card:hover,
.latest-news-list .latest-news-card:hover {
    border-color: var(--c-brand, #0b3d91);
    box-shadow: 0 4px 14px rgba(11,61,145,.08);
}

@media (max-width: 720px) {
    .latest-news-list,
    .latest-news-grid,
    .news-list {
        display: flex !important;
        flex-direction: column;
        gap: 10px !important;
    }
    .latest-news-card {
        border: 1px solid var(--c-line, #e5e7eb) !important;
        box-shadow: 0 1px 3px rgba(0,0,0,.04);
    }
}

/* ============================
   Card баруун талын булангуудыг заавал дугуйрсан харагдуулах
   overflow: hidden + border-radius inherit хүүхэд контентэд дамжуулна
   ============================ */
.latest-news-card,
.latest-news-list .latest-news-card,
.news-card,
.lesson-card,
.media-card {
    overflow: hidden !important;
    border-radius: 12px !important;
}
.latest-news-card > *,
.latest-news-list .latest-news-card > *,
.news-card > *,
.lesson-card > *,
.media-card > * {
    border-radius: 0;
}

/* ============================
   Card баруун тал clipped болохыг зогсоох
   body overflow-x: hidden-ээс болж viewport ирмэг рүү нийлсэн card-ийн right border clip болдог.
   .container padding хангалтгүй эсвэл card-ууд direct child бол — margin/padding нэмэх.
   ============================ */
@media (max-width: 720px) {
    /* Container хоёр талаасаа padding-тай байх — card-ууд viewport-ээс жаахан дотогш орно */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Latest news list contain-д дотогшоо padding — card-ууд ирмэгээс ядаж 1px зайтай */
    .latest-news-list,
    .latest-news-grid,
    .news-list,
    .news-grid,
    .lessons-grid,
    .media-grid,
    .photo-news-grid,
    .video-news-grid,
    .funds-grid {
        padding-left: 1px;
        padding-right: 1px;
    }

    /* Card-уудад box-sizing зөв + width: auto (100% биш) */
    .latest-news-card,
    .news-card,
    .lesson-card,
    .media-card,
    .fund-col {
        box-sizing: border-box;
        width: auto !important;
        max-width: 100%;
    }
}

/* ============================
   Main banner carousel (home дээр эхэнд харагдах)
   ============================ */
/* Banner section — тусгаарлагч зөөлөн зай; өөрийн bg-гүй, top-news (cream) ↔ latest-news (white) хооронд bridge */
.main-banner-section {
    padding: 20px 0;
    background: transparent !important;
}
.main-banner-carousel {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: var(--c-brand-deep, #061b45);
    box-shadow: 0 6px 24px rgba(6, 27, 69, .12);
    width: 100%;
    height: 150px;
    max-height: 150px;
}
.main-banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}
.main-banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.main-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
    position: relative;
}
.main-banner-img {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: var(--c-brand-deep, #061b45);
}
/* Caption-гүй banner (гарчиг, тайлбаргүй) дээр gradient overlay хасах */
.main-banner-slide:has(.main-banner-caption) .main-banner-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(6,27,69,.6) 0%,
        rgba(6,27,69,.3) 50%,
        rgba(6,27,69,0) 100%);
}
.main-banner-placeholder {
    background: linear-gradient(135deg, var(--c-brand, #0b3d91), var(--c-brand-light, #1a5fb4));
}
.main-banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 36px;
    z-index: 1;
    max-width: 640px;
}
.main-banner-title {
    font-size: clamp(1.2rem, 2.4vw, 1.9rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.main-banner-descr {
    color: rgba(255,255,255,.9);
    font-size: 0.95rem;
    margin: 0 0 12px;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.main-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--c-gold, #c9a227);
    color: var(--c-brand-deep, #061b45);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    transition: all .15s ease;
}
.main-banner-link:hover .main-banner-cta {
    background: #fff;
    transform: translateX(4px);
}

/* Arrows */
.main-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background .15s ease;
}
.main-banner-arrow:hover { background: rgba(255,255,255,.35); }
.main-banner-arrow.prev { left: 16px; }
.main-banner-arrow.next { right: 16px; }

/* Dots */
.main-banner-dots {
    position: absolute;
    bottom: 14px;
    right: 24px;
    display: flex;
    gap: 6px;
    z-index: 3;
}
.main-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    padding: 0;
    transition: all .2s ease;
}
.main-banner-dot:hover { background: rgba(255,255,255,.7); }
.main-banner-dot.active {
    width: 24px;
    border-radius: 999px;
    background: var(--c-gold, #c9a227);
}

/* Mobile */
@media (max-width: 720px) {
    .main-banner-section { padding: 14px 0 4px; }
    .main-banner-carousel {
        height: 140px;
        max-height: 140px;
        border-radius: 12px;
    }
    .main-banner-caption { padding: 12px 14px; max-width: 100%; }
    .main-banner-title { font-size: 0.95rem; margin-bottom: 4px; }
    .main-banner-descr { font-size: 0.75rem; margin-bottom: 6px; -webkit-line-clamp: 1; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .main-banner-cta { padding: 5px 10px; font-size: 0.72rem; }
    .main-banner-arrow { width: 32px; height: 32px; font-size: 0.75rem; }
    .main-banner-arrow.prev { left: 8px; }
    .main-banner-arrow.next { right: 8px; }
    .main-banner-dots { bottom: 8px; right: 12px; }
}
