/* IUHD — site theme (education.gov.tm-inspired layout). Single small stylesheet for speed. */

:root {
  --g-900: #084a24;
  --g-800: #0b6b33;
  --g-700: #0e7c3a;
  --g-600: #17943f;
  --g-100: #e7f4ec;
  --ink: #1c2330;
  --muted: #5d6675;
  --line: #e3e7e4;
  --bg-soft: #f4f6f5;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(16, 40, 24, .08);
  --shadow-lg: 0 10px 30px rgba(16, 40, 24, .14);
}

html { scroll-behavior: smooth; }
body.site-body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--g-700); }
a:hover { color: var(--g-900); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 8px; z-index: 2000; background: #fff; padding: 6px 10px; }
.visually-hidden-focusable:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.topbar { background: #f1f4f2; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--ink); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 12px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.topbar__meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.topbar__item a { color: inherit; text-decoration: none; font-weight: 600; }
.topbar__weather { font-weight: 600; }
.topbar__lang { display: flex; gap: 6px; }
.lang-btn { border: 1px solid transparent; background: transparent; padding: 2px 8px; border-radius: 6px; font-size: .8rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.lang-btn img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.lang-btn:hover, .lang-btn.is-active { border-color: var(--g-700); background: #fff; }

.brand-bar { background: #fff; }
.brand-bar__inner { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--g-900); }
.brand__logo { width: 64px; height: 64px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; color: var(--g-800); }
.brand__sub { font-size: .8rem; color: var(--muted); max-width: 300px; }
.brand-bar__motto { margin-left: auto; max-width: 560px; text-align: right; font-weight: 800; font-size: .95rem; color: var(--g-800); text-transform: uppercase; line-height: 1.3; }
.brand-bar__emblem { flex-shrink: 0; }
.brand-bar__emblem img { width: 72px; height: 72px; object-fit: contain; }

.main-nav { background: var(--g-800); padding: 0; }
.main-nav__list { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; }
.main-nav .nav-link {
  color: #fff !important; font-weight: 700; font-size: .85rem; letter-spacing: .03em;
  padding: 14px 14px; text-transform: uppercase; white-space: nowrap;
}
.main-nav .nav-link:hover, .main-nav .nav-link:focus { background: var(--g-900); }
.main-nav .dropdown-toggle::after { vertical-align: .18em; }
.main-nav .dropdown-menu {
  border: 0; border-top: 3px solid #f2b600; border-radius: 0; box-shadow: var(--shadow-lg);
  min-width: 260px; padding: 6px 0; margin-top: 0;
}
.main-nav .dropdown-item { font-size: .92rem; padding: 9px 18px; white-space: normal; }
.main-nav .dropdown-item:hover, .main-nav .dropdown-item:focus { background: var(--g-100); color: var(--g-900); }
.main-nav__toggle { color: #fff; border: 0; border-radius: 0; width: 100%; text-align: left; padding: 12px 16px; font-weight: 700; text-transform: uppercase; }
.main-nav__toggle:focus { box-shadow: none; }
.main-nav__toggle span { margin-left: 6px; }

/* nested submenus (ACADEMICS tree) */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -6px; display: none; }
.dropdown-submenu:hover > .dropdown-menu, .dropdown-submenu.show > .dropdown-menu { display: block; }
.dropdown-submenu > .dropdown-item::after { content: "›"; float: right; }

@media (max-width: 991.98px) {
  .main-nav__list { flex-direction: column; align-items: stretch; }
  .main-nav .nav-link { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.12); }
  .main-nav .dropdown-menu { position: static; box-shadow: none; border-top: 0; background: var(--g-100); min-width: 0; margin: 0; }
  .main-nav .dropdown-item { color: var(--ink); }
  .dropdown-submenu > .dropdown-menu { position: static; display: none; margin: 0 0 0 12px; background: transparent; }
  .dropdown-submenu.show > .dropdown-menu { display: block; }
  .brand-bar__motto { display: none; }
  .brand__sub { display: none; }
}
@media (max-width: 575.98px) {
  .brand__logo { width: 48px; height: 48px; }
  .brand__name { font-size: 1.3rem; }
  .topbar__meta { gap: 10px; font-size: .78rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(110deg, #0f2f57 0%, #1a4a80 55%, #2563a6 100%);
  color: #fff; padding: 56px 0;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero__kicker { text-transform: uppercase; font-weight: 700; letter-spacing: .06em; font-size: .85rem; opacity: .9; margin-bottom: 8px; }
.hero__title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.12; margin-bottom: 14px; color: #fff; }
.hero__lead { font-size: 1.1rem; opacity: .95; margin-bottom: 24px; max-width: 540px; }
.hero__media { text-align: center; }
.hero__media img { max-width: 100%; height: auto; background: rgba(255,255,255,.08); border-radius: var(--radius); }
@media (max-width: 767.98px) { .hero { padding: 36px 0; } .hero__inner { grid-template-columns: 1fr; } .hero__media { order: -1; } }

/* ---------- Ticker ---------- */
.ticker { background: #dbe8f7; color: #0f2f57; }
.ticker__inner { display: flex; align-items: center; gap: 14px; padding-top: 8px; padding-bottom: 8px; overflow: hidden; }
.ticker__label { font-weight: 800; text-transform: uppercase; font-size: .8rem; white-space: nowrap; }
.ticker__viewport { overflow: hidden; flex: 1; }
.ticker__track { display: inline-flex; gap: 48px; white-space: nowrap; animation: ticker 60s linear infinite; padding-left: 100%; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { color: #1c1c1c; text-decoration: none; font-weight: 600; font-size: .9rem; }
.ticker__item:hover { text-decoration: underline; }
.ticker__item::before { content: "■ "; color: var(--g-800); font-size: .6rem; vertical-align: middle; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; padding-left: 0; } }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section--white { background: #fff; }
.section--muted { background: var(--bg-soft); }
.section-head { margin-bottom: 28px; }
.section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.section-eyebrow { text-transform: uppercase; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--g-700); margin-bottom: 6px; }
.section-title, .section-heading {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; color: var(--ink);
  line-height: 1.25; margin-bottom: 14px; display: inline-block;
  padding-bottom: 8px; border-bottom: 3px solid var(--g-700);
}
.section-head .section-title { border-bottom-width: 3px; }
.section-title__link, .section-heading-link { color: inherit; text-decoration: none; }
.section-title__link:hover { color: var(--g-700); }
.lead-text, .lead { font-size: 1.05rem; color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; }
.check-list li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.check-list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--g-600); position: absolute; left: 4px; top: 9px; }
.feature-photo { width: 100%; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }

/* ---------- Pillars ---------- */
.pillar { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--g-700); border-radius: var(--radius); padding: 26px 24px; height: 100%; box-shadow: var(--shadow); }
.pillar i { font-size: 1.8rem; color: var(--g-700); margin-bottom: 12px; }
.pillar h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.pillar p { color: var(--muted); margin: 0; }

/* ---------- Video & welcome ---------- */
.video-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.video-preview img { width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .9; }
.video-preview__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; border-radius: 50%; background: var(--g-700); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.video-preview__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-weight: 600; text-align: left; }
.welcome-block { display: flex; gap: 22px; align-items: center; background: #fff; border-left: 4px solid var(--g-700); padding: 22px 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.welcome-block__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.welcome-title { font-size: 1.4rem; }

/* ---------- News / announcement cards ---------- */
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-card__media { display: block; aspect-ratio: 16/10; background: var(--g-100); overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.news-card__meta { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.news-card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a:hover { color: var(--g-700); }
.news-card__text { color: var(--muted); font-size: .92rem; margin: 0; }

/* Generic cards used by inner pages */
.iuhd-card, .iuhd-surface-card, .card.iuhd-card { border-radius: var(--radius) !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; background: #fff; overflow: hidden; }
.iuhd-card .card-img-top, .iuhd-card img { object-fit: cover; }
.iuhd-surface-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hover-card { transition: transform .15s ease, box-shadow .15s ease; }
.hover-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg) !important; }
.iuhd-card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.iuhd-card-title a { color: var(--ink); text-decoration: none; }
.iuhd-card-title a:hover { color: var(--g-700); }
.news-card-title { color: var(--ink); }
.iuhd-page-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--ink); line-height: 1.25; }
.iuhd-section-title { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.iuhd-subsection-title { font-size: 1.15rem; font-weight: 700; }
.iuhd-aside-title { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--g-800) !important; border-bottom: 2px solid var(--g-700); padding-bottom: 6px; display: inline-block; }
.detail-content { font-size: 1.02rem; }
.detail-content img { border-radius: 8px; margin: 12px 0; }
.detail-content table { width: 100%; }
.news-content { font-size: 1.02rem; }
.list-group-item-action:hover { background: var(--g-100); }
.list-group-item h3 { font-size: .98rem; }

/* ---------- Inner page header ---------- */
.page-header { background: linear-gradient(110deg, var(--g-800), var(--g-700)); color: #fff; padding: 34px 0 30px; }
.page-header__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; margin: 6px 0 0; color: #fff; line-height: 1.2; }
.page-header .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.6); --bs-breadcrumb-item-active-color: #fff; font-size: .9rem; }
.page-header .breadcrumb-item a { color: #fff; opacity: .9; text-decoration: none; }
.page-header .breadcrumb-item a:hover { text-decoration: underline; }
.page-header .breadcrumb-item.active { color: #fff; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.6); }

main.site-main > .container, main.site-main > section > .container { }
main.site-main > .container { padding-top: 40px; padding-bottom: 40px; }

/* ---------- Faculties / olympiads ---------- */
.iuhd-faculty-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; }
.iuhd-faculty-card__media { display: block; aspect-ratio: 16/10; background: var(--g-100); }
.iuhd-faculty-card__media img { width: 100%; height: 100%; object-fit: cover; }
.iuhd-faculty-card__body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.iuhd-faculty-card__title { font-size: 1.1rem; font-weight: 700; }
.iuhd-faculty-card__title a { color: var(--ink); }
.iuhd-faculty-card__meta { color: var(--muted); font-size: .9rem; }
.iuhd-faculties-head .section-heading, .iuhd-faculties-head .section-title { border-bottom-width: 3px; }
.iuhd-olympiads-eyebrow { text-transform: uppercase; font-weight: 700; letter-spacing: .08em; font-size: .8rem; color: var(--g-700); }
.iuhd-olympiads-title { font-size: 2rem; font-weight: 800; }
.iuhd-olympiads-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.iuhd-olympiads-stat { background: var(--g-100); border-radius: var(--radius); padding: 18px; }
.iuhd-olympiads-stat-value { display: block; font-size: 1.4rem; font-weight: 800; color: var(--g-800); }
.iuhd-olympiads-stat-label { font-size: .85rem; color: var(--muted); }
.iuhd-olympiads-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; }
.iuhd-olympiads-card__body { padding: 22px; flex: 1; }
.iuhd-olympiads-card__title { font-size: 1.15rem; font-weight: 700; }
.iuhd-olympiads-card__title a { color: var(--ink); }
.iuhd-olympiads-card__text { color: var(--muted); font-size: .92rem; }
.iuhd-olympiads-card__footer { padding: 0 22px 22px; }
.iuhd-error-page { max-width: 640px; }
.iuhd-error-code { font-size: 5rem; font-weight: 800; color: var(--g-700); line-height: 1; }
.iuhd-error-page__lead { max-width: 480px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--g-900); color: #fff; margin-top: auto; }
.site-footer__inner { padding-top: 44px; padding-bottom: 32px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { font-size: 1.4rem; font-weight: 800; letter-spacing: .03em; }
.footer-heading { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .8; margin-bottom: 12px; }
.footer-links li { margin-bottom: 6px; }
.copyright-bar { background: #052e16; color: rgba(255,255,255,.85); padding: 12px 0; font-size: .88rem; text-align: center; }

/* ---------- Tables, forms, pagination ---------- */
.pagination .page-link { color: var(--g-800); }
.pagination .page-item.active .page-link { background: var(--g-700); border-color: var(--g-700); }
.btn-primary { background: var(--g-700); border-color: var(--g-700); font-weight: 600; }
.btn-primary:hover, .btn-primary:focus { background: var(--g-800); border-color: var(--g-800); }
.btn-outline-primary { color: var(--g-700); border-color: var(--g-700); font-weight: 600; }
.btn-outline-primary:hover { background: var(--g-700); border-color: var(--g-700); }
.btn { border-radius: 8px; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--g-600); box-shadow: 0 0 0 .2rem rgba(23,148,63,.2); }
.modal-content { border: 0; border-radius: var(--radius); }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767.98px) {
  .section { padding: 40px 0; }
  .welcome-block { flex-direction: column; text-align: center; }
  .section-head--row { align-items: flex-start; }
}

/* ---------- Header v2 (navy style) ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; box-shadow: 0 2px 10px rgba(10,36,68,.18); }
.topbar { background: #0a2444; border-bottom: 0; color: #cfe0f5; }
.topbar__item a, .topbar__weather, .topbar__item { color: #cfe0f5; }
.topbar__item a:hover { color: #fff; }
.lang-btn { color: #cfe0f5; }
.lang-btn:hover, .lang-btn.is-active { border-color: #f2b600; background: rgba(255,255,255,.1); color: #fff; }

.brand-bar { background: #fff; border-bottom: 1px solid #e3e9f1; }
.brand__name { color: #0f2f57; }
.brand { color: #0f2f57; }
.brand__sub { color: #5b6b80; }
.brand-bar__motto { color: #1a4a80; font-size: .85rem; letter-spacing: .02em; }

.main-nav { background: #0f2f57; }
.main-nav .nav-link {
  color: #fff !important; border-bottom: 3px solid transparent; background: transparent;
  letter-spacing: .05em; font-size: .8rem;
}
.main-nav .nav-link:hover, .main-nav .nav-link:focus { background: transparent; border-bottom-color: #f2b600; color: #f2b600 !important; }
.main-nav .dropdown-menu { border-top-color: #f2b600; }
.main-nav .dropdown-item:hover, .main-nav .dropdown-item:focus { background: #e8f0fa; color: #0f2f57; }
.main-nav__toggle { background: #0f2f57; }

/* ---------- Hero v3 (full-bleed photo, centered title) ---------- */
.hero {
  background: linear-gradient(rgba(8,30,60,.72), rgba(8,30,60,.84)), var(--hero-bg) center / cover no-repeat;
  min-height: 520px; padding: 110px 0; display: flex; align-items: center; text-align: center;
}
.hero__inner { grid-template-columns: 1fr; justify-items: center; }
.hero__text { max-width: 900px; }
.hero__kicker { font-size: .9rem; letter-spacing: .12em; }
.hero__title { font-size: clamp(2.2rem, 5.5vw, 4.2rem); text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; }
.hero__lead { margin-left: auto; margin-right: auto; }
.hero__media { display: none; }
@media (max-width: 767.98px) { .hero { min-height: 420px; padding: 70px 0; } }
