/* ==========================================================================
   NewMN — нийтийн сайтын загвар (мэдээллийн сэтгүүлийн хэв маяг)
   ========================================================================== */

:root {
  --brand:      #d7263d;
  --brand-dk:   #a8182c;
  --ink:        #0f1724;
  --ink-2:      #1c2638;
  --text:       #2b3340;
  --muted:      #687080;
  --line:       #e6e1d8;
  --tint:       #f3efe8;
  --bg:         #faf8f4;
  --white:      #ffffff;
  --danger:     #c0392b;
  --success:    #1e8449;
  --radius:     8px;
  --radius-sm:  6px;
  --shadow:     0 1px 2px rgba(15, 23, 36, .05), 0 4px 14px rgba(15, 23, 36, .06);
  --shadow-lg:  0 14px 40px rgba(15, 23, 36, .18);
  --serif:      'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h:   70px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

/* Эх үүсвэрийн домэйнээр харуулах мэдэгдэл */
.referral-notice {
  padding: 20px 0;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: center;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.referral-message { white-space: pre-wrap; }
.referral-form { margin: 0; width: 100%; }
.referral-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.referral-link:hover { color: var(--brand-dk); }
.referral-notice [hidden] { display: none !important; }
.referral-page {
  width: min(100% - 32px, 900px);
  margin: 28px auto 48px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.referral-wait:has([hidden]) { display: none; }
.referral-page-image { width: auto; max-width: 100%; height: auto; margin: 0 auto; }
.referral-ad { width: 100%; min-width: 0; overflow-x: auto; }
.referral-image-button { display: block; width: 100%; max-width: 100%; border-radius: var(--radius-sm); }
.referral-image-button img { width: 100%; max-width: 100%; height: auto; }
.referral-image-button:focus-visible { outline: 3px solid var(--brand); outline-offset: 6px; }
.referral-preview-note { padding-top: 20px; text-align: center; color: var(--muted); }
@media (max-width: 600px) { .referral-page { padding: 16px; gap: 20px; } }

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

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-dk); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container.narrow, .narrow { max-width: 760px; }

.section { padding: 56px 0; }
.section .container.section, .container.section { padding-top: 40px; padding-bottom: 56px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 1.05rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 3px; background: currentColor; }

/* ---------- Товчнууд ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font: 600 .95rem/1.2 var(--sans);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dk); color: var(--white); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--brand-dk); }
.btn-light:hover { background: var(--ink); color: var(--white); }

/* ---------- Дээд мөр ---------- */

.topbar { background: var(--ink); color: #aab3c2; font-size: .78rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.topbar .today { color: var(--white); font-weight: 600; }
.topbar-note { letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; }
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { color: #aab3c2; }
.topbar-links a:hover { color: var(--white); }

/* ---------- Толгой хэсэг ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--brand);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--white);
  font: 800 1.65rem/1 var(--serif);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14);
}
.brand-text { display: flex; flex-direction: column; font: 800 1.45rem/1 var(--serif); letter-spacing: -.02em; }
.brand-text small {
  font: 600 .64rem/1.3 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav > a, .dropdown > a {
  display: block;
  padding: 8px 11px;
  color: var(--ink);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color .15s, box-shadow .15s;
}
.main-nav > a:hover, .dropdown > a:hover { color: var(--brand); }
.main-nav a.active { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 10;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 4px; color: var(--text); font-size: .92rem; }
.dropdown-menu a:hover { background: var(--tint); color: var(--brand); }

.nav-search { margin-left: 10px; }
.nav-search input {
  width: 150px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font: inherit;
  font-size: .88rem;
  transition: width .2s, border-color .2s;
}
.nav-search input:focus { outline: none; border-color: var(--brand); width: 190px; background: var(--white); }

/* ---------- Нүүр — hero ---------- */

.hero {
  position: relative;
  overflow-x: clip;
  color: #c3cad6;
  background:
    radial-gradient(900px 420px at 92% -12%, rgba(215, 38, 61, .38), transparent 62%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  border-bottom: 4px solid var(--brand);
  padding: 64px 0 72px;
}
/* Сонины баганын шугам */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 100px);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.08fr; gap: 52px; align-items: center; }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; }
.hero .eyebrow { color: #ff6b7d; }
.hero-copy p { font-size: 1.1rem; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .btn-ghost { color: var(--white); }
.hero .btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

.hero-top { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-top li { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.hero-top .tag { color: #ff6b7d; }
.hero-top a { color: var(--white); font: 600 1.12rem/1.35 var(--serif); }
.hero-top a:hover { color: #ffc9d0; }

.hero-feature {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  transition: transform .2s;
}
.hero-feature:hover { transform: translateY(-4px); color: var(--text); }
.hero-feature:hover .cover img { transform: scale(1.03); }
.hero-feature-body { padding: 22px 26px 24px; }
.hero-feature-body h3 { font: 700 1.6rem/1.2 var(--serif); margin: 8px 0 10px; color: var(--ink); }
.hero-feature-body p { color: var(--muted); margin: 0 0 12px; font-size: .97rem; }

/* ---------- Зураг / placeholder ---------- */

.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hero-cover { aspect-ratio: 16 / 9; }
.post-cover { border-radius: var(--radius); margin: 8px 0 32px; aspect-ratio: 16 / 9; }

.ph { display: grid; place-items: center; isolation: isolate; }
.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, .22), transparent 42%);
}
.ph::after {
  content: 'NewMN';
  position: absolute;
  left: 16px;
  bottom: 12px;
  font: 800 .78rem/1 var(--serif);
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .6);
}
.ph span {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 2.9rem;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .22));
}
.ph.p1 { background: linear-gradient(135deg, #0f1724, #2c3d5c); }
.ph.p2 { background: linear-gradient(135deg, #a8182c, #ef5a6f); }
.ph.p3 { background: linear-gradient(135deg, #1d3f74, #3f7fd0); }
.ph.p4 { background: linear-gradient(135deg, #0f5f58, #2fa497); }
.ph.p5 { background: linear-gradient(135deg, #4b2f7a, #9b6fd6); }
.ph.p6 { background: linear-gradient(135deg, #9a4b06, #e8a13a); }

/* ---------- Хэсгийн гарчиг ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding-top: 14px;
  border-top: 3px solid var(--ink);
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Сэдвүүд ---------- */

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.topic {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 22px 20px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.topic::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); color: var(--ink); }
.topic:hover::after { transform: scaleX(1); }
.topic strong { font: 700 1.12rem/1.3 var(--serif); }
.topic small { color: var(--muted); }
.topic-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--tint);
  font-size: 1.45rem;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.cat-list { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: box-shadow .15s, border-color .15s;
}
.cat-row:hover { box-shadow: var(--shadow); border-left-color: var(--brand); color: var(--text); }
.cat-row .topic-icon { margin: 0; }
.cat-row > div { flex: 1; min-width: 0; }
.cat-row strong { color: var(--ink); font: 700 1.2rem/1.3 var(--serif); }
.cat-row p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.cat-row .count {
  min-width: 40px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
}

/* ---------- Нийтлэлийн карт ---------- */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:hover .cover img { transform: scale(1.04); }
.card-media { display: block; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 20px; }
.card-body h3 { font: 700 1.3rem/1.25 var(--serif); margin: 8px 0 8px; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--brand); }
.card-body p { color: var(--muted); font-size: .94rem; flex: 1; }
.meta { font-size: .8rem; color: var(--muted); }

.tag {
  display: inline-block;
  align-self: flex-start;
  color: var(--brand);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
a.tag:hover { color: var(--ink); }
.tag-warn { background: #fdecc8; color: #8a5a00; margin-left: 6px; padding: 2px 8px; border-radius: 4px; }

/* ---------- Band ---------- */

.band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--brand-dk), var(--brand));
  color: #ffe3e7;
}
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 18px);
  pointer-events: none;
}
.band-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.band h2 { color: var(--white); }
.band p { margin: 0; max-width: 640px; }

/* ---------- Их уншсан ---------- */

.popular-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 36px; }
.popular-list li { display: flex; align-items: flex-start; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.popular-list .num { font: 800 2.4rem/1 var(--serif); color: var(--brand); min-width: 34px; }
.popular-list a { display: block; font: 700 1.15rem/1.35 var(--serif); color: var(--ink); margin-bottom: 4px; }
.popular-list a:hover { color: var(--brand); }
.popular-list small { color: var(--muted); }

/* ---------- Хуудасны толгой ---------- */

.page-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 44px;
}
.page-head h1 { margin-bottom: 8px; }
.page-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

.notfound { text-align: center; padding: 88px 0; }
.notfound .big { font: 800 6rem/1 var(--serif); color: var(--brand); margin-bottom: 12px; }
.notfound p { margin-bottom: 28px; }
.notfound .btn { margin: 4px; }

/* ---------- Pagination ---------- */

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 44px; flex-wrap: wrap; }
.pagination a {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination a.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- Нийтлэл ---------- */

.post-head { padding-top: 48px; }
.post-head h1 { margin: 12px 0 14px; font-size: clamp(2rem, 4.8vw, 3.2rem); line-height: 1.1; }
.post-head .meta { font-size: .88rem; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

.prose { font: 400 1.2rem/1.75 var(--serif); color: #1f2733; overflow-wrap: break-word; }
.prose.section { padding-top: 40px; }
.post .prose > p:first-child::first-letter {
  float: left;
  font: 800 4.2rem/.82 var(--serif);
  color: var(--brand);
  margin: .08em .1em 0 0;
}
.prose h2 { font-size: 1.75rem; margin: 1.7em 0 .55em; }
.prose h3 { font: 700 1.35rem/1.3 var(--serif); margin: 1.5em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brand); }
.prose img { border-radius: var(--radius-sm); margin: 1.5em auto; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { text-align: center; color: var(--muted); font: .88rem var(--sans); margin-top: -.8em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 6px 0 6px 24px;
  border-left: 4px solid var(--brand);
  font: italic 600 1.4rem/1.45 var(--serif);
  color: var(--ink);
}
.prose blockquote p:last-child { margin: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font: .95rem var(--sans); display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--tint); color: var(--ink); }
.prose iframe, .prose video { max-width: 100%; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .photo-credit { margin-top: 2em; font: .8rem/1.5 var(--sans); color: var(--muted); }
.prose .photo-credit a { color: var(--muted); }
.prose code { background: var(--tint); padding: 2px 6px; border-radius: 4px; font-size: .85em; }
.prose strong { color: var(--ink); }

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.share span { font-weight: 700; color: var(--ink); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.share a { padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .88rem; color: var(--text); background: var(--white); }
.share a:hover { border-color: var(--brand); color: var(--brand); }

.prevnext { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 24px; }
.prevnext a {
  flex: 0 1 48%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font: 600 1.02rem/1.35 var(--serif);
}
.prevnext a:last-child:not(:first-child) { text-align: right; }
.prevnext a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Галерей ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gallery-item { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-item .cover { aspect-ratio: 1 / 1; }
.gallery-item .ph::after { display: none; }
.gallery-item:hover .cover img { transform: scale(1.06); }
.gallery-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(15, 23, 36, .9));
  color: var(--white);
  font: 600 1.02rem/1.3 var(--serif);
}

/* ---------- Маягт ---------- */

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.form input, .form textarea, .form select,
.search-big input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: 400 1rem/1.5 var(--sans);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus, .search-big input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 38, 61, .14);
}
.form textarea { resize: vertical; min-height: 140px; }
.form .btn { justify-self: start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.alert-success { background: #e3f4ea; color: var(--success); border: 1px solid #bfe3cc; }
.alert-error { background: #fbe9e7; color: var(--danger); border: 1px solid #f3c4bd; }

.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.contact-info {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 4px solid var(--brand);
}
.contact-info p { margin-bottom: 18px; overflow-wrap: anywhere; }

.search-big { display: flex; gap: 10px; margin-top: 20px; max-width: 640px; }

/* ---------- Сайтын бүтэц ---------- */

.sitemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px; }
.sitemap ul { list-style: none; padding: 0; margin: 0; }
.sitemap li { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.sitemap h3 { font: 700 1.25rem/1.3 var(--serif); padding-top: 10px; border-top: 3px solid var(--ink); }
.sitemap h3 a { color: var(--ink); }

/* ---------- Реклам ---------- */

.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 24px auto; max-width: 100%; text-align: center; }
.ad-label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ad-body { max-width: 100%; overflow: hidden; }
.ad-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 0 auto; }
.ad-body iframe, .ad-body ins, .ad-body > div { max-width: 100%; }
.ad-header_below, .ad-footer_above { width: 100%; max-width: 1200px; padding: 0 20px; }
.ad-header_below { margin: 16px auto 0; }
.ad-footer_above { margin: 40px auto 0; }
.ad-home_middle { margin-top: 40px; }
.ad-post_top { margin: -8px auto 32px; }
.ad-post_bottom { margin: 32px auto 8px; }
.ad-list_top { margin: 0 auto 28px; }

/* ---------- Хөл хэсэг ---------- */

.site-footer { background: var(--ink); color: #aab3c2; margin-top: 40px; font-size: .94rem; border-top: 4px solid var(--brand); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.site-footer h4 { color: var(--white); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #aab3c2; }
.site-footer a:hover { color: var(--white); }
.site-footer .muted { color: #8b95a6; margin-top: 14px; }
.brand-footer, .brand-footer:hover { color: var(--white); }

.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius-sm); font-size: .84rem; }
.socials a:hover { background: rgba(255, 255, 255, .1); }

.newsletter { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .07);
  color: var(--white);
  font: inherit;
}
.newsletter input::placeholder { color: #8b95a6; }
.newsletter input:focus { outline: none; border-color: var(--brand); }
.newsletter button {
  padding: 11px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--white);
  font: 600 .92rem var(--sans);
  cursor: pointer;
}
.newsletter button:hover { background: var(--brand-dk); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .85rem;
  color: #8b95a6;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1120px) {
  .nav-search input { width: 120px; }
  .nav-search input:focus { width: 150px; }
  .main-nav > a, .dropdown > a { padding: 8px 8px; letter-spacing: .04em; }
}

@media (max-width: 960px) {
  .topbar { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-feature { max-width: 620px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Гар утасны цэс (backdrop-filter нь fixed цэсийг толгой дотор хорьдог тул унтраана) */
  .site-header { backdrop-filter: none; background: var(--white); }
  .nav-toggle { display: grid; place-items: center; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 16px 20px 32px;
    background: var(--white);
    overflow-y: auto;
    border-top: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav > a, .dropdown > a { padding: 14px 12px; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .main-nav a.active { box-shadow: inset 3px 0 0 var(--brand); }
  .dropdown-menu {
    position: static;
    min-width: 0;
    padding: 0 0 0 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { transform: none; }
  .dropdown.open .dropdown-menu { display: block; }
  .nav-search { margin: 14px 0 0; }
  .nav-search input, .nav-search input:focus { width: 100%; padding: 12px 16px; font-size: 1rem; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 720px) {
  :root { --header-h: 62px; }
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .container.section { padding-top: 28px; padding-bottom: 40px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 52px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-feature-body h3 { font-size: 1.35rem; }
  .band-inner { flex-direction: column; align-items: flex-start; }
  .popular-list { grid-template-columns: 1fr; }
  .page-head { padding: 36px 0 30px; }
  .row2 { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .search-big { flex-direction: column; }
  .prevnext { flex-direction: column; }
  .prevnext a { flex-basis: auto; }
  .prevnext a:last-child:not(:first-child) { text-align: left; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-cap { font-size: .85rem; padding: 28px 10px 10px; }
  .cat-row { padding: 14px 16px; gap: 14px; }
  .brand-mark { width: 38px; height: 38px; font-size: 1.45rem; }
  .brand-text { font-size: 1.28rem; }
  .prose { font-size: 1.1rem; }
  .ph span { width: 76px; height: 76px; font-size: 2.3rem; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .topic-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .topic { padding: 16px 14px; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
