/* Inner pages, CMS content and the pieces added on top of the homepage theme. */

body { overflow-x: clip; }              /* keeps the sticky header working (overflow:hidden would break it) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--mihs-accent); color: #12140E; padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--mihs-accent); outline-offset: 2px; }

@media (min-width: 1200px) {
  .mihs-nav-link.active { color: var(--mihs-accent) !important; }
}
.mihs-nav-link.is-current { color: var(--mihs-accent) !important; }

/* ---------- Page banner ---------- */
.page-banner {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--mihs-primary-dark) 0%, var(--mihs-primary) 100%);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}
.page-banner.has-image { background-size: cover; background-position: center; height: 300px;}
.page-banner.has-image::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7, 80, 43, .92) 0%, rgba(10, 122, 65, .72) 100%);
}
.page-banner .container { position: relative; padding-top: 60px;}
.page-banner h1 {
  color: #fff; font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.15;
  letter-spacing: -.02em; margin: .5rem 0 .6rem;
}
.page-banner .banner-sub { font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 46rem; margin: 0; color: #E6F3EC; }
.breadcrumb-nav { font-size: .85rem; }
.breadcrumb-nav ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; }
.breadcrumb-nav li + li::before { content: "/"; color: rgba(255, 255, 255, .55); margin-right: .35rem; }
.breadcrumb-nav a { color: #fff; text-decoration: none; opacity: .85; }
.breadcrumb-nav a:hover { opacity: 1; color: var(--mihs-accent); }
.breadcrumb-nav [aria-current] { color: var(--mihs-accent-light); }

/* ---------- Content ---------- */
.cms-section { padding: clamp(2.5rem, 5vw, 4rem) 0; background: #fff; }
.cms-section.alt { background: var(--mihs-bg); border-top: 1px solid var(--mihs-line); border-bottom: 1px solid var(--mihs-line); }
.cms-content { font-size: 1.04rem; line-height: 1.75; color: #26332C; }
.cms-content h2, .cms-content h3, .cms-content h4 { color: var(--mihs-primary-dark); margin: 1.8rem 0 .8rem; }
.cms-content h2 { font-size: 1.7rem; } .cms-content h3 { font-size: 1.35rem; } .cms-content h4 { font-size: 1.1rem; }
.cms-content > :first-child { margin-top: 0; }
.cms-content a { color: var(--mihs-primary); text-underline-offset: 3px; }
.cms-content a:hover { color: var(--mihs-primary-dark); }
.cms-content img { max-width: 100%; height: auto; border-radius: 10px; }
.cms-content iframe { max-width: 100%; border: 0; border-radius: 10px; }
.cms-content blockquote { border-left: 4px solid var(--mihs-accent); background: var(--mihs-primary-light); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 10px 10px 0; }
.cms-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.cms-content th, .cms-content td { border: 1px solid var(--mihs-line); padding: .6rem .8rem; text-align: left; }
.cms-content th { background: var(--mihs-primary-light); color: var(--mihs-primary-dark); }
.cms-menu-list { padding-left: 1.2rem; }

.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0; }

.empty-state {
  border: 2px dashed var(--mihs-line); border-radius: 14px; padding: 2rem; text-align: center;
  color: var(--mihs-muted); background: #fff;
}
.admin-hint { font-size: .85rem; margin-top: .5rem; }
.admin-hint a { color: var(--mihs-primary); font-weight: 700; }

/* ---------- Sidebar ---------- */
.side-card { border: 1px solid var(--mihs-line); border-radius: 14px; background: #fff; overflow: hidden; margin-bottom: 1.25rem; }
.side-card h2 { font-size: 1rem; margin: 0; padding: .9rem 1.1rem; background: var(--mihs-primary-dark); color: #fff; letter-spacing: 0; }
.side-card ul { list-style: none; margin: 0; padding: .4rem 0; }
.side-card li a {
  display: block; padding: .55rem 1.1rem; color: var(--mihs-ink); text-decoration: none; font-weight: 600; font-size: .92rem;
  border-left: 3px solid transparent;
}
.side-card li a:hover { background: var(--mihs-primary-light); color: var(--mihs-primary); }
.side-card li a.current { border-left-color: var(--mihs-accent); background: var(--mihs-primary-light); color: var(--mihs-primary-dark); }
.side-card.cta { background: linear-gradient(135deg, var(--mihs-primary-dark), var(--mihs-primary)); color: #fff; padding: 1.25rem; border: 0; }
.side-card.cta h2 { background: transparent; padding: 0; margin-bottom: .5rem; font-size: 1.15rem; }
.side-card.cta p { font-size: .9rem; color: #E6F3EC; }

/* ---------- Cards ---------- */
.info-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  border: 1px solid var(--mihs-line); border-radius: 14px; background: #fff; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(13, 138, 75, .1); border-color: var(--mihs-primary); color: inherit; }
.info-card .thumb { height: 150px; background: linear-gradient(135deg, var(--mihs-primary-dark), var(--mihs-primary)); background-size: cover; background-position: center; }
.info-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex-grow: 1; }
.info-card h3 { font-size: 1.05rem; margin: 0 0 .4rem; color: var(--mihs-ink); }
.info-card p { font-size: .88rem; color: var(--mihs-muted); margin: 0 0 .8rem; flex-grow: 1; }
.info-card .more { font-size: .85rem; font-weight: 700; color: var(--mihs-primary); }
.school-stat { font-size: .78rem; color: var(--mihs-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- People ---------- */
.person-card { text-align: center; height: 100%; border: 1px solid var(--mihs-line); border-radius: 14px; background: #fff; padding: 1.4rem 1.2rem; }
.person-photo {
  width: 130px; height: 130px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; display: block;
  background: var(--mihs-primary-light); border: 4px solid var(--mihs-accent);
}
.person-photo.placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--mihs-primary); }
.person-card h3 { font-size: 1.1rem; margin: 0 0 .2rem; }
.person-card .role { color: var(--mihs-primary); font-weight: 700; font-size: .88rem; margin-bottom: .6rem; }
.person-card p { font-size: .9rem; color: var(--mihs-muted); margin: 0; }

/* ---------- Partners & collaborators ---------- */
.partners-count-pill {
  display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--mihs-primary-dark); background: var(--mihs-primary-light);
  border: 1px solid var(--mihs-line); border-radius: 50px; padding: .35rem .9rem;
}
.partner-page-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  border: 1px solid var(--mihs-line); border-radius: 14px; background: #fff; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.partner-page-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(13, 138, 75, .1); border-color: var(--mihs-primary); color: inherit; }
.partner-page-logo-wrap {
  display: flex; align-items: center; justify-content: center; height: 110px; padding: 1.25rem;
  background: var(--mihs-bg); border-bottom: 1px solid var(--mihs-line);
}
.partner-page-logo-wrap img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.partner-page-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex-grow: 1; text-align: center; }
.partner-page-body h3 { font-size: 1rem; margin: 0 0 .3rem; color: var(--mihs-ink); }
.partner-page-body p { font-size: .85rem; color: var(--mihs-muted); margin: 0 0 .7rem; flex-grow: 1; }
.partner-page-link { font-size: .8rem; font-weight: 700; color: var(--mihs-primary); margin-top: auto; }
.partner-page-card:hover .partner-page-link { color: var(--mihs-primary-dark); }

/* ---------- Programme detail page ---------- */
.fact-box {
  border: 1px solid var(--mihs-line); border-radius: 10px; background: var(--mihs-bg);
  padding: .7rem .9rem; height: 100%;
}

/* ---------- Documents ---------- */
.doc-toolbar {
  background: #fff; border: 1px solid var(--mihs-line); border-radius: 16px;
  padding: clamp(1.2rem, 2.5vw, 1.75rem); box-shadow: 0 6px 24px rgba(13, 138, 75, .05); margin-bottom: 1.75rem;
}
.doc-sort-select { padding-left: 1.25rem; appearance: auto; cursor: pointer; }

.doc-table-wrap { background: #fff; border: 1px solid var(--mihs-line); border-radius: 16px; overflow-x: auto; overflow-y: hidden; box-shadow: 0 6px 24px rgba(13, 138, 75, .05); -webkit-overflow-scrolling: touch; }
.doc-table { width: 100%; border-collapse: collapse; min-width: 720px; table-layout: fixed; }
.doc-table th:first-child, .doc-table td:first-child { width: 42%; }
.doc-table th:nth-child(2), .doc-table td:nth-child(2) { width: 20%; }
.doc-table th:nth-child(3), .doc-table td:nth-child(3) { width: 18%; }
.doc-table th:last-child, .doc-table td:last-child { width: 20%; }
.doc-table thead th {
  background: var(--mihs-bg); color: var(--mihs-ink); text-align: left; font-size: .88rem; font-weight: 700;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--mihs-line); white-space: nowrap;
}
.doc-table tbody td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--mihs-line); vertical-align: middle; }
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover { background: var(--mihs-bg); }
.doc-title-link { display: flex; align-items: flex-start; gap: .65rem; text-decoration: none; color: inherit; }
.doc-file-icon { font-size: 1.3rem; color: var(--mihs-primary); flex-shrink: 0; margin-top: .15rem; }
.doc-table .bi-file-earmark-pdf { color: #D3342D; }
.doc-table .bi-file-earmark-word { color: #2B579A; }
.doc-table .bi-file-earmark-excel { color: #1D7044; }
.doc-table .bi-file-earmark-slides { color: #C4390C; }
.doc-title-text { font-weight: 700; color: var(--mihs-ink); display: flex; flex-direction: column; }
.doc-title-link:hover .doc-title-text { color: var(--mihs-primary); }
.doc-title-text small { font-weight: 400; font-size: .82rem; color: var(--mihs-muted); margin-top: .1rem; }
.doc-category-badge {
  display: inline-block; background: #5A6660; color: #fff; font-size: .72rem; font-weight: 700;
  text-transform: none; padding: .3rem .75rem; border-radius: 50px; white-space: nowrap;
}
.doc-date { white-space: nowrap; color: var(--mihs-muted); font-size: .92rem; }
.btn-doc-download {
  display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--mihs-primary);
  color: var(--mihs-primary-dark); font-weight: 700; font-size: .85rem; padding: .5rem 1rem;
  border-radius: 8px; text-decoration: none; white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.btn-doc-download:hover { background: var(--mihs-primary); color: #fff; }
.doc-empty-filtered { text-align: center; padding: 2rem 1rem; color: var(--mihs-muted); margin: 0; }

/* ---------- School programme list ---------- */
.prog-card { border: 1px solid var(--mihs-line); border-radius: 14px; background: #fff; padding: 1.2rem 1.3rem; height: 100%; }
.prog-card h3 { font-size: 1.05rem; margin: .4rem 0 .5rem; }
.level-badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .15rem .6rem; border-radius: 50px; background: var(--mihs-primary-light); color: var(--mihs-primary-dark); }
.prog-facts-list { list-style: none; padding: 0; margin: .8rem 0; font-size: .86rem; color: var(--mihs-muted); }
.prog-facts-list li { display: flex; gap: .5rem; padding: .15rem 0; }
.prog-facts-list b { color: var(--mihs-ink); min-width: 5.5rem; font-weight: 600; }

/* ---------- News & events ---------- */
.news-meta { font-size: .85rem; color: var(--mihs-muted); }
.article-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; margin-bottom: 1.5rem; }
.event-strip-row .event-info-text h6 { color: var(--mihs-ink); }

/* ---------- Forms ---------- */
.cms-form .form-control, .cms-form .form-select { border: 1.5px solid var(--mihs-line); border-radius: 10px; padding: .7rem .9rem; font-size: 16px; }
.cms-form .form-control:focus { border-color: var(--mihs-primary); box-shadow: 0 0 0 3px rgba(13, 138, 75, .15); }
.cms-form label { font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.hp-field { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.contact-card { display: flex; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--mihs-line); border-radius: 12px; background: #fff; margin-bottom: .8rem; }
.contact-card i { font-size: 1.3rem; color: var(--mihs-primary); }
.contact-card a { color: inherit; text-decoration: none; font-weight: 600; }
.contact-card a:hover { color: var(--mihs-primary); }
.map-frame { width: 100%; height: 320px; border: 0; border-radius: 14px; }

/* ---------- Search page ---------- */
.result-item { padding: 1rem 0; border-bottom: 1px solid var(--mihs-line); }
.result-item h3 { font-size: 1.1rem; margin: 0 0 .2rem; }
.result-item h3 a { color: var(--mihs-primary-dark); text-decoration: none; }
.result-item h3 a:hover { text-decoration: underline; }
.result-item p { margin: 0; color: var(--mihs-muted); font-size: .92rem; }
.result-type { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mihs-primary); font-weight: 700; }

/* ---------- Alerts / pagination ---------- */
.site-alert { border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1.25rem; font-weight: 600; }
.site-alert.success { background: #E8F6EE; color: #0B5A31; border: 1px solid #B7E1C8; }
.site-alert.danger { background: #FCECEC; color: #8A1C1C; border: 1px solid #F1C0C0; }
.preview-bar { background: #FFF3CD; color: #664D03; text-align: center; padding: .5rem 1rem; font-size: .85rem; font-weight: 700; }
.pagination .page-link { color: var(--mihs-primary); border-color: var(--mihs-line); }
.pagination .active .page-link { background: var(--mihs-primary); border-color: var(--mihs-primary); color: #fff; }

/* ---------- Video modal ---------- */
#videoModal .modal-content { background: #000; border: 0; border-radius: 14px; overflow: hidden; }
#videoModal .btn-close { position: absolute; right: .75rem; top: .75rem; z-index: 3; filter: invert(1); }
.umu-play-center { border: 0; }

/* ---------- 404 ---------- */
.error-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--mihs-primary); line-height: 1; }

@media (max-width: 575.98px) {

}
