/* =========================================================
   Бидний тухай (AboutUs) — Figma "static page 1" (Захирлын мэндчилгээ)
   Зүүн цэс = хуудас доторх таб (#overview, #greeting, #mission, #values, #video)
   style.css-ийн дараа холбоно.
   ========================================================= */

/* Figma "article 2": 48/150 padding — цэс 266px, агуулга 24px зайтай (150→416, 440-оос) */
.about { padding-top: 48px; padding-bottom: 48px; min-height: 640px; }   /* таб солиход footer үсрэхгүй */
.about__grid { display: grid; grid-template-columns: 266px minmax(0, 1fr); gap: 24px; align-items: start; }

/* ---------- Зүүн цэс (Figma "tab" type=Left, size=Large) ---------- */
.about-menu { position: sticky; top: 120px; display: flex; flex-direction: column; }
.about-menu a { display: flex; padding: 8px; border-left: 3px solid transparent; transition: border-color .15s; }
.about-menu a span {
    display: block; width: 100%; height: 40px; padding: 0 16px; border-radius: 999px;
    font-size: 18px; font-weight: 500; line-height: 40px; text-transform: uppercase; color: rgba(0, 0, 0, .7);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background-color .15s, color .15s;
}
.about-menu a:hover span { background: rgba(0, 0, 0, .05); color: #000; }                 /* Hover */
.about-menu a.is-active { border-left-color: var(--blue, #035ba5); }                        /* Идэвхтэй: 3px хөх зураас */
.about-menu a.is-active span { color: var(--blue, #035ba5); background: none; }

/* ---------- Таб бүрийн хэсэг ---------- */
.about-panel[hidden] { display: none !important; }
.about-panel { animation: aboutFade .3s ease; }
@keyframes aboutFade { from { opacity: 0; transform: translateY(6px); } }

/* Текст 855 + зураг 427, gap 48 */
.about__content { display: grid; grid-template-columns: minmax(0, 855fr) minmax(0, 427fr); gap: 48px; align-items: start; }
.about__content--full { grid-template-columns: minmax(0, 1fr); }
.about__text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.about__title { margin: 0; font-size: 36px; font-weight: 700; line-height: 1.4; color: rgba(0, 0, 0, .9); }

/* Editor-ийн HTML агуулга: 16px, мөр 1.6, догол мөр хооронд 12 */
.about__body { font-size: 16px; line-height: 1.6; color: rgba(0, 0, 0, .7); text-align: justify; overflow-wrap: anywhere; }
.about__body p { margin: 0 0 12px; }
.about__body > :last-child { margin-bottom: 0; }
.about__body h2, .about__body h3 { margin: 24px 0 8px; font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--blue, #035ba5); text-align: left; }
.about__body ul, .about__body ol { margin: 0 0 12px; padding-left: 1.3em; text-align: left; }
.about__body li + li { margin-top: 4px; }
.about__body img { max-width: 100%; height: auto; border-radius: 12px; }
.about__body a { color: var(--blue, #035ba5); text-decoration: underline; }
.about__body table { width: 100%; border-collapse: collapse; margin: 16px 0 12px; }
.about__body td, .about__body th { border: 1px solid var(--grey-200, #e4e4e4); padding: 12px; text-align: left; vertical-align: top; }

/* Зургийн карт — цагаан, radius 24, зураг radius 12, доор нь тайлбар */
.about__figure { position: sticky; top: 120px; margin: 0; overflow: hidden; background: #fff; border-radius: 24px; filter: drop-shadow(8px 8px 5px rgba(13, 39, 80, .04)); }
.about__figure img { display: block; width: 100%; aspect-ratio: 427 / 570; object-fit: cover; border-radius: 12px; background: rgba(0, 0, 0, .05); }
.about__figure figcaption { padding: 12px 24px; font-size: 16px; line-height: 1.6; color: rgba(0, 0, 0, .7); text-align: center; }

/* ---------- Алсын хараа / Эрхэм зорилго ---------- */
.about-vm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.about-vm--one { grid-template-columns: minmax(0, 1fr); }
.about-card {
    display: flex; flex-direction: column; gap: 16px; padding: 32px;
    background: #fff; border: 1px solid var(--grey-200, #e4e4e4); border-radius: 24px;
}
.about-card__head { display: flex; align-items: center; gap: 12px; }
.about-card__icon {
    display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 999px;
    background: rgba(0, 0, 255, .05); color: #3232b5;
}
.about-card__icon .icon { width: 24px; height: 24px; }
.about-card h2 { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--blue, #035ba5); }
.about-card .about__body { text-align: left; }
/* Gradient карт (алсын хараа) — training-ийн бүртгэлийн карттай ижил */
.about-card--accent { background: var(--gradient); border-color: transparent; color: #fff; }
.about-card--accent h2, .about-card--accent .about__body { color: #fff; }
.about-card--accent .about__body a { color: #fff; }
.about-card--accent .about-card__icon { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Үнэт зүйлс: editor-ийн жагсаалтыг карт болгоно ---------- */
.about-values .about__body ul, .about-values .about__body ol {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
    margin: 8px 0 12px; padding: 0; list-style: none; counter-reset: v;
}
.about-values .about__body li {
    position: relative; margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 4px;
    background: #fff; border: 1px solid var(--grey-200, #e4e4e4); border-radius: 16px;
    font-size: 16px; line-height: 1.5; color: rgba(0, 0, 0, .8); counter-increment: v;
}
.about-values .about__body li::before {
    content: counter(v, decimal-leading-zero); margin-bottom: 12px;
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
    background: var(--gradient); color: #fff; font-size: 14px; font-weight: 600;
}
.about-values .about__body li strong, .about-values .about__body li b { display: block; margin-bottom: 4px; color: var(--blue, #035ba5); font-weight: 600; }

/* ---------- Видео ---------- */
.about-video { position: relative; overflow: hidden; border-radius: 24px; background: #000; aspect-ratio: 16 / 9; }
.about-video iframe, .about-video video, .about-video embed, .about-video object { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.about-video--raw { aspect-ratio: auto; background: none; border-radius: 0; }
.about-video--raw iframe { position: static; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 24px; }
.about-video__link {
    display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 12px 24px; border-radius: 999px;
    border: 1px solid rgba(0, 0, 255, .2); color: #3232b5; font-size: 18px; font-weight: 500;
    transition: background-color .2s, border-color .2s;
}
.about-video__link:hover { background: rgba(0, 0, 255, .05); border-color: rgba(0, 0, 255, .5); }
.about-video__link .icon { width: 20px; height: 20px; }

.about-empty { padding: 48px 24px; text-align: center; color: rgba(0, 0, 0, .5); background: #fff; border: 1px dashed rgba(0, 0, 0, .2); border-radius: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) { .about__content { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; } }
@media (max-width: 1100px) {
    .about__grid { grid-template-columns: 1fr; gap: 24px; }
    /* Цэс хэвтээ гүйдэг таб болно */
    .about-menu {
        position: static; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none;
        margin: 0 calc(var(--gutter, 16px) * -1); padding: 0 var(--gutter, 16px);
        border-bottom: 1px solid rgba(0, 0, 0, .08);
    }
    .about-menu::-webkit-scrollbar { display: none; }
    .about-menu a { flex: none; padding: 4px 0 8px; border-left: 0; border-bottom: 3px solid transparent; }
    .about-menu a.is-active { border-bottom-color: var(--blue, #035ba5); }
    .about-menu a span { font-size: 16px; padding: 0 16px; }
}
@media (max-width: 900px) {
    .about__content { grid-template-columns: 1fr; gap: 24px; }
    .about__figure { position: static; max-width: 427px; width: 100%; margin: 0 auto; }
    .about-vm { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .about { padding-top: 24px; padding-bottom: 32px; }
    .about__title { font-size: 28px; }
    .about__body { text-align: left; }
    .about-card { padding: 24px; }
    .about-video, .about-video--raw iframe { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .about-panel { animation: none; } }

/* =========================================================
   Энгийн статик хуудас — зүүн цэсгүй (Figma "Jica static page 1")
   Агуулга 1048 + зураг 524, gap 48. Editor-ийн HTML-д h1/h2/p/table загвар өгнө.
   ========================================================= */
.sp { padding-top: 48px; padding-bottom: 48px; }
.sp__grid { display: grid; grid-template-columns: minmax(0, 1048fr) minmax(0, 524fr); gap: 48px; align-items: start; }
.sp__grid--full { grid-template-columns: minmax(0, 1fr); }

.sp__body { min-width: 0; font-size: 16px; line-height: 1.6; color: rgba(0, 0, 0, .7); overflow-wrap: anywhere; }
/* Гарчиг: 36 Bold, хөх (#035ba5) */
.sp__title, .sp__body h1 { margin: 0 0 8px; font-size: 36px; font-weight: 700; line-height: 1.4; color: var(--blue, #035ba5); }
/* Дэд гарчиг: 24 Medium, хөх — хэсэг хооронд 24, гарчиг ба текстийн хооронд 8 */
.sp__body h2, .sp__body h3 { margin: 24px 0 8px; font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--blue, #035ba5); }
.sp__body h4 { margin: 20px 0 8px; font-size: 18px; font-weight: 600; line-height: 1.35; color: rgba(0, 0, 0, .9); }
.sp__body p { margin: 0 0 12px; }                       /* paragraph spacing 12 */
.sp__body > :last-child { margin-bottom: 0; }
.sp__body ul, .sp__body ol { margin: 0 0 12px; padding-left: 1.3em; }
.sp__body li + li { margin-top: 4px; }
.sp__body a { color: var(--blue, #035ba5); text-decoration: underline; }
.sp__body img { max-width: 100%; height: auto; border-radius: 12px; }
.sp__body blockquote { margin: 0 0 12px; padding: 12px 20px; border-left: 3px solid var(--blue, #035ba5); background: rgba(3, 91, 165, .04); border-radius: 0 12px 12px 0; }

/* Хүснэгт — 1px #e4e4e4, нүд 12px, толгой 18 Medium */
.sp__table { margin: 16px 0 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp__body table { width: 100%; table-layout: fixed; border-collapse: collapse; border: 1px solid var(--grey-200, #e4e4e4); margin: 16px 0 12px; }
.sp__table table { margin: 0; min-width: 560px; }
.sp__body th, .sp__body td { padding: 12px; border: 1px solid var(--grey-200, #e4e4e4); text-align: left; vertical-align: top; }
.sp__body th, .sp__body thead td { font-size: 18px; font-weight: 500; line-height: 1.35; color: rgba(0, 0, 0, .9); }
.sp__body td { font-size: 16px; line-height: 1.6; color: rgba(0, 0, 0, .7); }
.sp__body td p, .sp__body th p { margin: 0; }

/* Зургийн карт 524px (about__figure-тай ижил) */
.sp__figure { position: sticky; top: 120px; margin: 0; overflow: hidden; background: #fff; border-radius: 24px; }
.sp__figure img { display: block; width: 100%; aspect-ratio: 524 / 786; object-fit: cover; border-radius: 12px; background: rgba(0, 0, 0, .05); }
.sp__figure figcaption { padding: 12px 24px; font-size: 16px; line-height: 1.6; color: rgba(0, 0, 0, .7); text-align: center; }

@media (max-width: 1400px) { .sp__grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; } }
@media (max-width: 1000px) {
    .sp__grid { grid-template-columns: 1fr; gap: 24px; }
    .sp__figure { position: static; max-width: 524px; width: 100%; margin: 0 auto; }
    .sp__figure img { aspect-ratio: 4 / 5; }
}
@media (max-width: 768px) {
    .sp { padding-top: 24px; padding-bottom: 32px; }
    .sp__title, .sp__body h1 { font-size: 26px; }
    .sp__body h2, .sp__body h3 { font-size: 20px; }
    .sp__body th, .sp__body thead td { font-size: 16px; }
}

/* Зорилго табын "Үнэт зүйлс" дэд гарчиг; хоосон мэдэгдэл текст дотор */
.about__subtitle { margin: 24px 0 0; font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--blue, #035ba5); }
.about__text .about-empty { margin: 0; }
.about-card h3 { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--blue, #035ba5); }
.about-card--accent h3 { color: #fff; }

/* =========================================================
   Статик хуудасны доод хэсэг — дугуй зурагтай холбоос картууд
   (Номын сангийн үйлчилгээ / Уншигчийн карт / Цагийн хуваарь / Анхаарах зүйлс ...)
   ========================================================= */
.sp-cards { display: flex; flex-direction: column; gap: 24px; padding-bottom: 64px; }
.sp-cards__title { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--blue, #035ba5); }
.sp-cards__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.sp-card {
    display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 32px 24px;
    background: #fff; border: 1px solid var(--grey-200, #e4e4e4); border-radius: 24px; color: inherit; text-align: center;
    transition: border-color .2s, box-shadow .25s, transform .25s;
}
.sp-card:hover { border-color: rgba(0, 0, 255, .2); box-shadow: 0 12px 32px rgba(13, 39, 80, .08); transform: translateY(-2px); }
.sp-card__img {
    display: block; width: 140px; height: 140px; flex: none; overflow: hidden; border-radius: 50%;
    background: var(--bg, #f6f6f6); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--grey-200, #e4e4e4);
    transition: box-shadow .25s;
}
.sp-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.sp-card:hover .sp-card__img { box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(102, 126, 234, .6); }
.sp-card:hover .sp-card__img img { transform: scale(1.06); }
.sp-card__name { font-size: 18px; font-weight: 500; line-height: 1.3; text-transform: uppercase; color: rgba(0, 0, 0, .8); transition: color .2s; }
.sp-card:hover .sp-card__name, .sp-card.is-active .sp-card__name { color: #3232b5; }
.sp-card.is-active { border-color: rgba(0, 0, 255, .3); background: rgba(0, 0, 255, .02); }
.sp-card.is-active .sp-card__img { box-shadow: 0 0 0 4px #fff, 0 0 0 5px #667eea; }

@media (max-width: 768px) {
    .sp-cards { padding-bottom: 40px; gap: 16px; }
    .sp-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sp-card { padding: 20px 12px; gap: 14px; border-radius: 16px; }
    .sp-card__img { width: 96px; height: 96px; }
    .sp-card__name { font-size: 14px; }
}

/* Цэсгүй үед агуулга бүтэн өргөнтэй */
.about__grid--nomenu { grid-template-columns: minmax(0, 1fr); }
/* Хоосон агуулгын мэдэгдэл текст дотор */
.about__text > .about-empty { margin: 0; }

/* ---- «Бусад» картууд: бүгд ижил хэмжээтэй, зураг голдоо ---- */
.sp-cards__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.sp-card { height: 100%; justify-content: flex-start; }
.sp-card__img { display: grid; place-items: center; margin: 0 auto; aspect-ratio: 1 / 1; }
.sp-card__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Нэр 2 мөр хүртэл — бүх карт ижил өндөртэй */
.sp-card__name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: calc(1.3em * 2); width: 100%; overflow-wrap: anywhere;
}
@media (max-width: 1100px) { .sp-cards__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px)  { .sp-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* =========================================================
   ЗАСВАР: цэс агуулгын дээр гарч байсан + editor-ийн Times фонт
   ========================================================= */
/* Цэс байгаа бол --nomenu класс байсан ч 2 багана болно */
.about__grid:has(> .about-menu) { grid-template-columns: 266px minmax(0, 1fr); }
@media (max-width: 1100px) { .about__grid:has(> .about-menu) { grid-template-columns: 1fr; } }
/* Цэсгүй үед л бүтэн өргөн */
.about__grid--nomenu:not(:has(> .about-menu)) { grid-template-columns: minmax(0, 1fr); }

/* Editor-оос ирсэн inline фонт (Times New Roman г.м.)-ыг сайтын фонтоор солино */
.about__body, .about__body * { font-family: inherit !important; }
.about__body { font-family: 'Roboto', sans-serif !important; }
.about__body p, .about__body span, .about__body li, .about__body td { font-size: 16px !important; line-height: 1.6 !important; }
.about__body p { text-indent: 0 !important; }

/* =========================================================
   «Бусад» картууд — тэгш өнцөгт зурагтай загвар (.sp-cards--wide)
   Дээр нь бүтэн өргөнтэй зураг (16:9), доор нь зүүн тийш тэгшилсэн нэр
   ========================================================= */
.sp-cards--wide .sp-cards__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.sp-cards--wide .sp-card {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; height: 100%;
    padding: 0; overflow: hidden; text-align: left; background: #fff;
    border: 1px solid var(--grey-200, #e4e4e4); border-radius: 16px;
}
.sp-cards--wide .sp-card:hover { border-color: rgba(0, 0, 255, .2); box-shadow: 0 12px 32px rgba(13, 39, 80, .08); transform: translateY(-2px); }
.sp-cards--wide .sp-card__img {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0; flex: none; overflow: hidden;
    border-radius: 0; box-shadow: none; background: var(--bg, #f6f6f6);
}
.sp-cards--wide .sp-card:hover .sp-card__img,
.sp-cards--wide .sp-card.is-active .sp-card__img { box-shadow: none; }
.sp-cards--wide .sp-card__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s; }
.sp-cards--wide .sp-card:hover .sp-card__img img { transform: scale(1.04); }
.sp-cards--wide .sp-card__name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
    width: auto; min-height: calc(1.4em * 2); margin: 18px 24px 26px; padding: 0;
    font-size: 20px; font-weight: 500; line-height: 1.4; text-transform: none; color: rgba(0, 0, 0, .8);
}
.sp-cards--wide .sp-card:hover .sp-card__name, .sp-cards--wide .sp-card.is-active .sp-card__name { color: #3232b5; }
.sp-cards--wide .sp-card.is-active { border-color: rgba(0, 0, 255, .3); background: #fff; }

@media (max-width: 1100px) { .sp-cards--wide .sp-cards__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) {
    .sp-cards--wide .sp-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sp-cards--wide .sp-card { border-radius: 12px; }
    .sp-cards--wide .sp-card__name { margin: 12px 14px 16px; font-size: 15px; }
}

/* =========================================================
   «Бусад» картууд — нэг мөрөнд 2 (.sp-cards--two)
   Статик хуудасны агуулга (.sp__body) дотор ашиглана
   ========================================================= */
.sp-cards--two { margin: 32px 0 0; padding: 0 !important; max-width: none; width: 100%; }
.sp-cards--two .sp-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px; }
/* .sp__body-ийн a / img загвар картанд нөлөөлөхгүй */
.sp__body .sp-cards--two a.sp-card { text-decoration: none; color: inherit; }
.sp__body .sp-cards--two .sp-card__img img { width: 100%; height: 100%; max-width: none; border-radius: 0; }
.sp-cards--two .sp-card__name { font-size: 18px; }
@media (max-width: 768px) {
    .sp-cards--two .sp-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
    .sp-cards--two .sp-card__name { font-size: 15px; }
}
@media (max-width: 420px) { .sp-cards--two .sp-cards__grid { grid-template-columns: 1fr !important; } }