/* ============================
   KHURAL.MN — submain overrides
   - Switch all fonts to SF Pro Display
   - Uppercase + condensed menu items
   - Loaded LAST so it wins any specificity
   ============================ */

/* Force all text to SF Pro Display */
html, body,
h1, h2, h3, h4, h5, h6,
p, a, span, button, input, select, textarea, label,
.logo-title, .logo-sub,
.hero-tag, .hero h1, .hero p,
.section-head h2, .section-head h3,
.article-title, .article-meta-row,
.news-card h3, .news-card p,
.docs-table th, .docs-table td,
.rep-card h3, .rep-card p,
.chairman-info h3, .chairman-info p,
.panel-head h3,
.breadcrumb, .breadcrumb a,
.page-header h1, .page-header p,
.footer-grid h4, .footer-grid li, .footer-grid a,
.btn,
.tag,
.prose, .prose p, .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6, .prose li, .prose ol, .prose ul,
.sub-prose, .sub-prose *,
.eyebrow,
.service-info h4, .service-info p,
.stat-num, .stat-label,
.session-info h4, .session-info p,
.sidebar-card h4, .sidebar-card a, .sidebar-card li,
.tab, .tab-head button,
.filter-bar input, .filter-bar select,
.form-field label, .form-field input, .form-field textarea, .form-field select,
.search-panel input,
.top-bar, .top-bar span, .top-bar a,
.main-nav li a,
.dropdown li a {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* Global token override — anything using CSS var fonts gets SF Pro Display */
:root {
    --ff-sans:    "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    --ff-serif:   "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    --ff-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    --ff-mono:    "SF Mono", Menlo, Monaco, Consolas, monospace !important;
}

/* ============ Menu items — UPPERCASE + SF Pro Display + CENTERED ============ */
.main-nav,
.main-nav ul,
.main-nav li,
.main-nav li a,
.main-nav .dropdown,
.main-nav .dropdown li,
.main-nav .dropdown li a {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}
.main-nav > ul > li > a {
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-align: center !important;
    justify-content: center !important;
}

/* Dropdown menu items — also UPPERCASE for consistency */
.main-nav .dropdown li a {
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    font-weight: 500 !important;
    font-size: 0.82rem !important;
    text-align: left !important;
    justify-content: flex-start !important;
}

/* Section heads also condensed uppercase for institutional feel */
.section-head h2,
.panel-head h3 {
    letter-spacing: 0.01em;
}

/* Logo title stays uppercase (it already is) but condensed */
.logo-title {
    letter-spacing: 0.08em !important;
    font-weight: 700 !important;
}

/* Hero headline tightens with condensed font */
.hero h1,
.page-header h1,
.article-title {
    letter-spacing: -0.005em !important;
    font-weight: 700 !important;
}

/* Hero title — хэт том бичвэрийг зогсоох + урт гарчигт 3 мөр limit */
.hero-content h1 {
    font-size: clamp(1.3rem, 2.3vw, 2rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 14px !important;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
}
.hero-content h1 a {
    color: inherit;
    text-decoration: none;
    transition: opacity .15s ease;
}
.hero-content h1 a:hover { opacity: .9; }

.hero-content p {
    font-size: 0.95rem !important;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Eyebrow + tags keep letterspacing */
.eyebrow,
.hero-tag,
.tag {
    letter-spacing: 0.08em !important;
    font-weight: 600 !important;
}

/* ============================
   Right-fixed menu — Сумд / Дүүргүүд sites switcher
   ============================ */
.right-fixed-menu {
    position: fixed;
    right: 0;
    top: 40vh;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 90;
}
.rfm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    min-width: 76px;
    background: var(--brand, #0b3d91);
    color: #fff;
    border: none;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease-out;
    box-shadow: -2px 4px 14px rgba(11,61,145,.25);
}
.rfm-item + .rfm-item { margin-top: 4px; }
.rfm-item:hover,
.rfm-item.is-open {
    background: linear-gradient(135deg, var(--accent, #c9a227), var(--accent-warm, #e0b83a));
    color: var(--brand-dark, #061b45);
    transform: translateX(-4px);
}
.rfm-icon { font-size: 1.1rem; }
.rfm-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.rfm-count {
    background: rgba(255,255,255,.2);
    color: inherit;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
}
.rfm-item.is-open .rfm-count,
.rfm-item:hover .rfm-count { background: rgba(0,0,0,.12); }

@media (max-width: 720px) {
    .right-fixed-menu {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        flex-direction: row;
        justify-content: space-around;
        background: var(--brand, #0b3d91);
        padding: 8px;
        gap: 8px;
        box-shadow: 0 -4px 20px rgba(0,0,0,.2);
    }
    .rfm-item {
        flex: 1;
        min-width: 0;
        padding: 10px 6px;
        border-radius: 10px;
        box-shadow: none;
        background: transparent;
    }
    .rfm-item + .rfm-item { margin-top: 0; }
    .rfm-label { font-size: 0.68rem; }
}

/* Floating geo panels */
.geo-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,27,69,.6);
    z-index: 115;
    display: none;
}
.geo-panel-overlay.is-visible { display: block; }

.geo-panel.floating {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(820px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
    z-index: 120;
    overflow: hidden;
    flex-direction: column;
    padding: 0;
    display: none;
}
.geo-panel.floating:not([hidden]) { display: flex; }

.geo-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line, #e5e7eb);
    background: linear-gradient(90deg, var(--brand-dark, #061b45), var(--brand, #0b3d91));
    color: #fff;
}
.geo-panel-head h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.geo-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: 0.15s ease-out;
}
.geo-close:hover { background: var(--accent, #c9a227); color: var(--brand-dark, #061b45); }

.geo-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
    padding: 24px;
    overflow-y: auto;
}
.geo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-soft, #f7f8fb);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #1a1f2e);
    transition: 0.15s ease-out;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-height: 44px;
}
.geo-item > span,
.geo-item .geo-item-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.geo-item i {
    color: var(--muted, #6b7280);
    transition: 0.15s ease-out;
    flex: 0 0 auto;
}
.geo-item:hover {
    background: linear-gradient(135deg, var(--brand, #0b3d91), var(--brand-light, #1a5fb4));
    color: #fff;
    transform: translateX(2px);
}
.geo-item:hover i { color: #fff; transform: translateX(2px); }

@media (max-width: 720px) {
    .geo-panel-grid { grid-template-columns: 1fr 1fr; padding: 14px; gap: 8px; }
    .geo-panel.floating { width: calc(100vw - 16px); max-height: calc(100vh - 60px); }
    .geo-panel-head { padding: 14px 16px; }
    .geo-panel-head h3 {
        font-size: 0.9rem;
        letter-spacing: 0.02em;
        gap: 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
    .geo-item {
        padding: 10px 12px;
        font-size: 0.78rem;
        letter-spacing: 0.01em;
        min-height: 40px;
    }
    .geo-item i { font-size: 0.7rem; }
}

/* ============================
   .prose / .sub-prose — article body (news / forum / togtool / CV detail)
   Aggressive reset to neutralize MS Word / Google Docs inline styles pasted
   from Office into content.body. Content typically ships with inline
   font-family / font-size / color / background that break the design.
   ============================ */

.prose,
.sub-prose {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 1rem !important;
    line-height: 1.75 !important;
    color: var(--text, #1a1f2e) !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

/* Prose child-үүд контейнерээс халихгүй — Word/FB paste-ийн inline width, min-width хүчээр дарах */
.prose *,
.sub-prose * {
    max-width: 100% !important;
    min-width: 0 !important;
    width: auto !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}
.prose img, .prose video, .prose iframe,
.sub-prose img, .sub-prose video, .sub-prose iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 12px auto;
}
/* text-align: justify утасны нарийн экранд үг хооронд асар их зай үүсгэдэг → left */
@media (max-width: 640px) {
    .prose *, .sub-prose * {
        text-align: left !important;
    }
}

/* Force all children (Word <span style>, <font>, nested divs) to theme styles */
.prose *,
.prose p *,
.prose div *,
.prose span,
.prose font,
.sub-prose *,
.sub-prose p *,
.sub-prose div *,
.sub-prose span,
.sub-prose font {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    color: inherit !important;
    background-color: transparent !important;
    letter-spacing: normal !important;
}

/* Paragraphs — enforce our rhythm */
.prose p,
.prose div[style],
.prose div > span,
.sub-prose p,
.sub-prose div[style],
.sub-prose div > span {
    font-size: 1rem !important;
    line-height: 1.75 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    text-indent: 0 !important;
}

/* Headings in article body — SF Pro Display + brand color */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6,
.sub-prose h1, .sub-prose h2, .sub-prose h3, .sub-prose h4, .sub-prose h5, .sub-prose h6 {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    color: var(--brand, #0b3d91) !important;
    margin: 28px 0 10px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.prose h1, .sub-prose h1 { font-size: 1.75rem !important; }
.prose h2, .sub-prose h2 { font-size: 1.4rem !important; }
.prose h3, .sub-prose h3 { font-size: 1.2rem !important; }
.prose h4, .sub-prose h4,
.prose h5, .sub-prose h5,
.prose h6, .sub-prose h6 { font-size: 1.05rem !important; }

/* Emphasis */
.prose strong, .prose b,
.sub-prose strong, .sub-prose b {
    font-weight: 700 !important;
    color: inherit !important;
}
.prose em, .prose i,
.sub-prose em, .sub-prose i {
    font-style: italic;
    color: inherit !important;
}

/* Lists */
.prose ul, .prose ol,
.sub-prose ul, .sub-prose ol {
    margin: 0 0 16px 24px !important;
    padding: 0 !important;
}
.prose li,
.sub-prose li {
    margin-bottom: 8px !important;
    line-height: 1.75 !important;
    font-size: 1rem !important;
}
.prose ul li, .sub-prose ul li { list-style: disc !important; }
.prose ol li, .sub-prose ol li { list-style: decimal !important; }

/* Links */
.prose a,
.sub-prose a {
    color: var(--brand, #0b3d91) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}
.prose a:hover,
.sub-prose a:hover {
    color: var(--brand-light, #1a5fb4) !important;
}

/* Images — responsive + subtle border */
.prose img,
.sub-prose img {
    max-width: 100% !important;
    height: auto !important;
    margin: 16px 0 !important;
    border: 1px solid var(--line, #e5e7eb) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    display: block;
}

/* Blockquote */
.prose blockquote,
.sub-prose blockquote {
    border-left: 4px solid var(--brand, #0b3d91) !important;
    padding: 12px 20px !important;
    margin: 20px 0 !important;
    background: var(--bg-soft, #f7f8fb) !important;
    color: var(--muted, #6b7280) !important;
    font-style: italic;
    border-radius: 0 10px 10px 0;
}

/* Tables — clean rows */
.prose table,
.sub-prose table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 16px 0 !important;
    font-size: 0.95rem !important;
    background: transparent !important;
}
.prose th, .prose td,
.sub-prose th, .sub-prose td {
    border: 1px solid var(--line, #e5e7eb) !important;
    padding: 10px 12px !important;
    text-align: left !important;
    background: transparent !important;
}
.prose th,
.sub-prose th {
    background: var(--bg-soft, #f7f8fb) !important;
    font-weight: 700 !important;
    color: var(--brand, #0b3d91) !important;
}

/* Word/Docs noise classes — neutralize */
.prose .MsoNormal,
.prose .MsoListParagraph,
.prose .MsoListParagraphCxSpFirst,
.prose .MsoListParagraphCxSpMiddle,
.prose .MsoListParagraphCxSpLast,
.sub-prose .MsoNormal,
.sub-prose .MsoListParagraph,
.sub-prose .MsoListParagraphCxSpFirst,
.sub-prose .MsoListParagraphCxSpMiddle,
.sub-prose .MsoListParagraphCxSpLast {
    margin: 0 0 16px !important;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 1rem !important;
    color: inherit !important;
    background: transparent !important;
}
.prose o\:p,
.sub-prose o\:p { display: none !important; }

/* Kill inline backgrounds/colors/fonts from Word */
.prose [style*="background"],
.prose [style*="font-family"],
.prose [style*="font-size"],
.prose [style*="color"],
.sub-prose [style*="background"],
.sub-prose [style*="font-family"],
.sub-prose [style*="font-size"],
.sub-prose [style*="color"] {
    background-color: transparent !important;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    color: inherit !important;
}

/* Horizontal rule */
.prose hr,
.sub-prose hr {
    border: 0 !important;
    border-top: 1px solid var(--line, #e5e7eb) !important;
    margin: 24px 0 !important;
}

/* ============================
   CV / rep card — 4-per-row + portrait 3:4 photo
   ============================ */
.rep-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 18px !important;
}
.rep-card {
    background: #fff;
    border: 1px solid var(--line, #e5e7eb) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    text-decoration: none;
    color: inherit;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
    transition: all 0.2s ease-out;
}
.rep-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15,23,42,.1);
    border-color: var(--brand, #0b3d91) !important;
}
.rep-photo {
    aspect-ratio: 3/4 !important;           /* portrait */
    height: auto !important;
    background-size: cover !important;
    background-position: center top !important;
    background-color: var(--bg-soft, #f7f8fb);
    background-image: linear-gradient(135deg, var(--brand, #0b3d91), var(--brand-light, #1a5fb4));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.35);
    font-size: 3.2rem;
    position: relative;
}
.rep-info {
    padding: 14px 16px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rep-info h3 {
    font-size: 1rem !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    font-weight: 700 !important;
    color: var(--text, #1a1f2e);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rep-info .rep-role {
    color: var(--muted, #6b7280);
    font-size: 0.78rem !important;
    line-height: 1.4;
    margin: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rep-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.72rem;
    color: var(--muted, #6b7280);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--line, #e5e7eb);
}
.rep-meta i { color: var(--brand, #0b3d91); margin-right: 3px; font-size: 0.7rem; }

/* Responsive breakdown */
@media (max-width: 1100px) {
    .rep-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 720px) {
    .rep-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .rep-info { padding: 12px !important; }
    .rep-info h3 { font-size: 0.92rem !important; }
}
@media (max-width: 420px) {
    .rep-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================
   Combined article card — hero + body in one unified card
   (replaces the old 2-card layout)
   ============================ */
.article-combined {
    background: #fff;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.article-combined .article-hero-img {
    height: auto !important;             /* pages.css base-ийн 420px-ийг дарах */
    width: 100%;
    background: #f0f3f8;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.article-combined .article-hero-img img {
    display: block;
    width: 100%;                         /* landscape — бүтэн өргөнөөр дүүрэх */
    height: auto;
    max-height: 560px;                   /* portrait хэт өндөр болохоос хамгаалах */
    object-fit: contain;
}
.article-combined .article-hero-img--empty {
    aspect-ratio: 2 / 1;                 /* зураггүй үеийн gradient placeholder */
}
.article-combined .article-hero-body {
    padding: 28px 32px 16px;
    border-bottom: 1px solid var(--line, #e5e7eb);
}
.article-combined .article-title {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.2;
    margin: 12px 0 14px;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.article-combined .article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.article-combined .article-meta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--muted, #6b7280);
}
.article-combined .article-meta-row i {
    color: var(--brand, #0b3d91);
    margin-right: 4px;
}

.article-combined .article-body {
    padding: 28px 32px;
}

@media (max-width: 720px) {
    .article-combined .article-hero-img img { max-height: 380px; }
    .article-combined .article-hero-img--empty { aspect-ratio: 16 / 10; }
    .article-combined .article-hero-body,
    .article-combined .article-body { padding: 20px 18px; }
}

/* ============================
   Site name prefix (2-мөр layout-ийн top line)
   Өнгө нь гарчгийнхтай ижил — зөвхөн хэмжээгээр ялгарна.
   Сайтын төрлөөр хэмжээний hierarchy эсрэг (aimag vs sum):
     - Aimag (type=1): "АРХАНГАЙ" big, "аймгийн ИТХ" small
     - Sum (type=2):   "Архангай аймгийн" small, "СУМЫН ИТХ" big
   ============================ */
.site-header .logo-text .logo-sub {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-weight: 700 !important;
    color: var(--brand, #0b3d91) !important;  /* main title-тэй ижил brand өнгө */
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
}
.site-footer .logo-text .logo-sub {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-weight: 700 !important;
    color: #fff !important;                    /* footer dark bg → гарчигтай ижил цагаан */
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
}

/* Default (sum/duureg) hierarchy: top жижиг, bottom том */
.site-header .logo-text .logo-sub,
.site-footer .logo-text .logo-sub { font-size: 0.72rem !important; font-weight: 600 !important; }

/* Aimag (type=1) + Duureg (type=4) hierarchy эсрэг:
   top ТОМ (aimag/duureg name), bottom жижиг ("аймгийн ИТХ" / "дүүргийн ИТХ") */
.site-header .logo-text.logo-text--type-1 .logo-sub,
.site-header .logo-text.logo-text--type-4 .logo-sub,
.site-footer .logo-text.logo-text--type-1 .logo-sub,
.site-footer .logo-text.logo-text--type-4 .logo-sub { font-size: 1.05rem !important; font-weight: 500 !important; letter-spacing: 0.01em !important; }
.site-header .logo-text.logo-text--type-1 .logo-title,
.site-header .logo-text.logo-text--type-4 .logo-title,
.site-footer .logo-text.logo-text--type-1 .logo-title,
.site-footer .logo-text.logo-text--type-4 .logo-title { font-size: 0.78rem !important; font-weight: 600 !important; letter-spacing: 0.04em !important; }

/* Main title — UPPERCASE + tight letter-spacing (condensed) */
.site-header .logo-text .logo-title,
.site-footer .logo-text .logo-title {
    font-size: 1rem !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.01em !important;     /* үсгүүд шахсан */
    font-weight: 700 !important;
    font-stretch: condensed;                /* variable font дэмждэг бол илүү нарийн */
}

/* Logo-text 2-мөр stack тохиромжтой */
.site-header .logo-text,
.site-footer .logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ============================
   Service cards — ONE unified outer card with 5 services inside
   (removes the confusing "extra frame" look)
   ============================ */
.services-grid {
    background: #fff !important;
    border: 1px solid var(--line, #e5e7eb) !important;
    border-radius: 18px !important;
    padding: 12px !important;
    box-shadow: 0 10px 30px rgba(15,23,42,.06) !important;
    gap: 4px !important;
}
.service-card {
    background: transparent !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 18px 16px !important;
    box-shadow: none !important;
    transition: background 0.15s ease-out !important;
    min-height: 88px;
    position: relative;
}
.service-card:hover {
    background: var(--bg-soft, #f7f8fb) !important;
    transform: none !important;
    box-shadow: none !important;
}
.service-card + .service-card::before {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: -2px;
    width: 1px;
    background: var(--line, #e5e7eb);
}
.service-card .service-info h4 {
    margin: 0 !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    color: var(--text, #1a1f2e) !important;
}

@media (max-width: 720px) {
    .services-grid { padding: 8px !important; }
    .service-card { padding: 14px 12px !important; }
    .service-card + .service-card::before { display: none; }
}

/* ============================
   Logo + site name — grouped together as one unit (no gap breakage)
   ============================ */
.site-header .logo,
.site-footer .logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.site-header .logo .logo-img,
.site-footer .logo .logo-img,
.site-header .logo img,
.site-footer .logo img {
    flex-shrink: 0 !important;
    display: block !important;
}
.site-header .logo .logo-text,
.site-footer .logo .logo-text {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

/* Prevent flex squeeze on long titles — allow wrapping */
.site-header .logo .logo-text .logo-title,
.site-footer .logo .logo-text .logo-title {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ============================
   Chairman card — constrain photo to 140×170 so it doesn't overflow
   (the placeholder had an implicit size; a real <img> was unconstrained)
   ============================ */
.chairman-photo {
    width: 140px !important;
    height: 170px !important;
    position: relative;
    flex-shrink: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: var(--bg-soft, #f7f8fb);
}
.chairman-photo img,
.chairman-photo > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    border-radius: 12px !important;
}
.chairman-photo .photo-placeholder {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
}

/* Chairman badge stays above photo bottom-right */
.chairman-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent, #c9a227), var(--accent-warm, #e0b83a));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(201,162,39,.4);
    z-index: 2;
}

@media (max-width: 720px) {
    .chairman-card { flex-direction: column !important; align-items: center !important; text-align: center; }
    .chairman-photo { margin: 0 auto; }
}

/* ============================
   News card image safety — don't let background images stretch cards too tall
   ============================ */
.news-card {
    overflow: hidden;
}
.news-card .news-img {
    aspect-ratio: 16/10 !important;
    height: auto !important;
    background-size: cover !important;
    background-position: center !important;
}
.news-card.featured .news-img {
    aspect-ratio: 16/9 !important;
}

/* Media cards / thumbs */
.media-thumb,
.list-card-img,
.fund-thumb,
.exp-thumb {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
}

/* ============================
   News section — 2-row layout
   Row 1: 1 big (left, no desc) + 2 small stacked (right)
   Row 2: 4 small cards in one row
   ============================ */
.news-row-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}
.news-row-top-right {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
}

.news-row-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Featured big card — hide description */
.news-card.featured.no-desc .news-body p {
    display: none !important;
}

/* Row 1 right-side small cards — horizontal layout */
.news-card.compact {
    display: grid !important;
    grid-template-columns: 140px 1fr !important;
    gap: 0 !important;
    min-height: 0;
}
.news-card.compact .news-img {
    aspect-ratio: auto !important;
    height: 100% !important;
    min-height: 120px;
}
.news-card.compact .news-body {
    padding: 14px 16px !important;
    display: flex;
    flex-direction: column;
}
.news-card.compact .news-body h3 {
    font-size: 0.95rem !important;
    line-height: 1.3;
    margin: 4px 0 0 !important;
    font-weight: 700;
}
.news-card.compact .news-meta {
    font-size: 0.72rem !important;
}

/* Responsive */
@media (max-width: 960px) {
    .news-row-top { grid-template-columns: 1fr; }
    .news-row-top-right { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .news-row-bottom { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .news-row-top-right { grid-template-columns: 1fr; }
    .news-card.compact { grid-template-columns: 110px 1fr !important; }
    .news-row-bottom { grid-template-columns: 1fr; }
}

/* ============================
   News grid — featured card stretches to full grid-cell height
   (fixes the empty white space below the big featured card)
   ============================ */
.news-grid {
    min-height: 0 !important;      /* arbitrary min removed */
    align-items: stretch !important;
}
.news-card.featured {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}
.news-card.featured .news-img {
    flex: 1 1 60% !important;
    height: auto !important;
    min-height: 320px !important;
}
.news-card.featured .news-body {
    flex: 1 1 40% !important;
    display: flex !important;
    flex-direction: column !important;
}
.news-card.featured .news-body h3 {
    flex: 0 0 auto !important;
}
.news-card.featured .news-body p {
    flex: 1 1 auto !important;      /* description-ээр үлдсэн зай дүүрнэ */
}
.news-card.featured .news-body .read-more {
    margin-top: auto !important;    /* button доор түлхэнэ */
}

/* ============================
   Two-col grid — when sessions-panel is missing, chairman-card becomes full width
   ============================ */
.two-col-grid:has(.chairman-card:only-child) {
    grid-template-columns: 1fr !important;
}
.two-col-grid .chairman-card:only-child {
    max-width: 920px;
    margin: 0 auto;
}

/* ============================
   Hide broken images in article body (content from DB with old /medias/ paths)
   ============================ */
.prose img[src=""],
.prose img:not([src]),
.sub-prose img[src=""],
.sub-prose img:not([src]) {
    display: none !important;
}

/* JS-added class after img error */
.prose img.img-broken,
.sub-prose img.img-broken {
    display: none !important;
}

/* Empty paragraph that only wrapped a broken image */
.prose p:empty,
.sub-prose p:empty {
    display: none !important;
}

/* ============================
   Representatives section (home page preview, grouped by appointment)
   ============================ */
.reps-section .reps-group {
    margin-bottom: 36px;
}
.reps-section .reps-group:last-child {
    margin-bottom: 0;
}
.reps-section .reps-group-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand, #0b3d91);
}
.reps-section .reps-group-head h3 {
    font-family: inherit !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--brand, #0b3d91) !important;
    margin: 0 !important;
}
.reps-section .reps-group-count {
    font-size: 0.78rem;
    color: var(--muted, #6b7280);
    font-weight: 600;
}

/* "+ N" Бүгдийг үзэх card */
.rep-card.rep-more { background: var(--bg-soft, #f7f8fb) !important; }
.rep-card.rep-more:hover { border-color: var(--brand, #0b3d91) !important; background: #fff !important; }
.rep-card.rep-more .rep-more-icon {
    background-image: none !important;
    background: var(--bg-soft, #f7f8fb) !important;
    color: var(--brand, #0b3d91) !important;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rep-card.rep-more .rep-info h3 {
    font-family: inherit !important;
    color: var(--brand, #0b3d91) !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
}

/* ============================
   Reps rotator — single row, horizontal scroll + arrows
   ============================ */
.reps-section .section-head .section-sub {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--muted, #6b7280);
}
.reps-section .section-head .reps-count {
    font-weight: 600;
    color: var(--muted, #6b7280);
}

.reps-rotator {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: stretch;
    gap: 8px;
}
.reps-track-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.reps-track-viewport::-webkit-scrollbar { display: none; }

.reps-track {
    display: flex;
    gap: 16px;
    padding: 4px 2px;
}
.reps-track .rep-card {
    flex: 0 0 calc((100% - 16px * 4) / 5);
    min-width: 170px;
    max-width: 230px;
    scroll-snap-align: start;
}
.reps-track-viewport { scroll-snap-type: x mandatory; }

.reps-track .rep-photo {
    position: relative;
    aspect-ratio: 3 / 4;
    width: 100%;
    height: auto;
}
.reps-track .rep-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: var(--brand, #0b3d91);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reps-arrow {
    align-self: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line, #e5e7eb);
    background: #fff;
    color: var(--brand, #0b3d91);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.reps-arrow:hover {
    background: var(--brand, #0b3d91);
    color: #fff;
    border-color: var(--brand, #0b3d91);
}

@media (max-width: 1024px) {
    .reps-track .rep-card { flex: 0 0 calc((100% - 16px * 3) / 4); }
}
@media (max-width: 768px) {
    .reps-rotator { grid-template-columns: 32px 1fr 32px; }
    .reps-arrow { width: 32px; height: 32px; font-size: 0.75rem; }
    .reps-track .rep-card { flex: 0 0 calc((100% - 16px * 2) / 3); min-width: 140px; }
}
@media (max-width: 520px) {
    .reps-track .rep-card { flex: 0 0 calc((100% - 16px) / 2); }
}

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

@media (max-width: 900px) {
    /* Visible X close button inside the slide-in drawer */
    .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 scroll зогсооно (drawer нээлттэй үед) — overlay ашиглахгүй */
    body.nav-open { overflow: hidden; }
    .main-nav.open { z-index: 300 !important; }
}

/* ============================
   Mobile ерөнхий horizontal overflow нуух — зарим долоо дахь элемент
   viewport-с халиад scrollbar, цагаан bleed үүсгэдгийг таслана.
   ============================ */
html, body { overflow-x: hidden; max-width: 100%; }

@media (max-width: 720px) {
    /* Hero slider навчны баруун талаас халих бөглөх */
    .hero, .hero-slider, .hero-slide { max-width: 100vw; overflow-x: hidden; }

    /* Right-fixed-menu desktop byudragsan "desktop-only" variant — mobile-д bottom-р харагдах уу байх уу гэснийг зохицуулах */
    .right-fixed-menu { max-width: 100vw; left: 0; right: 0; }

    /* News-card featured утасны дээр full-width stack болгох */
    .news-grid { grid-template-columns: 1fr !important; }
    .news-card.featured { grid-column: auto !important; }

    /* Featured card image-ийн доод fallback — хоосон хөх зай болохоос сэргийлэх */
    .news-card .news-img {
        aspect-ratio: 16 / 10;
        min-height: 180px;
    }
}

/* ============================
   Mobile menu — dropdown (has-dropdown) click-to-open behavior
   Default style.css дээр mobile-д `.dropdown { visibility: visible; opacity: 1 }` гэж
   бүхнийг ил тавьсан — одоо click хийхэд `.is-open` class-р нээдэг болгож зохицуулъя.
   ============================ */
@media (max-width: 900px) {
    /* Blade аль хэдийн <i class="fa-chevron-down"> тавьсан — зөвхөн тэр ганцийг л үлдээе */
    .main-nav .has-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .main-nav .has-dropdown > a > .fa-chevron-down {
        margin-left: auto;
        font-size: 0.75rem;
        opacity: .65;
        transition: transform .2s ease;
    }
    .main-nav .has-dropdown.is-open > a > .fa-chevron-down { transform: rotate(180deg); }

    /* Mobile: dropdown hidden by default, shown on .is-open */
    .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;
    }
}

/* ============================
   News card — image + title clickable (→ article), category clickable (→ category list)
   ============================ */
.news-card .news-img { position: relative; }

/* Full-overlay anchor over the image → article. Visually invisible. */
.news-card .news-img-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    text-indent: -9999px;
    overflow: hidden;
    color: transparent;
}

/* Category badge — raised above the image overlay so its click wins */
.news-card .news-cat,
.news-card a.news-cat {
    z-index: 2;
}
.news-card a.news-cat {
    text-decoration: none !important;
    transition: filter .15s ease, transform .15s ease;
}
.news-card a.news-cat:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* Title anchor — inherit h3 styling, only color on hover */
.news-card .news-body h3 a,
.news-card .news-body h3 a:visited {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}
.news-card .news-body h3 a:hover {
    color: var(--brand, #0b3d91);
}

/* =========================================================================
   MOBILE RESPONSIVE — бүх submain хуудсуудад нийтлэг сайжруулалт
   ========================================================================= */

/* ---------- Tablet (≤900px) ---------- */
@media (max-width: 900px) {
    /* Page header padding багасгах */
    .page-header { padding: 24px 0 20px; }
    .page-header h1 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
    .page-header p { font-size: 0.88rem; }

    /* Two-col homepage layout → stack */
    .two-col-grid { grid-template-columns: 1fr !important; gap: 18px; }

    /* Content detail: sidebar хажуугаас доош ордог */
    .content-grid { grid-template-columns: 1fr !important; gap: 18px; }
    .sidebar { max-width: none; }
    .sidebar-card { padding: 16px; }

    /* Rep grid (CV хуудас) — 3 багана */
    .rep-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }

    /* Section head: flex болон stacking */
    .section-head { flex-wrap: wrap; gap: 8px; }
    .section-head h2 { font-size: 1.1rem; }
    .section-head .see-all { font-size: 0.78rem; }
}

/* ---------- Phone (≤640px) ---------- */
@media (max-width: 640px) {
    /* Container padding багасгах */
    .container { padding-left: 14px; padding-right: 14px; }

    /* Breadcrumb мөр wrap, size жижиг */
    .breadcrumb { font-size: 0.72rem; flex-wrap: wrap; gap: 4px; }
    .breadcrumb a, .breadcrumb .current { white-space: nowrap; }

    /* Service cards — 2 баганын жижиг */
    .services-grid { padding: 10px !important; gap: 2px !important; }
    .service-card { padding: 14px 10px !important; min-height: 76px; }
    .service-card h4 { font-size: 0.78rem; }
    .service-icon { width: 36px; height: 36px; font-size: 0.95rem; }

    /* Stats grid — 2 багана */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px; }
    .stat { padding: 14px; }
    .stat-num { font-size: 1.6rem !important; }
    .stat-label { font-size: 0.72rem; }
    .stat-icon { width: 36px; height: 36px; font-size: 0.95rem; }

    /* News card — compact */
    .news-card .news-body { padding: 14px; }
    .news-card h3 { font-size: 0.95rem; line-height: 1.3; }
    .news-card p { font-size: 0.82rem; -webkit-line-clamp: 3; }
    .news-card .news-meta { font-size: 0.72rem; }
    .news-card .read-more { font-size: 0.78rem; }

    /* CV rep grid — 2 багана */
    .rep-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .rep-card .rep-info h3 { font-size: 0.82rem; line-height: 1.25; }
    .rep-card .rep-role { font-size: 0.72rem; }

    /* Chairman card — stack photo + info */
    .chairman-card { grid-template-columns: 1fr !important; text-align: center; }
    .chairman-photo { margin: 0 auto 14px; }

    /* Session list (хэлэлцүүлэг) — compact */
    .sessions-panel { padding: 14px; }
    .session-list li { padding: 10px 0; gap: 10px; }
    .session-date { min-width: 44px; }
    .session-date .day { font-size: 1.3rem; }
    .session-date .month { font-size: 0.68rem; }

    /* Docs table (тогтоол) — horizontal scroll */
    .docs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .docs-table { min-width: 560px; font-size: 0.78rem; }
    .docs-table th, .docs-table td { padding: 8px 10px; }

    /* Article (мэдээ/тогтоол дэлгэрэнгүй) */
    .article-card { border-radius: 10px; }
    .article-hero-body { padding: 18px 14px 10px; }
    .article-combined .article-body { padding: 18px 14px; }
    .article-title { font-size: 1.15rem !important; }
    .article-meta-row { font-size: 0.72rem; gap: 10px; }

    /* Article body prose */
    .prose, .sub-prose { font-size: 0.9rem; }
    .prose h1, .sub-prose h1 { font-size: 1.1rem; }
    .prose h2, .sub-prose h2 { font-size: 1rem; }
    .prose h3, .sub-prose h3 { font-size: 0.95rem; }
    .prose img, .sub-prose img { max-width: 100%; height: auto; }

    /* CTA section */
    .cta-inner { text-align: center; }
    .cta-section h2 { font-size: 1.2rem; }
    .cta-section p { font-size: 0.85rem; }
    .cta-actions { flex-direction: column; width: 100%; }
    .cta-actions .btn { width: 100%; justify-content: center; }

    /* Forms (forum санал, contact) */
    .form-row.cols-2 { grid-template-columns: 1fr !important; gap: 10px; }
    .form-field label { font-size: 0.82rem; }
    .form-field input, .form-field textarea, .form-field select { font-size: 0.9rem; padding: 10px 12px; }

    /* Filter bar — stack vertical */
    .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .filter-bar .search-input,
    .filter-bar select,
    .filter-bar .btn { width: 100%; }

    /* Footer — single column */
    .footer-grid { grid-template-columns: 1fr !important; gap: 28px; text-align: center; }
    .socials { justify-content: center; }
    .footer-col h4 { font-size: 0.95rem; }

    /* Top bar (header дээр огноо, утас, email) — stack */
    .top-bar { font-size: 0.72rem; padding: 6px 0; }
    .top-bar .container { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .top-bar-left, .top-bar-right { flex-wrap: wrap; justify-content: center; gap: 10px; }

    /* Hero actions — stacked buttons */
    .hero-actions { flex-direction: column; width: 100%; max-width: 280px; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-content { padding: 0 8px; }

    /* Pagination */
    .pagination { font-size: 0.82rem; flex-wrap: wrap; justify-content: center; }
    .pagination a, .pagination span { padding: 6px 10px; }

    /* Tags / badges */
    .tag, .eyebrow { font-size: 0.68rem; padding: 3px 8px; }

    /* Reps rotator — 2 карт */
    .reps-track .rep-card { flex: 0 0 calc((100% - 12px) / 2) !important; min-width: 0; }
    .reps-section .section-head h2 { font-size: 1rem; }
    .reps-arrow { width: 32px !important; height: 32px !important; font-size: 0.75rem !important; }

    /* Right-fixed-menu (bottom bar on mobile) — illetve body padding нэмэх */
    body { padding-bottom: 64px; }
    body:not(.has-rfm) { padding-bottom: 0; }

    /* Scroll-top товч байрлал */
    .scroll-top { bottom: 80px; right: 14px; width: 40px; height: 40px; font-size: 0.9rem; }
}

/* ---------- Very narrow (≤380px) ---------- */
@media (max-width: 380px) {
    .services-grid { grid-template-columns: 1fr !important; }
    /* Stats + reps нарийн утсан дээр ч 2 багана ХЭВЭЭР */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .rep-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
}

/* ---------- Share-row — utas dээр wrap, padding багасгах ---------- */
@media (max-width: 640px) {
    .share-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px;
        margin: 20px 0;
        justify-content: center;
    }
    .share-row span {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }
    .share-row a {
        width: 40px;
        height: 40px;
    }
}

/* ============================
   Article body iframe (YouTube, Vimeo) responsive
   ============================ */
.prose iframe,
.sub-prose iframe,
.article-body 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 <span> wrapper-ийг block болгон бүтэн өргөнд */
.prose p span:has(> iframe),
.sub-prose p span:has(> iframe) {
    display: block !important;
    width: 100% !important;
    background: transparent !important;
}
.prose p:has(> iframe),
.prose p:has(> span > iframe),
.sub-prose p:has(> iframe),
.sub-prose p:has(> span > iframe) {
    text-align: center !important;
}

@media (max-width: 720px) {
    .prose iframe, .sub-prose iframe, .article-body iframe {
        min-height: 200px;
    }
}
