﻿/* BOET News Site - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mongolian&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --blue: #1a5fa8;
    --blue-dark: #0d4a8a;
    --blue-light: #2980d9;
    --teal: #1a8fa8;
    --white: #ffffff;
    --gray-bg: #f5f7fa;
    --gray-border: #e0e4ea;
    --text: #222;
    --text-light: #555;
    --ticker-bg: #1a5fa8;
    --ticker2-bg: #e8a020;
    --ticker3-bg: #cc3300;
}

body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: #fff; font-size: 14px; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ─── TOP BAR ─── */
.top-bar {
    background: #fff;
    border-bottom: 2px solid var(--gray-border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo-text-area {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-cross {
    font-size: 48px;
    color: var(--blue);
    font-weight: 900;
    line-height: 1;
    border: 3px solid var(--blue);
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-cross-footer {
    font-size: 36px;
    color: var(--blue);
    font-weight: 900;
    border: 2px solid var(--blue);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-texts { display: flex; flex-direction: column; }
.logo-sub { font-size: 10px; color: var(--blue); font-weight: 600; letter-spacing: 1px; }
.logo-main { font-size: 13px; color: var(--blue); font-weight: 800; line-height: 1.3; }

.mongol-script {
    font-size: 20px;
    color: var(--blue);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 4px;
}
.contact-info {
    text-align: right;
    font-size: 13px;
    color: var(--text);
}
.contact-info div { margin: 3px 0; }
.contact-info i { color: var(--blue); margin-right: 5px; }
.logo-img { max-height: 60px; }

/* ─── NAV ─── */
.main-nav {
    background: var(--blue);
    position: sticky;
    top: var(--topbar-h, 82px);
    z-index: 140;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.nav-list {
    list-style: none;
    display: flex;
    align-items: stretch;
}
.nav-item {
    position: relative;
}
.nav-item > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 0.2s;
}
.nav-item:hover > a,
.nav-item.active > a {
    background: var(--blue-dark);
}
.nav-item .fas.fa-chevron-down { font-size: 10px; }

/* Dropdown */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-top: 3px solid var(--blue);
    list-style: none;
    z-index: 200;
}
.dropdown li a {
    display: block;
    padding: 10px 18px 10px 22px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 400;
    border-bottom: 1px solid var(--gray-border);
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, border-left-color 0.2s;
}
.dropdown li a::before {
    content: '- ';
    color: var(--blue);
    font-weight: 600;
}
.dropdown li a:hover {
    background: var(--blue);
    color: #fff;
}
.nav-item.has-dropdown:hover .dropdown { display: block; }

/* ─── TICKER ─── */
.ticker-bar {
    background: var(--blue);
    padding: 0;
    overflow: hidden;
}
.ticker-wrap {
    overflow: hidden;
    position: relative;
}
.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}
.ticker-item:nth-child(odd) { background: rgba(255,255,255,0.08); }
.ticker-item .fas { color: #f0d060; font-size: 9px; }
.ticker-item a { color: #fff; text-decoration: underline; }

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-wrap:hover .ticker-content { animation-play-state: paused; }

/* ─── SLIDER ─── */
.slider-section { position: relative; overflow: hidden; background: #000; }
.slider-wrapper { display: flex; transition: transform 0.5s ease; }
.slide {
    min-width: 100%;
    position: relative;
}
.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    opacity: 0.85;
}
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 30px 20px 15px;
    font-size: 16px;
    font-weight: 600;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    color: #fff;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    transition: background 0.2s;
    z-index: 10;
}
.slider-btn:hover { background: rgba(26,95,168,0.7); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}
.slider-dot.active { background: #fff; }

/* No slider placeholder */
.slider-placeholder {
    background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

/* ─── MAIN CONTENT ─── */
.main-content { padding: 40px 0; }

/* Section title */
.section-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 12px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--blue);
    border-radius: 2px;
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}
.news-card {
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}
.news-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-card-img img { width: 100%; height: 200px; object-fit: cover; }
.news-card-img.no-img {
    height: 200px;
    background: linear-gradient(135deg, #dde9f5 0%, #c5daf0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 40px;
}
.news-card-body { padding: 15px; }
.news-card-date {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.news-card-date i { color: var(--blue); }
.news-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--blue); }
.news-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 5px;
}
.news-category-badge i { font-size: 9px; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 20px; }
.btn-load-more {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 10px 35px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-load-more:hover { background: var(--blue-dark); }

/* ─── SINGLE POST PAGE ─── */
.post-page { padding: 40px 0; }
.post-breadcrumb {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 20px;
}
.post-breadcrumb a { color: var(--blue); }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-header { margin-bottom: 25px; }
.post-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 10px;
}
.post-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    gap: 15px;
    align-items: center;
}
.post-meta i { color: var(--blue); }
.post-featured-img { width: 100%; max-height: 420px; object-fit: contain; object-position: center; border-radius: 6px; margin-bottom: 25px; background: #f5f7fa; }
.post-content {
    font-size: 15px;
    line-height: 1.9;
    color: #2c2c2c;
    max-width: 100%;
}
.post-content p {
    margin-bottom: 18px;
    text-align: justify;
    text-indent: 1.5em;
}
.post-content p:first-child { text-indent: 0; }
/* Quill inline alignment override */
.post-content p[style*="text-align: center"],
.post-content p[style*="text-align:center"] { text-align: center !important; text-indent: 0 !important; }
.post-content p[style*="text-align: right"],
.post-content p[style*="text-align:right"]  { text-align: right !important; text-indent: 0 !important; }
.post-content p[style*="text-align: left"],
.post-content p[style*="text-align:left"]   { text-align: left !important; }
.post-content .ql-align-center { text-align: center !important; text-indent: 0 !important; }
.post-content .ql-align-right  { text-align: right !important;  text-indent: 0 !important; }
.post-content .ql-align-justify { text-align: justify !important; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5 {
    font-weight: 800;
    color: var(--blue);
    margin: 28px 0 12px;
    line-height: 1.4;
}
.post-content h2 { font-size: 20px; border-bottom: 2px solid var(--teal); padding-bottom: 6px; }
.post-content h3 { font-size: 17px; }
.post-content strong, .post-content b { color: #111; }
.post-content em, .post-content i { color: #444; }
.post-content ul, .post-content ol {
    margin: 14px 0 18px 24px;
    line-height: 2;
}
.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content li { margin-bottom: 4px; }
.post-content blockquote {
    border-left: 4px solid var(--teal);
    background: #f0fafd;
    margin: 20px 0;
    padding: 14px 20px;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #445;
}
.post-content > img,
.post-content p img,
.post-content div img {
    max-width: 70% !important;
    width: auto !important;
    height: auto !important;
    border-radius: 6px;
    margin: 18px auto !important;
    display: block !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.post-content a {
    color: var(--blue);
    text-decoration: underline;
}
.post-content a:hover { color: var(--teal); }
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
}
.post-content table th {
    background: var(--blue);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
}
.post-content table td {
    border: 1px solid #ddd;
    padding: 9px 12px;
}
.post-content table tr:nth-child(even) td { background: #f5f8fc; }
.post-content hr {
    border: none;
    border-top: 2px solid #e8ecf0;
    margin: 28px 0;
}
.post-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 10px 0; display: block; }

/* Two column layout */
.content-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}
.sidebar-widget {
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}
.widget-title {
    background: var(--blue);
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 700;
}
.widget-body { padding: 12px; }
.widget-news-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-border);
}
.widget-news-item:last-child { border-bottom: none; }
.widget-news-thumb {
    width: 60px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 3px;
    background: var(--gray-bg);
}
.widget-news-text { font-size: 12px; line-height: 1.5; }
.widget-news-text a { color: var(--text); }
.widget-news-text a:hover { color: var(--blue); }

/* ─── MENU PAGE ─── */
.menu-page { padding: 40px 0; }
.page-title-bar {
    background: transparent;
    color: #1a5fa8;
    padding: 16px 0 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid #e8f0fa;
}
.page-title-bar h1 { color: #1a5fa8; }
.page-title-bar .breadcrumb { color: #888; }
.page-title-bar .breadcrumb a { color: #1a5fa8; }
.page-title-bar h1 { font-size: 22px; font-weight: 700; }
.page-title-bar .breadcrumb { font-size: 12px; opacity: 0.8; margin-top: 5px; }
.page-title-bar .breadcrumb a { color: #fff; }

/* ─── FOOTER ─── */
.site-footer {
    background: var(--blue);
    color: #fff;
    padding: 35px 0 0;
    margin-top: 0;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr 0.8fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    align-items: start;
}
.footer-col-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #fff;
}
.footer-contact-item {
    font-size: 13px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.footer-contact-item i { color: rgba(255,255,255,0.6); margin-top: 2px; flex-shrink:0; }
.footer-contact-item a { color: rgba(255,255,255,0.85); }
.footer-contact-item a:hover { color: #fff; text-decoration: underline; }

.footer-logo-col .logo-text-area { gap: 8px; }
.footer-logo-col .logo-cross-footer {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    font-size: 28px;
    width: 36px;
    height: 36px;
}

/* Social icons */
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.fsoc-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    transition: opacity 0.2s, transform 0.2s;
    background: rgba(255,255,255,0.15);
}
.fsoc-btn:hover { opacity: 0.85; transform: scale(1.1); }
.fsoc-twitter  { background: #000; }
.fsoc-instagram{ background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.fsoc-facebook { background: #1877f2; }

.footer-bottom {
    text-align: center;
    padding: 14px 0;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ─── HOME NEWS SECTION ─── */
.home-news-section {
    padding: 40px 0 50px;
    background: #f5f7fa;
}
.hns-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 10px;
}
.hns-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--blue);
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--blue);
    display: inline-block;
}
.hns-more {
    font-size: 13px;
    color: var(--blue);
    font-weight: 600;
    transition: color 0.2s;
}
.hns-more:hover { color: var(--teal); }

/* 3-column card grid */
.hns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.hns-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid var(--gray-border);
}
.hns-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    transform: translateY(-2px);
}
.hns-card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #dde9f5;
    flex-shrink: 0;
    position: relative;
}
.hns-card-img img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s ease;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.hns-card:hover .hns-card-img img { transform: scale(1.04); }
.hns-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--blue);
    opacity: 0.3;
}
.hns-card-body {
    padding: 13px 15px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hns-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hns-date {
    font-size: 11px;
    color: var(--text-light);
}
.hns-date i { color: var(--blue); margin-right: 3px; }
.hns-cat {
    font-size: 10px;
    font-weight: 700;
    background: #e8f4fd;
    color: var(--blue);
    padding: 2px 8px;
    border-radius: 10px;
}
.hns-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hns-card:hover .hns-card-title { color: var(--blue); }

/* Responsive */
@media (max-width: 900px) {
    .hns-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .hns-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}

/* ─── ADMIN LINK ─── */
.admin-bar {
    background: #333;
    color: #ccc;
    font-size: 11px;
    padding: 4px 0;
    text-align: right;
}
.admin-bar a { color: #aaa; margin-left: 15px; }
.admin-bar a:hover { color: #fff; }

/* ─── MOBILE HEADER ─── */
.mobile-header {
    display: none;
    background: #fff;
    padding: 10px 16px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--blue);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.mobile-logo img { height: 44px; width: auto; display: block; }
.mobile-logo .logo-text-area { display: flex; align-items: center; }

/* Burger button */
.burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--blue);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
}
.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 300;
    backdrop-filter: blur(2px);
}
.mobile-overlay.open { display: block; }

/* Mobile drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 82%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 400;
    transition: right 0.32s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.mobile-drawer.open { right: 0; }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.drawer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.drawer-close:hover { background: rgba(255,255,255,0.2); }

.drawer-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
}
.drawer-item { border-bottom: 1px solid #f0f2f5; }
.drawer-row {
    display: flex;
    align-items: center;
}
.drawer-link {
    flex: 1;
    display: block;
    padding: 13px 18px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.drawer-link:hover { color: var(--blue); }
.drawer-toggle {
    background: none;
    border: none;
    padding: 13px 16px;
    cursor: pointer;
    color: #888;
    font-size: 12px;
    transition: transform 0.3s;
}

.drawer-sub {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.drawer-sub li { border-top: 1px solid #eef0f4; }
.drawer-sub a {
    display: block;
    padding: 11px 18px 11px 30px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
}
.drawer-sub a:hover { color: var(--blue); }
.drawer-sub a::before { content: "—  "; color: var(--teal); font-size: 11px; }

.drawer-footer {
    padding: 16px 18px;
    background: #f5f7fa;
    border-top: 1px solid #e8ecf0;
    font-size: 13px;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.drawer-footer i { color: var(--blue); margin-right: 6px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    /* Hide desktop elements */
    .top-bar { display: none; }
    .main-nav { display: none; }
    /* Show mobile */
    .mobile-header { display: flex; }

    /* Slider mobile */
    .nsc-img-wrap { height: 260px !important; }
    .nslider-arrow { top: calc(220px / 2) !important; width: 34px; height: 34px; font-size: 12px; }
    .nslider-dots { bottom: 72px !important; }
    .news-slider-outer { max-width: 100% !important; margin: 0 !important; }

    /* News grid */
    .hns-grid { grid-template-columns: 1fr; gap: 14px; }
    .hns-card-img { height: 160px; }
    .home-news-section { padding: 24px 0 32px; }
    .hns-title { font-size: 16px; }

    /* Post page */
    .content-sidebar { grid-template-columns: 1fr; }
    .post-title { font-size: 18px; }
    .post-content { font-size: 14px; }
    .share-bar { flex-wrap: wrap; gap: 8px; }

    /* Footer */
    .footer-inner { grid-template-columns: 1fr; gap: 18px; }
    .footer-col-title { font-size: 14px; }

    /* Page title */
    .page-title-bar h1 { font-size: 18px; }

    /* Container padding */
    .container { padding: 0 14px; }
}

@media (max-width: 480px) {
    .hns-grid { grid-template-columns: 1fr; }
    .share-btn { font-size: 12px; padding: 6px 12px; }
}

/* ─── NEWS SLIDER (3-per-slide auto) ─── */
.news-slider-section {
    background: #f0f4f8;
    position: relative;
    overflow: hidden;
    width: 100%;
}
.news-slider-outer {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
}
.news-slider-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    min-width: unset;
}
.news-slide-group {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

/* Image part */
.nsc {
    display: block;
    position: relative;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
}
.nsc.nsc-filler { background: #111; cursor: default; }

.nsc-img-wrap {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #000;
    display: block;
}
.nsc-img-wrap img[src*="youtube.com"],
.nsc-img-wrap img[src*="ytimg.com"] {
    object-fit: cover;
}
.nsc-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transition: transform 0.5s ease;
}
.nsc:hover .nsc-img-wrap img { transform: scale(1.04); }

.nsc-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: rgba(255,255,255,0.15);
    background: linear-gradient(160deg, #0d3a7a 0%, #1a5fa8 100%);
}

/* Caption BELOW image - teal background */
.nsc-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(41,184,208,0.6);
    padding: 8px 12px 10px;
    height: 72px;
    max-height: 72px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.15);
    box-sizing: border-box;
    transition: background 0.3s ease;
}
.nsc:hover .nsc-caption {
    background: rgba(41,184,208,0.95);
}
.nsc:last-child .nsc-caption { border-right: none; }
.nsc.nsc-filler .nsc-caption { background: #1fa8be; visibility: hidden; }

.nsc-cat-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    width: fit-content;
}
.nsc-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 34px;
    word-break: break-word;
}
.nsc-date {
    font-size: 10px;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
}
.nsc-date i { margin-right: 3px; }

/* Arrows */
.nslider-arrow {
    position: absolute;
    top: calc(400px / 2);
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nslider-arrow:hover { background: #1a5fa8; border-color: #1a5fa8; }
.nslider-prev { left: 12px; }
.nslider-next { right: 12px; }

/* Dots */
.nslider-dots {
    position: absolute;
    bottom: 82px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 20;
}
.nsdot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.25s;
    display: inline-block;
}
.nsdot.active { background: #fff; transform: scale(1.4); }

/* Responsive */
@media (max-width: 900px) {
    .news-slide-group { grid-template-columns: repeat(2, 1fr); }
    .nsc:nth-child(3) { display: none; }
    .nsc-img-wrap { height: 500px; }
    .nslider-arrow { top: calc(280px / 2); }
    .nslider-dots { bottom: 72px; }
}
@media (max-width: 600px) {
    .news-slide-group { grid-template-columns: 1fr; }
    .nsc:nth-child(2), .nsc:nth-child(3) { display: none; }
    .nsc-img-wrap { height: 380px; }
    .nslider-arrow { top: calc(240px / 2); }
    .nslider-dots { bottom: 68px; }
}

/* Монгол бичгийн зураг */
.mongol-script-img {
    max-height: 110px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ─── SHARE BAR ─── */
.share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 24px;
    padding: 14px 18px;
    background: #f5f7fa;
    border-radius: 8px;
    border: 1px solid #e4e8ee;
    position: relative;
}
.share-label {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-right: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.15s;
    color: #fff;
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-fb  { background: #1877f2; }
.share-tw  { background: #111; }
.share-wa  { background: #25d366; }
.share-copy { background: var(--blue); }
.copy-toast {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: #222;
    color: #fff;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.copy-toast.show { opacity: 1; }

/* ─── YOUTUBE EMBED ─── */
.yt-embed-wrap,
.post-content .yt-embed-wrap,
.post-content p .yt-embed-wrap {
    position: relative !important;
    padding-bottom: 39% !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 20px auto !important;
    border-radius: 8px;
    background: #000;
    width: 70% !important;
    display: block !important;
}
.yt-embed-wrap iframe,
.post-content .yt-embed-wrap iframe,
.post-content p .yt-embed-wrap iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 8px;
}
/* p tag-д орвол тэглэнэ */
.post-content p:has(.yt-embed-wrap) {
    text-indent: 0 !important;
    margin: 0 !important;
}

/* Quill editor дотор YouTube embed */
#quill-editor .yt-embed-wrap {
    width: 60% !important;
    padding-bottom: 34% !important;
    margin: 12px auto !important;
    cursor: pointer;
    border: 2px dashed #29b8d0;
}
#quill-editor .yt-embed-wrap::after {
    content: '✕ Устгах бол блок дээр дараад DELETE дарна';
    position: absolute;
    top: 4px; right: 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
}

/* ─── НҮҮР ХУУДАС ЦЭСНИЙ АНГИЛАЛ ─── */
.home-menu-section {
    padding: 30px 0 10px;
    border-top: 3px solid var(--blue);
    margin-top: 10px;
}
.home-menu-section .hns-title {
    color: var(--blue);
}

/* ─── ТАСАГ НЭГЖ ─── */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.dept-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}
.dept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26,95,168,0.18);
}
.dept-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #dde9f5;
    position: relative;
}
.dept-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.dept-card:hover .dept-card-img img { transform: scale(1.05); }
.dept-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #29b8d0;
    background: linear-gradient(135deg, #e8f4fb, #d0eaf5);
}
.dept-card-name {
    background: #29b8d0;
    color: #fff;
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Dept Modal */
.dept-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9000;
}
.dept-modal-overlay.open { display: block; }
.dept-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    z-index: 9001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.dept-modal.open { display: block; }
.dept-modal-close {
    position: sticky;
    top: 10px;
    float: right;
    margin: 10px 10px 0 0;
    background: rgba(0,0,0,0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    z-index: 1;
    transition: background 0.2s;
}
.dept-modal-close:hover { background: rgba(0,0,0,0.35); }

@media (max-width: 768px) {
    .dept-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .dept-card-img { height: 140px; }
}
@media (max-width: 480px) {
    .dept-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* Картын зураг - post-content override-с хамгаалах */
.hns-card .hns-card-img img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f0f4f8;
    border-radius: 0 !important;
    margin: 0 !important;
    display: block !important;
}
/* Цахим өргөдөл - responsive */
.petition-desktop { display: block; }
.petition-mobile  { display: none; }
@media (max-width: 768px) {
    .petition-desktop { display: none !important; }
    .petition-mobile  { display: block !important; }
}