/* ── Тэнхимийн tab content: бүрэн өндөр, scrollгүй ── */
#branchDeptTabContent {
    max-height: none;
    overflow: visible;
    border-radius: 12px;
    border: 1px solid rgba(26,116,170,.12);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
#branchDeptTabContent .tab-pane {
    padding: 36px 32px 40px;
}
#branchDeptTabContent .tab-pane p,
#branchDeptTabContent .tab-pane li {
    font-size: .96rem;
    line-height: 1.8;
    color: #3a3a3a;
    margin-bottom: .65rem;
}
#branchDeptTabContent .tab-pane ol,
#branchDeptTabContent .tab-pane ul {
    padding-left: 1.4rem;
    margin-bottom: .75rem;
}
#branchDeptTabContent .tab-pane strong {
    color: #1a74aa;
}
#branchDeptTabContent::-webkit-scrollbar-thumb:hover {
    background: #145d89;
}
/* ── end dept tab scroll ── */

body.page-new .salbar-surguuli-head {
padding: clamp(64px, 8vw, 96px) 0 clamp(36px, 5vw, 52px);
background: linear-gradient(135deg, rgba(26,116,170,.1) 0%, #fff 60%, rgba(86,156,97,.08) 100%);
border-bottom: 1px solid rgba(0,0,0,.06);
}
body.page-new .salbar-surguuli-head .title {
font-size: clamp(1.6rem, 3.2vw, 2.25rem);
font-weight: 700;
letter-spacing: -.02em;
margin-bottom: .75rem;
color: #111827;
}
body.page-new .salbar-surguuli-head .subtitle p { margin:0; max-width:760px; color:rgba(17,24,39,.72); line-height:1.7; }
body.page-new .salbar-surguuli-content { background:#f9fafb; padding:clamp(30px,4vw,52px) 0; }
body.page-new .salbar-surguuli-content .taniltsuulga,
body.page-new .salbar-surguuli-content .tailbar {
background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:14px;
box-shadow:0 10px 28px rgba(15,23,42,.06); padding:1.25rem 1.35rem; height:100%;
}
/* Programs */
body.page-new .surgalt-main { background:#fafbfc; padding:clamp(32px,4vw,56px) 0 clamp(48px,6vw,80px); }
body.page-new .surgalt-main .tab-section { background:#fff; border:1px solid rgba(0,0,0,.05); border-radius:16px; box-shadow:0 6px 24px rgba(15,23,42,.06); padding:.6rem .75rem; }
body.page-new .surgalt-main .tab-ul { display:flex; flex-wrap:wrap; gap:.5rem; border-bottom:none; margin-bottom:0; }
body.page-new .surgalt-main .tab-ul > li { margin:0; }
body.page-new .surgalt-main .tab-ul > li > a {
display:inline-flex; align-items:center; padding:.5rem .95rem; border-radius:999px;
border:1px solid transparent; background:rgba(15,23,42,.05); color:rgba(17,24,39,.78);
font-weight:600; text-decoration:none; transition:all .2s ease;
}
body.page-new .surgalt-main .tab-ul > li.active > a,
body.page-new .surgalt-main .tab-ul > li > a.active {
color:#fff; background:linear-gradient(135deg,#1a74aa 0%,#156a9a 100%);
box-shadow:0 4px 14px rgba(26,116,170,.28);
}
body.page-new .surgalt-main .cat-key ul { display:flex; justify-content:flex-end; gap:1rem; list-style:none; margin:0; padding:0; font-size:.8125rem; color:rgba(26,26,26,.55); }
body.page-new .surgalt-main .cat-key li::before { content:""; width:12px; height:12px; border-radius:3px; display:inline-block; margin-right:.4rem; vertical-align:-1px; }
body.page-new .surgalt-main .cat-key .key-li-1::before { background:#1a74aa; }
body.page-new .surgalt-main .cat-key .key-li-2::before { background:#569c61; }
body.page-new .surgalt-main .cat-key .key-li-3::before { background:#e67f32; }
body.page-new .surgalt-main .tab-content { margin-top:1.5rem; }
body.page-new .surgalt-main .edu-item {
position:relative; background:#fff; border-radius:12px;
box-shadow:0 8px 22px rgba(15,23,42,.06); border:1px solid rgba(0,0,0,.06);
overflow:hidden; transition:border-color .2s,box-shadow .2s,transform .2s;
}
body.page-new .surgalt-main .edu-item:hover { border-color:rgba(26,116,170,.22); box-shadow:0 12px 26px rgba(0,0,0,.08); transform:translateY(-2px); }
body.page-new .surgalt-main .edu-item .training-item-footer { position:absolute; left:0; top:0; bottom:0; width:4px; border-radius:12px 0 0 12px; }
body.page-new .surgalt-main .edu-item .edu,
body.page-new .surgalt-main .edu-item .title,
body.page-new .surgalt-main .edu-item .showmore { padding-left:.75rem; padding-right:.9rem; }
body.page-new .surgalt-main .edu-item .showmore p { color:#1a74aa; font-weight:600; }
/* Enroll */
body.page-new .branch-enroll { background:linear-gradient(135deg,#1a74aa 0%,#156a9a 100%); padding:clamp(36px,5vw,64px) 0; }
body.page-new .branch-enroll .area { color:#fff; }
body.page-new .branch-enroll .area .title { font-size:clamp(1.3rem,2.8vw,1.75rem); font-weight:700; margin-bottom:.75rem; }
body.page-new .branch-enroll .area .desc { opacity:.88; line-height:1.7; margin-bottom:1.5rem; max-width:680px; }
body.page-new .branch-enroll .area .button a {
display:inline-flex; align-items:center; padding:.65rem 1.75rem;
background:#fff; color:#1a74aa; border-radius:999px; font-weight:700;
text-decoration:none; transition:opacity .2s;
}
body.page-new .branch-enroll .area .button a:hover { opacity:.88; }
/* Department tabs */
body.page-new .branch-department { background:#f9fafb; padding:clamp(40px,5vw,72px) 0; }
body.page-new .branch-department .content-title { margin-bottom:1.5rem; }
body.page-new .branch-department .content-title .schoolname { font-size:clamp(1.2rem,2.5vw,1.5rem); font-weight:700; color:#111827; margin:0 0 .25rem; }
body.page-new .branch-department .content-title .dep-text { color:rgba(17,24,39,.6); margin:0; }
body.page-new .branch-department .branch-dep { flex-direction:column; border:none; gap:.35rem; }
body.page-new .branch-department .branch-dep > li { margin:0; }
body.page-new .branch-department .branch-dep > li > a {
display:block; padding:.6rem .9rem; border-radius:10px;
border:1px solid rgba(0,0,0,.07); background:#fff; color:rgba(17,24,39,.75);
font-weight:600; font-size:.875rem; line-height:1.4; text-decoration:none;
transition:all .2s;
}
body.page-new .branch-department .branch-dep > li.active > a {
background:linear-gradient(135deg,#1a74aa 0%,#156a9a 100%);
color:#fff; border-color:transparent;
box-shadow:0 4px 14px rgba(26,116,170,.28);
}
body.page-new .branch-department .scroll-department-content { background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:14px; box-shadow:0 8px 22px rgba(15,23,42,.06); padding:1.5rem; }
body.page-new .branch-department .dep-tab-content { line-height:1.75; color:#374151; }

/* Branch director */
body.page-new .branch-director {
  padding: clamp(40px, 5vw, 72px) 0;
  background: #fff;
}
body.page-new .branch-director__card {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 55%, #f0f7fc 100%);
  border: 1px solid rgba(26, 116, 170, 0.12);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}
body.page-new .branch-director__photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}
body.page-new .branch-director__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
body.page-new .branch-director__body {
  min-width: 0;
}
body.page-new .branch-director__label {
  margin: 0 0 .65rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1a74aa;
}
body.page-new .branch-director__name {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin: 0 0 .75rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
}
body.page-new .branch-director__name-line--muted {
  color: #6b7280;
  font-weight: 600;
}
body.page-new .branch-director__name-line--accent {
  color: #1a74aa;
  font-weight: 700;
  text-transform: uppercase;
}
body.page-new .branch-director__degree {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.45;
}
body.page-new .branch-director__dept {
  margin: 0 0 1.25rem;
  font-size: .9375rem;
  color: rgba(17, 24, 39, .55);
  line-height: 1.45;
}
body.page-new .branch-director__more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 116, 170, .22);
  background: rgba(26, 116, 170, .08);
  color: #1a74aa;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
body.page-new .branch-director__more i {
  font-size: 1.25rem;
  line-height: 1;
}
body.page-new .branch-director__more:hover {
  background: rgba(26, 116, 170, .15);
  box-shadow: 0 4px 14px rgba(26, 116, 170, .15);
  transform: translateY(-1px);
}
@media (max-width: 767.98px) {
  body.page-new .branch-director__card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  body.page-new .branch-director__photo {
    max-width: 260px;
    margin: 0 auto;
  }
  body.page-new .branch-director__name {
    align-items: center;
  }
  body.page-new .branch-director__more {
    margin: 0 auto;
  }
}

/* Teachers 4-per-row, 12 per page */
body.page-new .branch-ourteachers { background:linear-gradient(180deg,#fff 0%,#f9fafb 55%,#f3f4f6 100%); padding:clamp(40px,5vw,72px) 0 clamp(48px,6vw,88px); }
body.page-new .branch-ourteachers.branch-ourteachers--in-dept {
  background: transparent;
  padding: 1.75rem 0 0;
  margin-top: 1.25rem;
  border-top: 1px solid #eef2f6;
}

/* Department tabs: top row + full-width content */
body.page-new .page-new-coop-org-layout--top {
  flex-direction: column !important;
  align-items: stretch !important;
}

body.page-new .page-new-coop-org-layout--top .page-new-coop-org-nav-col {
  flex: none !important;
  max-width: none !important;
  width: 100%;
  align-self: stretch !important;
  border-right: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.page-new .page-new-coop-org-layout--top .page-new-coop-org-nav {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  height: auto !important;
  position: static !important;
  top: auto !important;
  border-bottom: none !important;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.page-new .page-new-coop-org-layout--top .page-new-coop-org-btn {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.55rem 1rem;
}

body.page-new .page-new-coop-org-layout--top .page-new-coop-org-btn:hover {
  border-color: #bfd8ea;
  color: #1a74aa;
  background: #f0f7fc;
}

body.page-new .page-new-coop-org-layout--top .page-new-coop-org-btn.active {
  background: #1a74aa;
  border-color: #1a74aa;
  color: #fff;
}

body.page-new .page-new-coop-org-layout--top > .flex-grow-1 {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
}
body.page-new .branch-ourteachers .teachers-list .teachers-item { display:grid !important; grid-template-columns:repeat(4, 1fr); gap:1.25rem; }
@media (max-width:1199px) { body.page-new .branch-ourteachers .teachers-list .teachers-item { grid-template-columns:repeat(3, 1fr); } }
@media (max-width:767px)  { body.page-new .branch-ourteachers .teachers-list .teachers-item { grid-template-columns:repeat(2, 1fr); } }
@media (max-width:479px)  { body.page-new .branch-ourteachers .teachers-list .teachers-item { grid-template-columns:1fr; } }
body.page-new .branch-ourteachers .branch-teachers-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
body.page-new .branch-ourteachers .branch-teachers-pagination__pages {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
body.page-new .branch-ourteachers .branch-teachers-pagination__btn,
body.page-new .branch-ourteachers .branch-teachers-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .65rem;
  border: 1px solid #e2e5e8;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s;
}
body.page-new .branch-ourteachers .branch-teachers-pagination__btn i {
  font-size: 1.35rem;
  line-height: 1;
}
body.page-new .branch-ourteachers .branch-teachers-pagination__btn:hover:not(:disabled),
body.page-new .branch-ourteachers .branch-teachers-pagination__page:hover {
  border-color: #cfd4d9;
  color: #1a74aa;
}
body.page-new .branch-ourteachers .branch-teachers-pagination__page.is-active {
  background: #1a74aa;
  border-color: #1a74aa;
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 116, 170, .2);
}
body.page-new .branch-ourteachers .branch-teachers-pagination__btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}
body.page-new .branch-ourteachers .teacher-list-item {
border-radius:14px; overflow:hidden; background:#fff;
box-shadow:0 6px 20px rgba(15,23,42,.07); border:1px solid rgba(0,0,0,.06);
transition:transform .2s,box-shadow .2s;
}
body.page-new .branch-ourteachers .teacher-list-item:hover { transform:translateY(-3px); box-shadow:0 12px 28px rgba(15,23,42,.1); }
body.page-new .branch-ourteachers .teacher-list-item .image { aspect-ratio:1; overflow:hidden; background:#f3f4f6; }
body.page-new .branch-ourteachers .teacher-list-item .image img { width:100%; height:100%; object-fit:cover; object-position:center top; display:block; }
body.page-new .branch-ourteachers .teacher-list-item .info { padding:.7rem .85rem .75rem; }
body.page-new .branch-ourteachers .teacher-list-item .info .branch-teacher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
body.page-new .branch-ourteachers .teacher-list-item .info .firstname {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}
body.page-new .branch-ourteachers .teacher-list-item .info .firstname__line {
  display: block;
}
body.page-new .branch-ourteachers .teacher-list-item .info .firstname__line--muted {
  color: #6b7280;
  font-weight: 600;
}
body.page-new .branch-ourteachers .teacher-list-item .info .firstname__line--accent {
  color: #1a74aa;
  font-weight: 700;
  text-transform: uppercase;
}
body.page-new .branch-ourteachers .teacher-list-item .info .position,
body.page-new .branch-ourteachers .branch-teacher-info .position {
  display: block;
  font-size: .8125rem;
  color: rgba(17, 24, 39, .6);
  line-height: 1.4;
  margin-top: .35rem;
}
body.page-new .branch-ourteachers .teacher-list-item .info .more-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  color: #1a74aa;
  background: rgba(26, 116, 170, .08);
  border: 1px solid rgba(26, 116, 170, .2);
  cursor: pointer;
  transition: background .2s, transform .15s;
}
body.page-new .branch-ourteachers .teacher-list-item .info .more-btn i {
  font-size: 1.25rem;
  line-height: 1;
}
body.page-new .branch-ourteachers .teacher-list-item .info .more-btn:hover {
  background: rgba(26, 116, 170, .15);
  transform: scale(1.05);
}
body.page-new .branch-ourteachers .teacher-list-item .branch-info-morebtn,
body.page-new .branch-ourteachers .teacher-list-item .showmore { display:none; }
body.page-new .branch-ourteachers .teacher-list-info { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1.5rem; }
body.page-new .branch-ourteachers .teachers-count { font-size:clamp(1rem,2.2vw,1.125rem); font-weight:600; color:#111827; }
body.page-new .people-slider-controller.branch { display:flex; align-items:center; gap:.5rem; }
body.page-new .people-slider-controller.branch .slider-arrow { display:none; }
body.page-new .people-slider-controller.branch .teachers-see-all,
body.page-new .people-slider-controller.branch .teachers-see-less { font-size:.875rem; font-weight:600; color:#1a74aa; cursor:pointer; }
/* Modal */
/* ══════════════════════════════════════
   Teacher Detail Modal — modern redesign
   ══════════════════════════════════════ */
.tdm-dialog { max-width: min(900px, 94vw); margin: 40px auto; }

.tdm-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
}

/* ── Head ── */
.tdm-head {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 36px 36px 28px;
    background: linear-gradient(135deg, #1a74aa 0%, #0e4f7a 100%);
    position: relative;
}
.tdm-photo-wrap {
    flex-shrink: 0;
    width: 140px;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.25);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.tdm-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
.tdm-info { flex: 1; min-width: 0; padding-top: 4px; }
.tdm-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.3;
}
.tdm-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1.25rem;
    row-gap: .65rem;
    align-items: start;
}
.tdm-meta-row {
    display: contents;
}
.tdm-meta-label {
    font-size: .875rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.45;
    padding-top: 0;
}
.tdm-meta-label .bx {
    font-size: 1rem;
    line-height: 1.45;
    flex-shrink: 0;
}
.tdm-meta-value,
.tdm-meta-value#degree {
    font-size: .875rem;
    font-weight: 400;
    color: #fff !important;
    line-height: 1.45;
    min-width: 0;
}
.tdm-meta-value *,
.tdm-meta-value#degree * {
    color: #fff !important;
    font-weight: 400;
}
.tdm-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background .2s;
    padding: 0;
    line-height: 1;
}
.tdm-close:hover { background: rgba(255,255,255,.3); }

/* ── Body ── */
.tdm-body { background: #fff; padding: 0 36px 32px; }

.tdm-tabs {
    display: flex;
    gap: 4px;
    padding: 20px 0 0;
    border-bottom: 2px solid #eef2f6;
    flex-wrap: wrap;
}
.tdm-tab-btn {
    padding: 9px 18px;
    border-radius: 8px 8px 0 0;
    font-size: .82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color .2s, background .2s;
    border: none;
    background: transparent;
    display: block;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
}
.tdm-tab-btn:hover { color: #1a74aa; background: #f0f7ff; }
.tdm-tab-btn.active {
    color: #1a74aa;
    border-bottom-color: #1a74aa;
    background: #f0f7ff;
}

.tdm-tab-content {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 20px;
}
.tdm-tab-content::-webkit-scrollbar { width: 4px; }
.tdm-tab-content::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.tdm-tab-content::-webkit-scrollbar-thumb { background: #1a74aa; border-radius: 4px; }

.tdm-pane-inner {
    padding: 4px 4px 8px;
    font-size: .9rem;
    line-height: 1.75;
    color: #374151;
}
.tdm-pane-inner:empty::after {
    content: 'Мэдээлэл байхгүй байна.';
    color: #94a3b8;
    font-style: italic;
    font-size: .85rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .tdm-head { flex-direction: column; padding: 24px 20px 20px; }
    .tdm-photo-wrap { width: 100%; height: 200px; }
    .tdm-body { padding: 0 20px 24px; }
    .tdm-tabs { gap: 2px; }
    .tdm-tab-btn { padding: 7px 12px; font-size: .78rem; }

    .tdm-meta {
        display: flex;
        flex-direction: column;
        gap: .85rem;
    }
    .tdm-meta-row {
        display: flex;
        flex-direction: column;
        gap: .2rem;
        align-items: flex-start;
    }
    .tdm-meta-label {
        white-space: normal;
    }
}

body.page-new #myModal .modal-dialog { max-width:min(960px, 92vw); }
