/* ═══════════════════════════════════════════════════════════
   University Detail — Premium SaaS Theme v2
   Matches index.html / visa-assistance design system
═══════════════════════════════════════════════════════════ */

/* ── Design tokens (mirrors styles.css for standalone use) ── */
:root {
  --bg:           #f1f5f9;
  --surface:      #ffffff;
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --primary-50:   #eff6ff;
  --primary-100:  #dbeafe;
  --primary-200:  #bfdbfe;
  --primary-300:  #93c5fd;
  --primary-glow: rgba(37,99,235,0.1);
  --bg-field:     #f8fafc;
  --text:         #0f172a;
  --text-2:       #334155;
  --muted:        #64748b;
  --subtle:       #94a3b8;
  --border-slate: #e2e8f0;
  --radius:       20px;
  --radius-lg:    24px;
  --radius-sm:    12px;
  --radius-xs:    8px;
}

/* ── Page fade-in ── */
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
body { animation: page-fade-in 0.38s ease both; }

/* ── Base page ─────────────────────────────────────────── */
.detail-page { background: var(--bg); }

/* ── Topbar (white glass nav) ──────────────────────────── */
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-slate);
  box-shadow: 0 1px 0 rgba(15,23,42,0.06);
}

.detail-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0,560px) auto;
  gap: 20px;
  align-items: center;
}

/* Brand logo */
.detail-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.detail-brand img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Search bar */
.detail-search {
  display: grid;
  grid-template-columns: 148px minmax(0,1fr) 50px;
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 12px;
  overflow: hidden;
  min-height: 46px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
}

.detail-search-type-wrap {
  position: relative;
  display: flex;
  border-right: 1px solid var(--border-slate);
}

.detail-search-type {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  white-space: nowrap;
}

.search-type-chevron {
  font-size: 11px;
  display: inline-block;
  transition: transform 0.18s;
  color: var(--muted);
}
.detail-search-type[aria-expanded="true"] .search-type-chevron { transform: rotate(180deg); }

.search-type-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 178px;
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.12);
  padding: 6px 0;
  margin: 0;
  list-style: none;
  z-index: 200;
}
.search-type-dropdown[hidden] { display: none; }

.search-type-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  gap: 12px;
  transition: background 0.1s;
}
.search-type-option:hover { background: var(--bg); }
.search-type-option.is-selected { color: var(--primary); }
.search-type-check { color: var(--primary); font-size: 14px; font-weight: 700; }

.detail-search input {
  border: 0;
  outline: 0;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-2);
  background: transparent;
}
.detail-search input::placeholder { color: var(--subtle); }

.detail-search > button[type="submit"] {
  border: 0;
  background: var(--primary);
  color: var(--surface);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.detail-search > button[type="submit"]:hover { background: var(--primary-dark); }

/* Profile button */
.detail-profile {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37,99,235,0.35);
  transition: box-shadow 0.18s, transform 0.15s;
  flex-shrink: 0;
  font-family: inherit;
}
.detail-profile:hover {
  box-shadow: 0 4px 14px rgba(37,99,235,0.5);
  transform: translateY(-1px);
}
/* Guest / Login state */
.detail-profile.is-guest {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
  width: auto;
  height: auto;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.detail-profile.is-guest:hover {
  background: var(--primary-50);
  box-shadow: none;
  transform: none;
}

/* ── Page body ─────────────────────────────────────────── */
.detail-main { padding-bottom: 80px; }

/* ── Hero section ──────────────────────────────────────── */
.detail-hero-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 0;
}

.detail-hero {
  position: relative;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18);
}

.carousel-slides,
.carousel-slide { height: 100%; }

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 400ms ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.carousel-slide.is-active { opacity: 1; }

/* NEU slides */
.slide-one {
  background-image: linear-gradient(160deg,rgba(15,23,42,0.50),rgba(30,58,138,0.38)),
    url("../../assets/near%20east%20university/Near-East-University-1.jpg");
  background-size: cover; background-position: center bottom;
}
.slide-two {
  background-image: linear-gradient(160deg,rgba(15,23,42,0.46),rgba(30,58,138,0.34)),
    url("../../assets/near%20east%20university/Near-East-University-Egitim.jpg");
  background-size: cover; background-position: center bottom;
}
.slide-three {
  background-image: linear-gradient(160deg,rgba(15,23,42,0.48),rgba(30,58,138,0.34)),
    url("../../assets/near%20east%20university/innovation.jpg");
  background-size: cover; background-position: center bottom;
}
.slide-four {
  background-image: linear-gradient(160deg,rgba(15,23,42,0.44),rgba(30,58,138,0.30)),
    url("../../assets/near%20east%20university/ydu-buyuk-kutuphane-1.jpg");
  background-size: 100% auto; background-position: center top;
}
.slide-five {
  background-image: linear-gradient(160deg,rgba(15,23,42,0.46),rgba(30,58,138,0.30)),
    url("../../assets/near%20east%20university/TIP.jpg");
  background-size: cover; background-position: center;
}

/* Dark gradient bottom overlay */
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,rgba(8,18,38,0.72) 0%,rgba(8,18,38,0.1) 50%,transparent 100%);
}

.slide-copy {
  position: absolute;
  left: 32px; bottom: 28px;
  z-index: 1;
  color: rgba(255,255,255,0.88);
  font-size: 16px; font-weight: 500;
  letter-spacing: 0.01em;
}

/* Carousel controls — glassmorphism */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px; height: 48px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 36px; line-height: 1;
  cursor: pointer;
  transition: background 0.18s;
}
.carousel-control:hover { background: rgba(255,255,255,0.30); }
.carousel-control.prev { left: 18px; }
.carousel-control.next { right: 18px; }

.carousel-indicator {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.26);
  color: #ffffff;
  font-size: 13px; font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

/* ── University identity card ──────────────────────────── */
.university-header-card {
  position: relative;
  z-index: 3;
  margin: -64px auto 0;
  width: min(1180px,calc(100% - 48px));
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(15,23,42,0.10), 0 4px 12px rgba(15,23,42,0.06);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 100px minmax(0,1fr) 280px;
  gap: 24px;
  align-items: center;
}

.university-mark {
  width: 100px; height: 100px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface);
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800;
  flex-shrink: 0;
}

/* Logo overrides per university */
.neu-page .university-mark {
  background: var(--surface); border: 1px solid var(--border-slate); padding: 12px;
}
.neu-page .university-mark img { width: 100%; height: 100%; object-fit: contain; }

.unic-page .university-mark {
  background: var(--surface); border: 1px solid var(--border-slate); padding: 12px;
}
.unic-page .university-mark img { width: 100%; height: 100%; object-fit: contain; }

.bogazici-page .university-mark {
  background: var(--surface); border: 1px solid var(--border-slate); padding: 10px;
}
.bogazici-page .university-mark img { width: 100%; height: 100%; object-fit: contain; }

.university-header-copy h1 {
  margin: 0;
  font-size: 34px; font-weight: 800;
  color: var(--text); letter-spacing: -0.02em;
}
.university-header-copy p {
  margin: 6px 0 0;
  color: var(--muted); font-size: 16px; font-weight: 500;
}

.university-header-cta {
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-50));
  border: 1px solid var(--primary-200);
}
.university-header-cta p {
  margin: 0 0 12px;
  color: var(--primary-light, #3b82f6); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.university-header-cta button {
  width: 100%; height: 46px;
  border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface); font-family: inherit;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}
.university-header-cta button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,99,235,0.45);
}

/* ── Main content ──────────────────────────────────────── */
.detail-content {
  max-width: 1180px;
  margin: 32px auto 0;
  padding: 0 24px;
}

/* ── Stats row ─────────────────────────────────────────── */
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,23,42,0.04);
  margin-bottom: 20px;
}
.detail-stats article {
  flex: 1 1 160px;
  padding: 24px 28px;
}
.detail-stats article + article { border-left: 1px solid var(--border-slate); }
.detail-stats strong {
  display: block;
  color: var(--primary); font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
}
.detail-stats span {
  display: block;
  color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px;
}

/* ── Content sections ──────────────────────────────────── */
.detail-section {
  border: none;
  padding: 0 0 16px;
}

/* Copy blocks */
.detail-copy-block {
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.section-label span {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 18px; flex-shrink: 0;
}
.section-label h2 {
  margin: 0; color: var(--text);
  font-size: 20px; font-weight: 700;
}

.collapsible-copy {
  margin: 14px 0 0;
  color: #475569; font-size: 16px; line-height: 1.75;
}

.copy-more { display: none; }
.detail-copy-block.is-expanded .copy-more { display: inline; }

.copy-toggle {
  margin-top: 12px; padding: 0;
  border: 0; background: transparent;
  color: var(--primary); font-family: inherit;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: color 0.15s;
}
.copy-toggle:hover { color: var(--primary-dark); }

/* ── Programs section ──────────────────────────────────── */
.programs-section {
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}

.programs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin-bottom: 20px;
}

.program-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
}

.program-tab {
  min-width: 70px; height: 34px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: var(--muted); font-family: inherit;
  font-size: 14px; font-weight: 500;
  cursor: pointer; padding: 0 12px;
  transition: background 0.15s, color 0.15s;
}
.program-tab:hover { color: var(--text); background: rgba(255,255,255,0.7); }
.program-tab.is-active {
  background: var(--surface); color: var(--primary); font-weight: 700;
  box-shadow: 0 1px 4px rgba(15,23,42,0.08);
}

.program-list { display: grid; gap: 10px; }

/* Program cards */
.program-card {
  display: grid;
  grid-template-columns: 108px minmax(0,1fr) 220px;
  gap: 20px; align-items: center;
  background: var(--bg-field);
  border: 1px solid var(--border-slate);
  border-radius: 16px; padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}
.program-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  transform: translateY(-1px);
  background: var(--surface);
}
.program-card.is-hidden,
.program-card.is-extra { display: none !important; }

/* Program logo */
.program-logo {
  width: 106px; height: 106px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
/* Ensure any <img> inside a program-logo is always fully contained */
.program-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.neu-page .program-logo {
  background: var(--surface) url("../../assets/near%20east%20university/Near_East_University%20logo.svg") center/78% no-repeat;
  border: 1px solid var(--border-slate); color: transparent; font-size: 0;
}
.unic-page .program-logo {
  background: var(--surface) url("../../assets/University%20of%20Nicosia/Nicosia%20logo.png") center/72% no-repeat;
  border: 1px solid var(--border-slate); color: transparent; font-size: 0;
}
.bogazici-page .program-logo {
  background: var(--surface); border: 1px solid var(--border-slate);
  font-size: 18px; font-weight: 800; color: #1e3a8a;
}

.program-main h3 {
  margin: 0; color: var(--text);
  font-size: 17px; font-weight: 700; line-height: 1.3;
}
.program-school { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.program-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; color: var(--muted); font-size: 13px;
}

.program-facts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px; margin-top: 14px;
}
.program-facts label,
.program-deadline label {
  display: block; color: var(--subtle);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.program-facts strong,
.program-deadline strong {
  display: block; margin-top: 2px;
  color: var(--text); font-size: 15px; font-weight: 700;
}

.program-side {
  display: grid; justify-items: end; gap: 10px;
}
.program-side button:not(.save-program) {
  width: 148px; height: 44px;
  border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface); font-family: inherit;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.program-side button:not(.save-program):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}

.save-program {
  width: 38px !important; height: 38px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1px solid var(--border-slate) !important;
  color: var(--subtle) !important;
  font-size: 18px !important;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s !important;
  font-family: inherit;
}
.save-program:hover { border-color: #f43f5e !important; color: #f43f5e !important; }

/* ── Empty state (no programs match filter) ────────────── */
.program-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}
.pes-icon {
  font-size: 40px;
  opacity: 0.45;
}
.program-empty-state h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.program-empty-state p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.pes-reset-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}
.pes-reset-btn:hover { color: var(--primary-dark); }

/* ── Program browser (full filter/browser view) ───────── */
.program-browser { margin-top: 0; }

.program-browser-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

/* Filters sidebar */
.program-filters-panel {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.05);
}

.program-filters-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.program-filters-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.program-filters-eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.program-reset-btn {
  flex-shrink: 0;
  border: 1px solid var(--border-slate);
  border-radius: 8px;
  background: var(--bg-field, #F1F5F9);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.program-reset-btn:hover {
  border-color: var(--primary-300, #93C5FD);
  background: #EFF6FF;
  color: var(--primary);
}

.program-filter-group {
  border-top: 1px solid var(--border-slate);
  padding-top: 13px;
  margin-top: 13px;
}

.program-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.program-filter-toggle span:last-child {
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.2s;
}
.program-filter-group.is-open .program-filter-toggle span:last-child {
  transform: rotate(180deg);
}

.program-filter-options {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.program-filter-group.is-open .program-filter-options {
  display: flex;
}

.program-check-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.program-check-option:hover { background: var(--bg-field, #F1F5F9); }
.program-check-option input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.program-check-option span {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.program-check-option strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-field, #F1F5F9);
  border: 1px solid var(--border-slate);
  border-radius: 5px;
  padding: 1px 6px;
}

/* Browser main panel */
.program-browser-main { min-width: 0; }

.program-browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.program-browser-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.program-browser-meta strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.program-browser-meta span {
  font-size: 13px;
  color: var(--muted);
}

.program-sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.program-sort-box label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.program-sort-box select {
  border: 1px solid var(--border-slate);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.program-sort-box select:focus { border-color: var(--primary); }

.program-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.program-show-more-wrap {
  display: flex; justify-content: center; margin-top: 20px;
}
.program-show-more-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface); border: none;
  border-radius: 50px; padding: 11px 32px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  font-family: inherit;
}
.program-show-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,99,235,0.4);
}

.program-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border-slate);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.92)),
    var(--surface);
  box-shadow: 0 10px 30px rgba(15,23,42,0.05);
}

.program-pagination-summary {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.program-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.program-page-btn,
.program-pagination-ellipsis,
.program-back-btn {
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}

.program-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #d8e2f0;
  background: #ffffff;
  color: var(--primary);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s, color 0.18s;
  box-shadow: 0 4px 14px rgba(15,23,42,0.06);
}

.program-page-btn:hover:not(:disabled) {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.14);
}

.program-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

.program-page-btn.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: var(--surface);
  box-shadow: 0 12px 24px rgba(37,99,235,0.28);
}

.program-page-btn.is-nav {
  min-width: 48px;
  font-size: 18px;
  line-height: 1;
}

.program-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: var(--subtle);
}

.program-browser-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.program-back-btn {
  border: 0;
  min-width: 180px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37,99,235,0.26);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}

.program-back-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37,99,235,0.32);
  filter: saturate(1.05);
}

.program-back-btn:active,
.program-page-btn:active:not(:disabled) {
  transform: scale(0.97);
}

/* ── Reviews section ───────────────────────────────────── */
.reviews-section {
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}

.review-highlight {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-50));
  border: 1px solid var(--primary-200);
  border-radius: 16px;
  padding: 24px;
  margin-top: 18px;
}
.review-highlight strong {
  display: block; margin: 0;
  color: var(--text); font-size: 18px; font-weight: 700;
}
.review-highlight p {
  margin: 8px 0 0; color: #475569;
  font-size: 15px; line-height: 1.7;
}
.review-highlight button {
  flex-shrink: 0;
  min-width: 136px; height: 44px;
  border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--surface); font-family: inherit;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.review-highlight button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}

/* ── Related section ───────────────────────────────────── */
.related-section {
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.04);
}

.related-title {
  margin: 0 0 18px; color: var(--text);
  font-size: 22px; font-weight: 800;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
}

.related-card {
  border: 1px solid var(--border-slate);
  border-radius: 16px;
  background: var(--bg-field);
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}
.related-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
  transform: translateY(-1px); background: var(--surface);
}
.related-logo {
  width: 76px; height: 76px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-slate);
  display: grid; place-items: center;
  margin-bottom: 12px;
  overflow: hidden; padding: 8px;
}
.related-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.related-card h3 {
  margin: 0; color: var(--text);
  font-size: 15px; font-weight: 700; line-height: 1.3;
}
.related-card p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.related-link {
  display: inline-block; margin-top: 14px;
  color: var(--primary); font-size: 14px; font-weight: 600;
  text-decoration: none; transition: color 0.15s;
}
.related-link:hover { color: var(--primary-dark); }

/* ── Breadcrumbs ───────────────────────────────────────── */
.detail-breadcrumbs {
  display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
  margin-top: 8px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border-slate);
  border-radius: 12px;
  color: var(--subtle);
}
.detail-breadcrumbs a,
.detail-breadcrumbs strong {
  color: inherit; text-decoration: none;
  font-size: 13px; font-weight: 500; transition: color 0.15s;
}
.detail-breadcrumbs a:hover { color: var(--primary); }
.detail-breadcrumbs strong { color: var(--text); font-weight: 700; }

/* ── Campus note ───────────────────────────────────────── */
.campus-note {
  position: relative; margin-top: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-50), var(--primary-50));
  border: 1px solid var(--primary-200);
  padding: 20px 22px 20px 66px;
}
.campus-note p { margin: 0; color: #3b4f68; font-size: 15px; line-height: 1.7; }
.campus-note::before {
  content: "⌂";
  position: absolute; left: 20px; top: 20px;
  width: 32px; height: 32px;
  border-radius: 10px; background: var(--primary-100); color: var(--primary);
  display: grid; place-items: center;
  font-size: 17px; font-weight: 700;
}

/* ── Admissions steps ──────────────────────────────────── */
.subsection-title {
  margin: 28px 0 14px; color: var(--text);
  font-size: 22px; font-weight: 700;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
}

.booking-card {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
  border: 1px solid var(--border-slate);
  border-radius: 16px; background: var(--bg-field);
  padding: 22px; min-height: 160px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}
.booking-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 6px 20px rgba(37,99,235,0.10);
  transform: translateY(-2px);
  background: var(--surface);
}
.booking-card > div { min-width: 0; }
.booking-card h4 { margin: 0; color: var(--text); font-size: 18px; font-weight: 700; }
.booking-card p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.booking-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 22px; flex: 0 0 auto;
  border: 1px solid var(--primary-200);
}

.admissions-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 24px; margin-top: 24px; padding-top: 4px;
}
.admissions-steps::before {
  content: "";
  position: absolute; left: 10%; right: 10%; top: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-300));
}
.admissions-step {
  position: relative; z-index: 1;
  display: grid; justify-items: center;
  text-align: center; gap: 8px;
}
.admissions-step span {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--surface); color: var(--primary);
  display: grid; place-items: center;
  box-shadow: 0 0 0 6px var(--bg);
  font-size: 20px; font-weight: 700;
}
.admissions-step.is-active span { background: var(--primary); color: var(--surface); }
.admissions-step small {
  display: block; color: var(--subtle);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px;
}
.admissions-step strong {
  display: block; margin-top: 2px;
  color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.4;
}

.admissions-accordion { display: grid; gap: 12px; margin-top: 28px; }

.admission-item {
  border: 1px solid var(--border-slate);
  border-radius: 16px; background: var(--surface);
  overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.admission-item.is-open {
  border-color: var(--primary-300);
  box-shadow: 0 4px 14px rgba(37,99,235,0.08);
}

.admission-toggle {
  width: 100%; padding: 20px 24px;
  border: 0; background: transparent;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  color: var(--text); font-family: inherit;
  font-size: 18px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: color 0.15s;
}
.admission-toggle:hover { color: var(--primary); }
.admission-toggle-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); color: var(--muted);
  display: grid; place-items: center; flex: 0 0 auto; font-size: 18px;
  transition: background 0.15s, color 0.15s;
}
.admission-toggle:hover .admission-toggle-icon {
  background: var(--primary-50);
  color: var(--primary);
}
.admission-panel {
  padding: 0 24px 20px;
  border-top: 1px solid var(--bg);
}
.admission-panel p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.admission-panel ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.admission-panel ul li { margin-bottom: 6px; }

/* ── Video hero (UNIC) ─────────────────────────────────── */
.video-hero-wrap {
  position: relative; height: 520px;
  border-radius: 24px; overflow: hidden;
  background: var(--text);
  box-shadow: 0 20px 60px rgba(15,23,42,0.18);
}
.video-hero-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,rgba(8,18,40,0.65) 0%,transparent 55%);
  pointer-events: none;
}
.video-hero-caption {
  position: absolute; left: 32px; bottom: 28px;
  z-index: 1; color: rgba(255,255,255,0.88);
  font-size: 16px; font-weight: 500;
}
.video-mute-btn {
  position: absolute; top: 18px; right: 18px;
  z-index: 2; width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(15,23,42,0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
}
.video-mute-btn:hover { background: rgba(15,23,42,0.85); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .detail-topbar-inner {
    grid-template-columns: auto 1fr auto;
    gap: 14px; padding: 0 16px;
  }
  .university-header-card {
    grid-template-columns: 90px 1fr;
    width: calc(100% - 32px);
  }
  .university-header-cta { grid-column: 1 / -1; }
  .program-card { grid-template-columns: 90px 1fr; }
  .program-logo { width: 90px; height: 90px; }
  .program-side {
    grid-column: 1 / -1; justify-items: start;
    grid-template-columns: auto auto auto; align-items: center;
  }
  .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .programs-section,
  .programs-section.is-browser-open .program-filters-panel { position: static; }
  .program-browser-grid {
    grid-template-columns: 1fr;
  }
  .program-filters-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .detail-topbar-inner {
    grid-template-columns: 1fr auto; /* search | profile on one row */
    height: 64px; padding: 0 16px; gap: 10px;
    align-items: center;
  }
  .detail-brand { display: none; }
  /* Hide type-dropdown on mobile — keep input + submit */
  .detail-search-type-wrap { display: none; }
  .detail-search { grid-template-columns: 1fr 50px; }
  .detail-search input { min-height: 42px; }
  .detail-search > button[type="submit"] { min-height: 42px; }

  .detail-hero, .video-hero-wrap {
    height: 300px; border-radius: 16px;
  }
  .carousel-control { width: 38px; height: 38px; font-size: 28px; }

  .university-header-card {
    width: calc(100% - 20px); margin-top: -36px;
    grid-template-columns: 1fr; padding: 18px 20px; border-radius: 18px;
  }
  .university-mark { width: 72px; height: 72px; font-size: 22px; border-radius: 14px; }
  .university-header-copy h1 { font-size: 26px; }

  .detail-content { padding: 0 16px; }

  .detail-stats { border-radius: 16px; }
  .detail-stats article + article { border-left: none; border-top: 1px solid var(--border-slate); }

  .detail-copy-block,
  .programs-section,
  .reviews-section,
  .related-section { padding: 20px; border-radius: 16px; }

  .program-tabs { width: 100%; }
  .program-tab { min-width: 0; flex: 1; font-size: 13px; padding: 0 8px; }

  .program-card { grid-template-columns: 1fr; border-radius: 14px; }
  .program-logo { width: 72px; height: 72px; font-size: 20px; border-radius: 12px; overflow: hidden; }
  .program-facts { grid-template-columns: 1fr 1fr; }
  .program-side { grid-template-columns: 1fr auto; width: 100%; }
  .program-side button:not(.save-program) { width: 100%; height: 42px; }
  .program-pagination-wrap {
    padding: 16px;
    align-items: stretch;
  }
  .program-pagination {
    justify-content: flex-start;
  }
  .program-page-btn,
  .program-back-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .program-back-btn {
    width: 100%;
  }

  .review-highlight { flex-direction: column; }

  .related-grid, .admissions-steps { grid-template-columns: 1fr; }
  .admissions-steps::before { display: none; }
  .admissions-step { justify-items: start; text-align: left; }

  .booking-grid { grid-template-columns: 1fr; }
  .booking-card { flex-direction: column; align-items: flex-start; }

  .campus-note { padding: 66px 18px 18px; }
  .campus-note::before { left: 18px; top: 18px; }
}

@media (max-width: 768px) {
  .video-hero-wrap { height: 280px; border-radius: 16px; }
}
