/* =========================================================
   Задардаг мод — jtree.js-тэй хамт
   Шат бүрийн өнгө: 0 = хар хөх, 1 = хөх gradient, 2 = data-color (шар/улбар…), 3 = 2-ын цайвар
   ========================================================= */
.jtree { position: relative; margin: 24px 0; }
.jtree > ul { margin: 0; }                        /* JS ажиллахгүй үед энгийн жагсаалт */
.jtree.is-ready > ul { display: none; }

/* ---------- Компьютер ---------- */
.jtree__stage { position: relative; overflow-x: auto; overflow-y: hidden; padding: 8px 4px 16px; scrollbar-width: thin; }
.jtree__lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.jtree__line { fill: none; stroke: rgba(3, 91, 165, .45); stroke-width: 1.5; transition: stroke-dashoffset .45s ease; }
.jtree__cols { position: relative; display: flex; align-items: center; gap: 72px; width: max-content; min-height: 120px; }
.jtree__col {
    display: flex; flex-direction: column; justify-content: center; gap: 12px;
    opacity: 0; transform: translateX(-12px); transition: opacity .3s ease, transform .3s ease;
}
.jtree__col.is-in { opacity: 1; transform: none; }
.jtree__col--d0 { width: 200px; }
.jtree__col--d1 { width: 200px; }
.jtree__col--d2 { width: 200px; gap: 16px; }
.jtree__col--d3 { width: 340px; gap: 10px; }

/* Хайрцаг */
.jtree__node {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    min-height: 64px; padding: 14px 16px; margin: 0;
    border: 0; border-radius: 12px; cursor: pointer; text-align: center;
    font: inherit; font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere;
    transition: transform .2s, box-shadow .2s, outline-color .2s, filter .2s;
    outline: 2px solid transparent; outline-offset: 3px;
}
a.jtree__node { text-decoration: none; }
.jtree__label { flex: 1; min-width: 0; }
.jtree__chev { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: transform .2s; }
.jtree__chev svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jtree__node:hover, .jtree__node:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(13, 39, 80, .16); }
.jtree__node.is-active { outline-color: #3232b5; box-shadow: 0 10px 24px rgba(13, 39, 80, .18); }
.jtree__node.is-active .jtree__chev { transform: translateX(2px); }

/* Шат 0 — үндэс */
.jtree__node--d0 { min-height: 88px; background: #4472c4; color: #fff; font-size: 16px; }
/* Шат 1 — зурган дээрх хөх gradient */
.jtree__node--d1 { min-height: 92px; background: linear-gradient(180deg, #5b9bd8 0%, #2f74b5 100%); color: #fff; box-shadow: 0 4px 10px rgba(3, 91, 165, .15); }
/* Шат 2 — улирал (data-color өгөөгүй бол шар) */
.jtree__node--d2 { min-height: 120px; background: #ffe08a; color: rgba(0, 0, 0, .85); }
.jtree__node--d2 .jtree__chev { background: rgba(0, 0, 0, .08); }
/* Шат 3 — сургалт */
.jtree__node--d3 { min-height: 56px; background: #fff3cf; color: rgba(0, 0, 0, .85); font-weight: 400; font-size: 14px; }
.jtree__node--d3 .jtree__chev { background: rgba(0, 0, 0, .08); }
a.jtree__node--d3:hover { color: #3232b5; }

/* ---------- Гар утас: accordion ---------- */
.jtree__acc { display: none; }
@media (max-width: 900px) {
    .jtree__stage { display: none; }
    .jtree__acc { display: block; }
    .jtree__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
    .jtree__list .jtree__list { margin: 8px 0 4px 14px; padding-left: 12px; border-left: 2px solid rgba(3, 91, 165, .25); }
    .jtree__li { margin: 0; }
    .jtree__list[hidden] { display: none; }
    .jtree__acc .jtree__node { min-height: 52px; justify-content: space-between; text-align: left; padding: 12px 14px; }
    .jtree__acc .jtree__node:hover { transform: none; }
    .jtree__acc .jtree__node.is-active .jtree__chev { transform: rotate(90deg); }
    .jtree__acc .jtree__node.is-active { outline-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .jtree__col, .jtree__line, .jtree__node { transition: none !important; }
}

/* =========================================================
   Блок → Item → Хуудас (Япон хэлний сургалт)
   Блокууд хажуу тийшээ жагсана → хулгана очиход доошоо item-ууд задарна
   → item дээр дарахад тухайн item-ийн хуудаснууд гарч ирнэ.
   ========================================================= */
.jb { --jb-gap: 16px; --jb-line: rgba(3, 91, 165, .35); margin: 24px 0; }
.jb__row { display: grid; grid-template-columns: repeat(var(--jb-cols, 6), minmax(0, 1fr)); gap: var(--jb-gap); align-items: start; }

/* ---------- Блок (хэвтээ карт) ---------- */
.jb-block { position: relative; display: flex; flex-direction: column; min-width: 0; counter-increment: jb; }
.jb { counter-reset: jb; }
.jb-block__head {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 136px; margin: 0; padding: 28px 14px 22px;   /* бүх блок ижил өндөр */
    border: 0; border-radius: 16px; cursor: pointer; text-align: center;
    background: linear-gradient(180deg, #5b9bd8 0%, #2f74b5 100%);
    box-shadow: 0 8px 20px rgba(3, 91, 165, .18), inset 0 1px 0 rgba(255, 255, 255, .25);
    color: #fff; font: inherit; font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere;
    outline: 2px solid transparent; outline-offset: 3px;
    transition: transform .25s, box-shadow .25s, outline-color .2s;
}
.jb-block__head::before {
    content: counter(jb, decimal-leading-zero); position: absolute; top: 10px; left: 12px;
    font-size: 12px; font-weight: 600; letter-spacing: .04em; color: rgba(255, 255, 255, .65);
}
.jb-block__chev { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .22); transition: transform .25s; }
.jb-block__chev svg, .jb-item__chev svg, .jb-page svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jb-block:hover .jb-block__head, .jb-block.is-open .jb-block__head { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(3, 91, 165, .28), inset 0 1px 0 rgba(255, 255, 255, .25); }
.jb-block.is-open .jb-block__head { outline-color: #3232b5; }
.jb-block.is-open .jb-block__chev { transform: rotate(180deg); }
.jb-block.is-empty .jb-block__chev { display: none; }

/* ---------- Item-ууд: блокийн доор задарна ---------- */
.jb-block__items {
    display: grid; grid-template-rows: 0fr; opacity: 0;
    transition: grid-template-rows .35s ease, opacity .25s ease, margin-top .35s ease;
}
.jb-block.is-open .jb-block__items { grid-template-rows: 1fr; opacity: 1; margin-top: 20px; }
.jb-block__items > .jb-items { min-height: 0; overflow: hidden; }
.jb-items { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0 !important; padding: 0 !important; list-style: none !important; }
/* блокоос доош холбох шугам */
.jb-block.is-open .jb-block__items::before {
    content: ""; position: absolute; left: 50%; top: -20px; width: 2px; height: 20px; background: var(--jb-line);
}
.jb-block__items { position: relative; }

.jb-item { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.jb-item::marker { content: none; }
.jb-item__btn {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
    min-height: 56px; margin: 0; padding: 12px 14px; border: 0; border-radius: 12px; cursor: pointer; text-align: left;
    background: var(--jb-c, #ffe08a); color: rgba(0, 0, 0, .85);
    font: inherit; font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere;
    outline: 2px solid transparent; outline-offset: -2px;   /* дотор талд — таслагдахгүй */
    transition: box-shadow .2s, outline-color .2s, filter .2s;
}
.jb-item__btn:hover { filter: brightness(.97); outline-color: rgba(50, 50, 181, .35); }
.jb-item.is-open .jb-item__btn { outline-color: #3232b5; }
.jb-item__chev { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .08); transition: transform .25s; }
.jb-item.is-open .jb-item__chev { transform: rotate(90deg); }

/* ---------- Хуудаснууд: item дээр дарахад ---------- */
.jb-item__pages {
    display: grid; grid-template-rows: 0fr; opacity: 0;
    transition: grid-template-rows .3s ease, opacity .25s ease, margin-top .3s ease;
}
.jb-item.is-open .jb-item__pages { grid-template-rows: 1fr; opacity: 1; margin-top: 8px; }
.jb-item__pages > ul { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; margin: 0 0 0 10px !important; padding: 0 0 0 12px !important; list-style: none !important; border-left: 2px solid var(--jb-line); }
.jb-item__pages li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.jb-item__pages li::marker { content: none; }
.jb-item__pages a, .jb-page {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
    background: var(--jb-c-soft, #fff7db); color: rgba(0, 0, 0, .8) !important; text-decoration: none !important;
    font-size: 14px; line-height: 1.4; transition: background-color .15s, color .15s;
}
.jb-item__pages a::after {
    content: ""; flex: none; width: 14px; height: 14px; margin-left: auto;
    background: currentColor; opacity: .5;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.jb-item__pages a:hover { background: #fff; color: #3232b5 !important; }
.jb-empty { padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .04); color: rgba(0, 0, 0, .5); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) { .jb__row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; } }
@media (max-width: 700px) {
    .jb__row { grid-template-columns: 1fr; gap: 12px; }
    .jb-block__head { min-height: 72px; justify-content: flex-start; text-align: left; padding: 22px 48px 14px 16px; }
    .jb-block__chev { top: 50%; bottom: auto; margin-top: -11px; }
    .jb-block.is-open .jb-block__items { margin-top: 12px; }
    .jb-block__items > .jb-items { padding-left: 14px; }
    .jb-block.is-open .jb-block__items::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .jb * { transition: none !important; } }

/* ---------- Шууд холбоостой блок (item-гүй) ---------- */
a.jb-block__head { color: #fff; text-decoration: none; }
.jb-block--link .jb-block__chev { display: grid; background: rgba(255, 255, 255, .28); }
.jb-block--link:hover .jb-block__chev { transform: translateX(3px); }
.jb-block--link .jb-block__head:hover { outline-color: rgba(255, 255, 255, .6); }

/* ---------- Шууд холбоостой item ---------- */
a.jb-item__btn { text-decoration: none !important; color: rgba(0, 0, 0, .85) !important; }
.jb-item--link .jb-item__chev { transition: transform .2s; }
.jb-item--link:hover .jb-item__chev { transform: translateX(3px); }

/* ---------- Item-гүй блокийн текст (доошоо задарна) ---------- */
.jb-block__items > .jb-block__text { min-height: 0; overflow: hidden; }
.jb-block__text {
    position: relative; padding: 16px 18px !important; background: #fff; border: 1px solid #e4e4e4; border-radius: 12px;
    font-size: 15px; line-height: 1.6; color: rgba(0, 0, 0, .75); overflow-wrap: anywhere;
}
.jb-block:not(.is-open) .jb-block__text { padding-top: 0 !important; padding-bottom: 0 !important; border-color: transparent; }
.jb-block__text > :first-child { margin-top: 0 !important; }
.jb-block__text > :last-child { margin-bottom: 0 !important; }
.jb-block__text p { margin: 0 0 8px !important; }
.jb-block__text ul, .jb-block__text ol { margin: 0 0 8px !important; padding-left: 1.2em !important; }
.jb-block__text img { max-width: 100%; height: auto; border-radius: 8px; }
.jb-block__text a { color: #035ba5; }
@media (max-width: 700px) { .jb-block__items > .jb-block__text { margin-left: 14px; } }

/* ---------- Зурагтай блок / item: «Бусад» картууд шиг — цагаан карт, голд нь дугуй зураг, доор нь нэр ----------
   Зураггүй эсвэл зураг ачаалагдаагүй бол (onerror → img устна) өмнөх шигээ зөвхөн нэр харагдана. */
.jb-block__head:has(> .jb-photo), .jb-item__btn:has(> .jb-photo) {
    flex-direction: column; align-items: center; justify-content: flex-start; text-align: center;
    background: #fff !important; color: rgba(0, 0, 0, .8) !important; border: 1px solid #e4e4e4;
    box-shadow: none; filter: none;
}
.jb-photo {
    display: block; flex: none; max-width: none !important; margin: 0 auto !important; aspect-ratio: 1 / 1;
    object-fit: cover; object-position: center; border-radius: 50% !important; background: #f6f6f6;
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e4e4e4; transition: box-shadow .25s, transform .5s;
}
.jb-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; overflow-wrap: anywhere; }
.jb-block__head:has(> .jb-photo) .jb-name, .jb-item__btn:has(> .jb-photo) .jb-name { font-weight: 500; line-height: 1.3; text-transform: uppercase; color: rgba(0, 0, 0, .8); transition: color .2s; }

/* Блок */
.jb-block__head:has(> .jb-photo) { gap: 16px; min-height: 0; padding: 24px 16px 38px; border-radius: 24px; }
.jb-block__head:has(> .jb-photo)::before { display: none; }                         /* дугаар харагдахгүй */
.jb-block__head > .jb-photo { width: 120px !important; height: 120px !important; }
.jb-block__head:has(> .jb-photo) .jb-name { font-size: 16px; min-height: calc(1.3em * 2); }
.jb-block__head:has(> .jb-photo) .jb-block__chev { background: rgba(0, 0, 255, .06); color: #3232b5; }

/* Item */
.jb-item__btn:has(> .jb-photo) { gap: 10px; min-height: 0; padding: 16px 12px 30px; border-radius: 16px; }
.jb-item__btn > .jb-photo { width: 80px !important; height: 80px !important; }
.jb-item__btn:has(> .jb-photo) .jb-name { font-size: 14px; }
.jb-item__btn:has(> .jb-photo) .jb-item__chev { position: absolute; right: 8px; bottom: 8px; }
.jb-item__btn { position: relative; }

/* Hover / нээлттэй */
.jb-block:hover .jb-block__head:has(> .jb-photo), .jb-item__btn:has(> .jb-photo):hover { border-color: rgba(0, 0, 255, .2); box-shadow: 0 12px 32px rgba(13, 39, 80, .08); }
.jb-block:hover .jb-photo, .jb-item__btn:hover > .jb-photo, .jb-block.is-open .jb-block__head > .jb-photo, .jb-item.is-open .jb-photo { box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(102, 126, 234, .7); }
.jb-block:hover .jb-block__head:has(> .jb-photo) .jb-name, .jb-block.is-open .jb-block__head:has(> .jb-photo) .jb-name,
.jb-item__btn:has(> .jb-photo):hover .jb-name, .jb-item.is-open .jb-item__btn:has(> .jb-photo) .jb-name { color: #3232b5; }
.jb-block.is-open .jb-block__head:has(> .jb-photo) { border-color: rgba(0, 0, 255, .3); outline-color: #3232b5; }

@media (max-width: 700px) {
    .jb-block__head:has(> .jb-photo) { flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px 48px 14px 14px; border-radius: 16px; }
    .jb-block__head > .jb-photo { width: 64px !important; height: 64px !important; margin: 0 !important; }
    .jb-block__head:has(> .jb-photo) .jb-name { min-height: 0; }
    .jb-item__btn:has(> .jb-photo) { flex-direction: row; text-align: left; padding: 10px 44px 10px 10px; }
    .jb-item__btn > .jb-photo { width: 52px !important; height: 52px !important; margin: 0 !important; }
    .jb-item__btn:has(> .jb-photo) .jb-item__chev { bottom: auto; top: calc(50% - 11px); }
}

/* =========================================================
   БҮХ блок «Бусад» картын загвартай: цагаан карт, голд нь дугуй, доор нь нэр
   Зурагтай бол дугуйд зураг, зураггүй бол дугуйд блокийн дугаар (01, 02…) gradient дээр
   ========================================================= */
.jb-block__head {
    flex-direction: column; align-items: center; justify-content: flex-start; gap: 16px; text-align: center;
    min-height: 0; padding: 24px 16px 38px; border: 1px solid #e4e4e4; border-radius: 24px;
    background: #fff; color: rgba(0, 0, 0, .8); box-shadow: none;
}
a.jb-block__head { color: rgba(0, 0, 0, .8); }
/* Зураггүй блок: дугаартай gradient дугуй */
.jb-block__head::before {
    position: static; display: grid; place-items: center; flex: none; width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e4e4e4;
    font-size: 34px; font-weight: 600; letter-spacing: .02em; color: #fff; transition: box-shadow .25s;
}
.jb-block__head:has(> .jb-photo)::before { display: none; }
.jb-block__head .jb-name, .jb-block__head > span:not(.jb-block__chev) {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%;
    min-height: calc(1.3em * 2); font-size: 16px; font-weight: 500; line-height: 1.3; text-transform: uppercase;
    color: rgba(0, 0, 0, .8); transition: color .2s;
}
.jb-block__chev, .jb-block--link .jb-block__chev { background: rgba(0, 0, 255, .06); color: #3232b5; }

/* Hover / нээлттэй */
.jb-block:hover .jb-block__head, .jb-block.is-open .jb-block__head { transform: translateY(-2px); border-color: rgba(0, 0, 255, .2); box-shadow: 0 12px 32px rgba(13, 39, 80, .08); }
.jb-block:hover .jb-block__head::before, .jb-block.is-open .jb-block__head::before { box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(102, 126, 234, .7); }
.jb-block:hover .jb-block__head > span:not(.jb-block__chev), .jb-block.is-open .jb-block__head > span:not(.jb-block__chev) { color: #3232b5; }
.jb-block.is-open .jb-block__head { border-color: rgba(0, 0, 255, .3); outline-color: #3232b5; }
.jb-block--link .jb-block__head:hover { outline-color: transparent; }

@media (max-width: 700px) {
    .jb-block__head { flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px 48px 14px 14px; border-radius: 16px; }
    .jb-block__head::before { width: 64px; height: 64px; font-size: 20px; }
    .jb-block__head > .jb-photo { width: 64px !important; height: 64px !important; margin: 0 !important; }
    .jb-block__head .jb-name, .jb-block__head > span:not(.jb-block__chev) { min-height: 0; }
}

/* =========================================================
   БҮХ item блоктой ижил картын загвартай (арай жижиг)
   Зурагтай бол дугуйд зураг, зураггүй бол дугуйд item-ийн өнгө (--jb-c) дээр дугаар
   ========================================================= */
.jb-items { counter-reset: jbi; }
.jb-item { counter-increment: jbi; }
.jb-item__btn {
    position: relative; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; text-align: center;
    min-height: 0; padding: 16px 12px 30px; border: 1px solid #e4e4e4; border-radius: 16px;
    background: #fff !important; color: rgba(0, 0, 0, .8) !important; filter: none; outline-offset: -2px;
    transition: border-color .2s, box-shadow .25s, outline-color .2s;
}
a.jb-item__btn { color: rgba(0, 0, 0, .8) !important; }
/* Зураггүй item: өнгөт дугуй + дугаар */
.jb-item__btn::before {
    content: counter(jbi, decimal-leading-zero);
    display: grid; place-items: center; flex: none; width: 72px; height: 72px; border-radius: 50%;
    background: var(--jb-c, #ffe08a); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4e4e4;
    font-size: 20px; font-weight: 600; color: rgba(0, 0, 0, .7); transition: box-shadow .25s;
}
.jb-item__btn:has(> .jb-photo)::before { display: none; }
.jb-item__btn > .jb-photo { width: 72px !important; height: 72px !important; margin: 0 auto !important; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4e4e4; }
.jb-item__btn .jb-name, .jb-item__btn > span:not(.jb-item__chev) {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%;
    font-size: 14px; font-weight: 500; line-height: 1.3; text-transform: uppercase; color: rgba(0, 0, 0, .8); transition: color .2s;
}
.jb-item__btn .jb-item__chev { position: absolute; right: 8px; bottom: 8px; width: 20px; height: 20px; background: rgba(0, 0, 255, .06); color: #3232b5; }

/* Hover / нээлттэй */
.jb-item__btn:hover, .jb-item.is-open .jb-item__btn { border-color: rgba(0, 0, 255, .2); box-shadow: 0 10px 24px rgba(13, 39, 80, .08); filter: none; }
.jb-item__btn:hover::before, .jb-item.is-open .jb-item__btn::before,
.jb-item__btn:hover > .jb-photo, .jb-item.is-open .jb-item__btn > .jb-photo { box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(102, 126, 234, .7); }
.jb-item__btn:hover > span:not(.jb-item__chev), .jb-item.is-open .jb-item__btn > span:not(.jb-item__chev) { color: #3232b5; }
.jb-item.is-open .jb-item__btn { outline-color: #3232b5; }
.jb-item--link .jb-item__btn:hover { outline-color: transparent; }

@media (max-width: 700px) {
    .jb-item__btn { flex-direction: row; justify-content: flex-start; text-align: left; padding: 10px 40px 10px 10px; }
    .jb-item__btn::before, .jb-item__btn > .jb-photo { width: 48px !important; height: 48px !important; font-size: 15px; margin: 0 !important; }
    .jb-item__btn .jb-item__chev { bottom: auto; top: calc(50% - 10px); }
}

/* =========================================================
   ЭЦСИЙН ЗАГВАР: блок, item, доод «Бусад» картууд — бүгд «Танхим» картын загвартай
   Дээр нь тэгш өнцөгт зураг (бүтэн өргөнөөр), доор нь зүүн тийш тэгшилсэн нэр.
   Зураггүй бол орлох зураг (students.jpg) гарна.
   ========================================================= */
/* --- Блок --- */
.jb-block__head, .jb-block__head:has(> .jb-photo) {
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; text-align: left;
    min-height: 0; padding: 0; overflow: hidden; border: 1px solid #e4e4e4; border-radius: 16px;
    background: #fff !important; color: rgba(0, 0, 0, .8) !important; box-shadow: none; filter: none; outline-offset: -2px;
}
.jb-block__head::before, .jb-block__head:has(> .jb-photo)::before { display: none; }
.jb-block__head > .jb-photo {
    width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; margin: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; object-fit: cover; transition: transform .5s;
}
.jb-block__head .jb-name, .jb-block__head:has(> .jb-photo) .jb-name, .jb-block__head > span:not(.jb-block__chev) {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: calc(1.4em * 2); padding: 0; margin: 18px 44px 22px 20px; width: auto;
    font-size: 18px; font-weight: 500; line-height: 1.4; text-transform: none; color: rgba(0, 0, 0, .8);
}
.jb-block__head .jb-block__chev { right: 14px; bottom: 14px; }
.jb-block:hover .jb-block__head, .jb-block.is-open .jb-block__head { transform: translateY(-2px); border-color: rgba(0, 0, 255, .2); box-shadow: 0 12px 32px rgba(13, 39, 80, .08); }
.jb-block:hover .jb-block__head > .jb-photo { transform: scale(1.04); }
.jb-block:hover .jb-block__head > .jb-photo, .jb-block.is-open .jb-block__head > .jb-photo { box-shadow: none !important; }
.jb-block:hover .jb-block__head .jb-name, .jb-block.is-open .jb-block__head .jb-name { color: #3232b5; }
.jb-block.is-open .jb-block__head { outline-color: #3232b5; }

/* --- Item (арай жижиг) --- */
.jb-item__btn, .jb-item__btn:has(> .jb-photo) {
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; text-align: left;
    padding: 0; overflow: hidden; border: 1px solid #e4e4e4; border-radius: 12px;
}
.jb-item__btn::before { display: none; }
.jb-item__btn > .jb-photo {
    width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; margin: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; object-fit: cover; transition: transform .5s;
    border-bottom: 4px solid var(--jb-c, #ffe08a);                       /* item-ийн өнгөөр ялгагдана */
}
.jb-item__btn .jb-name, .jb-item__btn:has(> .jb-photo) .jb-name, .jb-item__btn > span:not(.jb-item__chev) {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    padding: 0; margin: 12px 36px 14px 14px; width: auto; font-size: 15px; font-weight: 500; line-height: 1.4; text-transform: none;
}
.jb-item__btn .jb-item__chev, .jb-item__btn:has(> .jb-photo) .jb-item__chev { position: absolute; right: 10px; bottom: 12px; top: auto; }
.jb-item__btn:hover > .jb-photo { transform: scale(1.04); }
.jb-item__btn:hover > .jb-photo, .jb-item.is-open .jb-item__btn > .jb-photo { box-shadow: none !important; }

/* --- Доод «Бусад» картууд (sp-card) — энэ хуудсанд --- */
.sp-cards__grid { gap: 24px; }
.sp-card { align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 16px; text-align: left; }
.sp-card__img {
    width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; margin: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; background: #f6f6f6;
}
.sp-card:hover .sp-card__img, .sp-card.is-active .sp-card__img { box-shadow: none !important; }
.sp-card:hover .sp-card__img img { transform: scale(1.04); }
.sp-card__name {
    min-height: calc(1.4em * 2); padding: 0; margin: 18px 24px 26px; width: auto;
    font-size: 20px; font-weight: 500; line-height: 1.4; text-transform: none; color: rgba(0, 0, 0, .8);
}

@media (max-width: 700px) {
    .jb-block__head, .jb-block__head:has(> .jb-photo), .jb-item__btn, .jb-item__btn:has(> .jb-photo) { flex-direction: column; text-align: left; padding: 0; }
    .jb-block__head > .jb-photo { width: 100% !important; height: auto !important; aspect-ratio: 16 / 7; }
    .jb-item__btn > .jb-photo { width: 100% !important; height: auto !important; aspect-ratio: 16 / 7; }
    .jb-block__head .jb-name, .jb-block__head:has(> .jb-photo) .jb-name, .jb-block__head > span:not(.jb-block__chev) { min-height: 0; padding: 0; margin: 12px 44px 14px 14px; font-size: 16px; }
    .jb-block__head .jb-block__chev { top: auto; bottom: 12px; margin-top: 0; }
    .jb-item__btn .jb-item__chev, .jb-item__btn:has(> .jb-photo) .jb-item__chev { top: auto; bottom: 12px; }
    .sp-card__name { font-size: 15px; padding: 0; margin: 12px 14px 16px; min-height: calc(1.4em * 2); }
}

/* ---------- Блокийн текст item-уудын дээр (блок нь item-тэй ба тексттэй үед) ---------- */
.jb-items > .jb-items__text { list-style: none; margin: 0; padding: 0; }
.jb-items > .jb-items__text::before, .jb-items > .jb-items__text::after { display: none; }
.jb-block__text { text-align: left; }

/* ---------- Блок ба доод картын хоорондох холбох зураасыг арилгана ---------- */
.jb-block.is-open .jb-block__items::before { display: none !important; }
.jb-block.is-open .jb-block__items { margin-top: 12px; }