/* Танилцуулга хуудас (about.ejs) — сайтын үндсэн өнгө: #003A8C / #1D5FC2 / #4C9FE8 */
:root { --ab-navy: #003A8C; --ab-blue: #1D5FC2; --ab-sky: #4C9FE8; --ab-ink: #0f172a; --ab-muted: #64748b; --ab-line: #e2e8f0; }

/* Нүүр хэсэг */
.ab-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #002a68 0%, #003A8C 45%, #1D5FC2 100%); padding: 3.25rem 0 3.5rem; }
.ab-hero-bg { position: absolute; inset: 0; opacity: .9; pointer-events: none; }
.ab-hero-bg svg { width: 100%; height: 100%; }
.ab-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .75rem; color: rgba(255,255,255,.6); margin-bottom: 1.5rem; }
.ab-crumb a { color: inherit; text-decoration: none; } .ab-crumb a:hover { color: #fff; } .ab-crumb b { color: rgba(255,255,255,.9); font-weight: 600; }
.ab-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ab-sky); margin-bottom: .6rem; }
.ab-title { font-size: clamp(2.1rem, 4.5vw, 3.25rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 .9rem; }
.ab-sub { max-width: 46rem; font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,.78); }
.ab-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 2.25rem; max-width: 60rem; }
@media (min-width: 768px) { .ab-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ab-fact { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; border-radius: 1rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); }
.ab-fact b { font-size: 1.7rem; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.ab-fact span { font-size: .74rem; line-height: 1.35; color: rgba(255,255,255,.75); }

/* Байрлал */
.ab-main { padding: 3rem 1.5rem; }
.ab-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.ab-content { min-width: 0; }
@media (min-width: 1024px) { .ab-main { padding: 4rem 1.5rem; } .ab-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; align-items: start; } }
@media (max-width: 1023px) { .ab-aside { order: 2; } .ab-content { order: 1; } }
.ab-h2-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem .75rem; margin-bottom: 1.4rem; }
.ab-h2-row .ab-h2 { margin-bottom: 0; }
.ab-small { font-size: .85rem; }

/* Хажуугийн навигаци */
.ab-toc { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: .15rem; padding: 1.1rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--ab-line); }
.ab-toc p { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ab-muted); margin: 0 .5rem .5rem; }
.ab-toc > a { display: block; padding: .5rem .75rem; border-radius: .6rem; font-size: .86rem; font-weight: 600; color: #334155; text-decoration: none; border-left: 3px solid transparent; transition: .15s; }
.ab-toc > a:hover { background: #f1f5f9; color: var(--ab-navy); }
.ab-toc > a.is-on { background: #eff6ff; color: var(--ab-navy); border-left-color: var(--ab-sky); }
.ab-toc-links { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--ab-line); display: flex; flex-direction: column; gap: .15rem; }
.ab-toc-ext { display: flex; align-items: center; gap: .55rem; padding: .45rem .75rem; border-radius: .6rem; font-size: .82rem; font-weight: 600; color: var(--ab-blue); text-decoration: none; }
.ab-toc-ext:hover { background: #eff6ff; } .ab-toc-ext svg { width: 15px; height: 15px; }
@media (max-width: 1023px) { .ab-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: .35rem; } .ab-toc p, .ab-toc-links { display: none; } .ab-toc > a { border-left: 0; border: 1px solid var(--ab-line); font-size: .8rem; padding: .4rem .7rem; } }

/* Хэсгүүд */
.ab-section { scroll-margin-top: 6rem; padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--ab-line); }
.ab-section:last-of-type { border-bottom: 0; }
.ab-h2 { position: relative; font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 900; letter-spacing: -.01em; color: var(--ab-ink); margin: 0 0 1.4rem; padding-left: 1rem; }
.ab-h2::before { content: ''; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--ab-sky), var(--ab-navy)); }
.ab-muted { color: var(--ab-muted); line-height: 1.7; }
.ab-prose p { font-size: 1.02rem; line-height: 1.8; }
.ab-lead { font-size: 1.12rem !important; color: var(--ab-ink); font-weight: 500; padding: 1rem 1.25rem; border-radius: 1rem; background: #eff6ff; border-left: 4px solid var(--ab-sky); }

/* Эрхэм зорилго, алсын хараа, тэргүүлэх чиглэл */
.ab-pillars { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ab-pillar { position: relative; padding: 1.5rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--ab-line); transition: transform .2s, box-shadow .2s; }
.ab-pillar:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(0,58,140,.45); }
.ab-pillar.is-primary { background: linear-gradient(160deg, #003A8C, #1D5FC2); color: #fff; border-color: transparent; }
.ab-pillar-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: .9rem; background: #eff6ff; color: var(--ab-navy); margin-bottom: 1rem; }
.ab-pillar-icon svg { width: 22px; height: 22px; }
.ab-pillar.is-primary .ab-pillar-icon { background: rgba(255,255,255,.14); color: #fff; }
.ab-pillar h3 { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .6rem; color: var(--ab-blue); }
.ab-pillar.is-primary h3 { color: var(--ab-sky); }
.ab-pillar p { margin: 0; font-size: 1rem; line-height: 1.65; font-weight: 500; }

/* Стратегийн зорилго */
.ab-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); counter-reset: g; }
.ab-goals li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.2rem; border-radius: 1rem; background: #fff; border: 1px solid var(--ab-line); }
.ab-goals p { margin: 0; line-height: 1.6; font-weight: 500; }
.ab-num { flex: 0 0 auto; font-size: 1.5rem; font-weight: 900; line-height: 1; color: var(--ab-sky); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Чиг үүрэг */
.ab-laws { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.ab-laws span { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; background: #eff6ff; color: var(--ab-navy); font-size: .78rem; font-weight: 700; }
.ab-laws svg { width: 14px; height: 14px; }
.ab-functions { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ab-functions li { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: .9rem; background: #fff; border: 1px solid var(--ab-line); line-height: 1.55; font-size: .95rem; }
.ab-functions svg { flex: 0 0 auto; width: 20px; height: 20px; padding: 3px; border-radius: 999px; background: #dcfce7; color: #15803d; margin-top: .1rem; }

/* Түүхэн хэлхээ — гүйлгэх явцаар доош зурагдана */
.ab-tl-wrap { position: relative; }
.ab-tl-sticky { position: sticky; top: 5rem; height: 0; z-index: 0; pointer-events: none; }
.ab-tl-now { position: absolute; right: 0; top: 0; font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 900; letter-spacing: -.04em; line-height: 1; color: var(--ab-navy); opacity: .06; font-variant-numeric: tabular-nums; }
.ab-timeline { list-style: none; margin: 1.25rem 0 0; padding: .5rem 0 1rem; position: relative; }
.ab-timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--ab-line); }
.ab-tl-line { position: absolute; left: 50%; top: 0; width: 3px; margin-left: -1.5px; height: 0; border-radius: 3px; background: linear-gradient(180deg, var(--ab-navy), var(--ab-sky)); box-shadow: 0 0 12px rgba(76,159,232,.5); }
.ab-timeline > li { position: relative; display: grid; grid-template-columns: 1fr 56px 1fr; align-items: start; gap: 0 1rem; padding: .8rem 0; }
.ab-tl-dot { grid-column: 2; grid-row: 1; justify-self: center; width: 16px; height: 16px; border-radius: 999px; background: #fff; border: 3px solid #cbd5e1; margin-top: .55rem; z-index: 1; transition: border-color .4s, transform .4s, box-shadow .4s; }
.ab-tl-mark { grid-column: 2; grid-row: 1; justify-self: center; margin-top: 2.1rem; font-size: .68rem; font-weight: 900; letter-spacing: .06em; color: var(--ab-muted); white-space: nowrap; }
.ab-tl-card { grid-row: 1; position: relative; padding: 1rem 1.15rem; border-radius: 1rem; background: #fff; border: 1px solid var(--ab-line); box-shadow: 0 10px 30px -24px rgba(2,20,60,.5); line-height: 1.55; font-size: .93rem; opacity: 0; transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }
.ab-timeline > li.is-left .ab-tl-card { grid-column: 1; transform: translateX(-30px); }
.ab-timeline > li.is-right .ab-tl-card { grid-column: 3; transform: translateX(30px); }
.ab-tl-y { display: inline-block; font-size: 1.1rem; font-weight: 900; color: var(--ab-navy); margin-bottom: .3rem; letter-spacing: -.01em; }
.ab-tl-card p { margin: 0; }
.ab-tl-card ul { margin: 0; padding-left: 1.1rem; list-style: disc; } .ab-tl-card li { margin: .25rem 0; }
.ab-timeline > li.is-on .ab-tl-card { opacity: 1; transform: none; }
.ab-timeline > li.is-on .ab-tl-dot { border-color: var(--ab-sky); transform: scale(1.15); box-shadow: 0 0 0 6px rgba(76,159,232,.18); }
.ab-timeline > li.is-key.is-on .ab-tl-dot { background: var(--ab-navy); border-color: var(--ab-navy); box-shadow: 0 0 0 8px rgba(0,58,140,.15); }
.ab-timeline > li.is-key .ab-tl-card { border-color: #bcd3f3; background: linear-gradient(180deg, #fff, #f5f9ff); }
.ab-timeline > li.is-key .ab-tl-y { color: #fff; background: var(--ab-navy); padding: .12rem .55rem; border-radius: .5rem; }
@media (max-width: 720px) {
  .ab-timeline::before, .ab-tl-line { left: 18px; margin-left: 0; }
  .ab-timeline > li { grid-template-columns: 36px 1fr; gap: 0 .8rem; padding: .55rem 0; }
  .ab-tl-dot { grid-column: 1; }
  .ab-tl-mark, .ab-tl-now { display: none; }
  .ab-timeline > li.is-left .ab-tl-card, .ab-timeline > li.is-right .ab-tl-card { grid-column: 2; transform: translateY(18px); }
}

/* Гарч ирэх анимэйшн, явцын зураас, тоологдох тоо */
.ab-rv { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 80ms); }
.ab-rv.is-on { opacity: 1; transform: none; }
.ab-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--ab-navy), var(--ab-sky)); }
.ab-hero-bg circle { transform-origin: 1040px 90px; animation: ab-breathe 9s ease-in-out infinite; }
.ab-hero-bg circle:nth-child(2) { animation-delay: -2s; } .ab-hero-bg circle:nth-child(3) { animation-delay: -4s; } .ab-hero-bg circle:nth-child(4) { animation-delay: -6s; }
@keyframes ab-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .ab-rv, .ab-tl-card { opacity: 1 !important; transform: none !important; transition: none !important; } .ab-hero-bg circle { animation: none !important; } }

/* Бэлгэдэл */
.ab-symbols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ab-symbol { display: flex; gap: 1.1rem; padding: 1.4rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--ab-line); }
.ab-symbol-art { flex: 0 0 88px; height: 88px; display: grid; place-items: center; border-radius: 1rem; background: #f1f5f9; color: #b45309; overflow: hidden; }
.ab-symbol-art img { max-width: 76px; max-height: 76px; object-fit: contain; }
.ab-symbol-art svg { width: 40px; height: 40px; }
.ab-symbol h3 { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 800; color: var(--ab-ink); }
.ab-symbol p { margin: 0; font-size: .92rem; line-height: 1.65; color: #334155; }

/* Холбоотой хуудсууд */
.ab-links { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ab-link { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 1rem; background: #fff; border: 1px solid var(--ab-line); color: inherit; text-decoration: none; transition: .2s; }
.ab-link:hover { border-color: var(--ab-sky); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(0,58,140,.5); }
.ab-link-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: .8rem; background: #eff6ff; color: var(--ab-navy); }
.ab-link-icon svg { width: 20px; height: 20px; }
.ab-link > span:nth-child(2) { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.ab-link b { font-size: .95rem; color: var(--ab-ink); } .ab-link small { font-size: .78rem; color: var(--ab-muted); line-height: 1.4; }
.ab-link-arrow { width: 18px; height: 18px; color: #cbd5e1; transition: .2s; } .ab-link:hover .ab-link-arrow { color: var(--ab-navy); transform: translateX(3px); }

/* Гомдол */
.ab-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.75rem 2rem; border-radius: 1.5rem; color: #fff; background: linear-gradient(135deg, #003A8C, #1D5FC2 70%, #4C9FE8); }
.ab-cta h2 { margin: 0 0 .35rem; font-size: 1.25rem; font-weight: 900; }
.ab-cta p { margin: 0; color: rgba(255,255,255,.8); font-size: .95rem; }
.ab-cta-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.ab-btn-primary, .ab-btn-ghost { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.2rem; border-radius: .9rem; font-weight: 800; font-size: .9rem; text-decoration: none; transition: .15s; }
.ab-btn-primary { background: #fff; color: var(--ab-navy); } .ab-btn-primary:hover { background: #eff6ff; }
.ab-btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); } .ab-btn-ghost:hover { background: rgba(255,255,255,.2); }
.ab-btn-primary svg, .ab-btn-ghost svg { width: 18px; height: 18px; }

/* Текстийг хоёр талаас тэгшлэх (admin → Танилцуулга хуудас → Харагдах байдал) */
.ab-justify .ab-sub, .ab-justify .ab-prose p, .ab-justify .ab-muted, .ab-justify .ab-pillar p, .ab-justify .ab-goals p,
.ab-justify .ab-functions li span, .ab-justify .ab-tl-card p, .ab-justify .ab-tl-card li, .ab-justify .ab-symbol p { text-align: justify; text-justify: inter-word; }
.ab-justify .ab-prose p { hyphens: auto; -webkit-hyphens: auto; }
