@import url("./university-shared.css");
@import url("./university-tables.css");
/* =====================================================================
   YS GLOBAL STUDY — UNIVERSITY DETAIL TEMPLATE DESIGN SYSTEM
   Matches the approved reference images in the Developer Improvement Guide v2.1
   Supports single reusable template loaded from the database records.
   ===================================================================== */

:root {
  --blue: #0D5BF2;
  --blue-dark: #0A47C9;
  --blue-grad: linear-gradient(180deg, #2A78FF 0%, #0B56EE 100%);
  --blue-soft: #EAF1FF;
  --hero-navy: #0A2D86;
  --navy: #0B1F4D;
  --title-blue: #1A47D6;
  --text: #2F3A55;
  --muted: #5F6C88;
  --line: #E3EAF5;
  --bg: #F4F7FD;
  --card: #FFFFFF;
  --gold: #F4B400;
  --wa: #25D366;
  --shadow: 0 10px 30px rgba(16, 42, 110, 0.08);
  --shadow-btn: 0 10px 22px rgba(13, 91, 242, 0.32);
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 12px;
  --nav-h: 72px;
  --display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #EAF0FF;
    --title-blue: #8FB2FF;
    --text: #C9D3EA;
    --muted: #9BA8C6;
    --line: #24345C;
    --bg: #0B1430;
    --card: #111D42;
    --blue-soft: #1A2B5E;
  }
}

:root[data-theme="dark"] {
  --navy: #EAF0FF;
  --title-blue: #8FB2FF;
  --text: #C9D3EA;
  --muted: #9BA8C6;
  --line: #24345C;
  --bg: #0B1430;
  --card: #111D42;
  --blue-soft: #1A2B5E;
}

/* Visibility toggles for catalog vs detail mode */
.masters-programs-page.has-university-detail .masters-programs-hero,
.masters-programs-page.has-university-detail .masters-programs-catalog {
  display: none !important;
}

.masters-programs-page.has-university-detail .university-detail {
  display: block !important;
}

/* Container & layout resets */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 32px + env(safe-area-inset-top, 0px));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.univ-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 32px) 60px;
  font-family: var(--body);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.univ-page * {
  box-sizing: border-box;
}

.univ-page img {
  max-width: 100%;
  display: block;
}

.univ-page a {
  color: var(--blue);
}

/* ---------- Breadcrumb ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 18px 0;
  font-size: 14px;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.crumbs a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.crumbs [aria-current] {
  color: var(--navy);
  font-weight: 600;
}

.example-note {
  margin: 0 0 16px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #FFF4D1;
  color: #5A4500;
  font-size: 14px;
  border: 1px solid #F5E096;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font: 700 16px var(--body);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.2s, background-color 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--blue-grad);
  color: #ffffff !important;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Demo switcher (used in preview/sandbox mode, removable for live) */
.demo {
  background: #08183F;
  color: #C8D4F0;
  font-size: 14px;
}

.demo .container {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.demo button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #3B4F86;
  background: transparent;
  color: #ffffff;
  font: 600 14px var(--body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo button[aria-pressed="true"] {
  background: #ffffff;
  color: #08183F;
  border-color: #ffffff;
}

/* =====================================================================
   1. HERO  (reference: Peking University banner)
   ===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  min-height: 460px;
  background: var(--hero-navy);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(10, 45, 134, 0.22);
  isolation: isolate;
}

.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  z-index: -2;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 8% 10%, rgba(60, 120, 255, 0.35), transparent 60%),
    linear-gradient(90deg, #0A2D86 0%, #0B308F 38%, rgba(11, 48, 143, 0.82) 48%, rgba(11, 48, 143, 0.25) 60%, rgba(11, 48, 143, 0) 70%);
}

.hero-deco {
  position: absolute;
  left: -40px;
  bottom: -30px;
  width: 520px;
  height: 200px;
  z-index: -1;
  pointer-events: none;
}

.hero-body {
  position: relative;
  max-width: 780px;
  padding: 44px clamp(24px, 4vw, 56px) 40px;
}

.hero-id {
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-logo {
  width: 132px;
  height: 132px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), 0 10px 24px rgba(0, 0, 0, 0.25);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.hero .cn {
  margin-top: 8px;
  font-family: var(--cn);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: 2px;
  color: #ffffff;
}

.badges {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.badge svg {
  flex-shrink: 0;
  color: var(--gold);
}

.hero .summary {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: 16.5px;
  line-height: 1.55;
  color: #EEF3FF;
}

.hero-cta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-cta .btn {
  min-height: 56px;
  min-width: 220px;
  font-size: 17px;
}

.hero-cta .btn-primary {
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 4px rgba(42, 120, 255, 0.25), 0 12px 28px rgba(13, 91, 242, 0.45);
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
  }
  .hero-photo {
    position: relative;
    width: 100%;
    height: 230px;
  }
  .hero::before {
    background: linear-gradient(180deg, transparent 0, transparent 140px, #0A2D86 230px, #0A2D86 100%);
  }
  .hero-body {
    padding-top: 20px;
  }
  .hero-logo {
    width: 84px;
    height: 84px;
  }
  .hero-cta .btn {
    min-width: 0;
    flex: 1 1 200px;
  }
}

/* =====================================================================
   2. STICKY SECTION NAVIGATION
   ===================================================================== */
.snav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: var(--bg);
}

.snav {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--nav-h);
  padding: 10px 12px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 30px rgba(16, 42, 110, 0.10);
  border: 1px solid var(--line);
}

.snav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  flex-grow: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.snav ul::-webkit-scrollbar {
  display: none;
}

.snav a.tab {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 17px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.snav a.tab:hover {
  color: var(--blue);
}

.snav a.tab.active {
  background: var(--blue-grad);
  color: #ffffff !important;
  box-shadow: var(--shadow-btn);
}

.snav .sep {
  width: 1px;
  height: 36px;
  background: var(--line);
  flex-shrink: 0;
}

.snav .nav-cta {
  min-height: 50px;
  border-radius: 14px;
  padding: 0 18px;
  gap: 14px;
}

.snav .nav-cta .ico {
  display: flex;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}

@media (max-width: 1400px) {
  .snav a.tab {
    padding: 0 12px;
    font-size: 14.5px;
  }
}

@media (max-width: 800px) {
  .snav .sep,
  .snav .nav-cta {
    display: none;
  }
  .snav a.tab {
    padding: 0 16px;
    font-size: 14px;
  }
}

/* =====================================================================
   LAYOUT (340px Sticky Left Column + Content Right)
   ===================================================================== */
.layout {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =====================================================================
   3. UNIVERSITY SUMMARY CARD
   ===================================================================== */
.sc {
  position: sticky;
  top: calc(var(--nav-h) + 36px + env(safe-area-inset-top, 0px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}

@media (max-width: 1040px) {
  .sc {
    position: static;
  }
}

.sc-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sc-head img {
  width: 104px;
  height: 104px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  border: 1px solid var(--line);
}

.sc-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.25;
  color: #173A8F;
  text-transform: uppercase;
}

:root[data-theme="dark"] .sc-name {
  color: #8FB2FF;
}

.sc-cn {
  font-family: var(--cn);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  margin-top: 4px;
}

.sc-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  background: #FCEFCB;
  color: #4A3B12;
  font-size: 13.5px;
  font-weight: 600;
}

.facts {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  color: var(--text);
}

.facts .fi {
  width: 26px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.sc-actions {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-actions .btn {
  border-radius: 12px;
  width: 100%;
  min-height: 54px;
}

.btn-sc {
  background: linear-gradient(180deg, #3279FF, #1E62F0);
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(30, 98, 240, 0.28);
}

.btn-sc:hover {
  filter: brightness(1.06);
}

.btn-wa {
  background: var(--card);
  color: #173A8F !important;
  border: 2px solid #7EA6FF;
}

.btn-wa:hover {
  background: var(--blue-soft);
}

:root[data-theme="dark"] .btn-wa {
  color: #CFE0FF !important;
}

@media (min-width: 640px) and (max-width: 1040px) {
  .sc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
  }
  .facts {
    margin-top: 0;
  }
}

/* =====================================================================
   CONTENT BLOCKS (Right Column)
   ===================================================================== */
.content {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow);
}

.h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.4px;
  color: var(--navy);
}

.sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16.5px;
}

.h3 {
  margin: 28px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
}

.prose {
  margin: 16px 0 0;
  max-width: 78ch;
  line-height: 1.7;
}

.checks {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.checks li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 18px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.checks .ic {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.mini {
  padding: 18px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.mini h4 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

.mini p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.ask {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--navy);
}

.ask .btn {
  min-height: 44px;
  background: var(--card);
  color: var(--blue) !important;
  border-color: var(--blue);
}

/* =====================================================================
   4. RANKINGS  (reference: source logo + year, big ordinal, colour bar)
   ===================================================================== */
.ranks {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-intro {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #F1F6FF, #E2ECFF);
  border: 1px solid #D7E4FF;
}

:root[data-theme="dark"] .rank-intro {
  background: linear-gradient(135deg, #16245A, #1A2B5E);
  border-color: #24345C;
}

.rank-intro .laurel {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  box-shadow: 0 6px 16px rgba(13, 91, 242, 0.15);
}

.rank-intro h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  color: var(--navy);
}

.rank-intro p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.rank {
  position: relative;
  overflow: hidden;
  padding: 20px 20px 18px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(16, 42, 110, 0.06);
}

.rank-src {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.src-logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-family: var(--display);
}

.src-qs {
  background: #F5A623;
  border-radius: 6px;
  font-size: 16px;
}

.src-the {
  background: linear-gradient(135deg, #C1179B, #7B1FA2);
  border-radius: 4px;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.src-asia {
  background: #EF4B2B;
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  font-size: 11px;
}

.src-nat {
  color: var(--blue);
}

.rank-src span {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}

.rank-num {
  margin-top: 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -1px;
}

.rank-scope {
  margin-top: 6px;
  font-size: 16px;
  color: #4F67A8;
}

:root[data-theme="dark"] .rank-scope {
  color: #A9B9E6;
}

.rank-deco {
  position: absolute;
  right: 16px;
  top: 72px;
  opacity: 0.55;
  pointer-events: none;
}

.rank-bar {
  margin-top: 18px;
  height: 6px;
  border-radius: 3px;
  background: #E6ECF7;
}

.rank-bar i {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: 3px;
}

.rank.missing {
  border-style: dashed;
  box-shadow: none;
}

.rank.missing .rank-src span {
  color: #B4540A;
}

@media (max-width: 520px) {
  .ranks {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   5. TUITION, HOUSING & ESTIMATED COSTS
   ===================================================================== */
.ctabs {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #F6F9FF;
  overflow: visible;
}

:root[data-theme="dark"] .ctabs {
  background: var(--bg);
}

.ctab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: 600 16px var(--body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ctab + .ctab {
  border-left: 1px solid var(--line);
}

.ctab:first-child {
  border-radius: 13px 0 0 13px;
}

.ctab:last-child {
  border-radius: 0 13px 13px 0;
}

.ctab svg {
  color: #3A4E86;
}

.ctab:hover {
  background: var(--card);
}

.ctab[aria-selected="true"] {
  background: linear-gradient(180deg, #1E66F5, #0B4FD8);
  color: #ffffff;
}

.ctab[aria-selected="true"] svg {
  color: #ffffff;
}

.ctab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-bottom: 0;
  border-top-color: #0B4FD8;
}

@media (max-width: 720px) {
  .ctab { font-size:12px; flex-direction:column; gap:5px; min-height:72px; padding:8px 4px; }
  .ctab[aria-selected="true"]::after { display:none; }
}

.cpanel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}

.cpanel[hidden] {
  display: none;
}

.cp-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.cp-head .ic {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #E8F0FF;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

:root[data-theme="dark"] .cp-head .ic {
  background: var(--blue-soft);
}

.cp-head h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
}

.cp-head p {
  margin: 2px 0 0;
  color: var(--muted);
}

.tbl {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.tbl table {
  width: 100%;
  border-collapse: collapse;
}

.tbl thead th {
  background: #0B4FD0;
  color: #ffffff;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  padding: 18px 24px;
}

.tbl thead th + th {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.tbl tbody td {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

.tbl tbody td + td {
  border-left: 1px solid var(--line);
}

.tbl tbody tr:nth-child(even) td {
  background: #F5F8FF;
}

:root[data-theme="dark"] .tbl tbody tr:nth-child(even) td {
  background: #0E1838;
}

.tbl td.first {
  font-weight: 700;
  color: var(--navy);
}

.tbl td.amt {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tbl-note {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.estimate {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #FCEFCB;
  color: #4A3B12;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .tbl table, .tbl thead, .tbl tbody, .tbl tr, .tbl td {
    display: block;
  }
  .tbl thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .tbl tbody tr {
    border-top: 1px solid var(--line);
    padding: 8px 0;
  }
  .tbl tbody tr:first-child {
    border-top: 0;
  }
  .tbl tbody td {
    border: 0 !important;
    padding: 8px 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: transparent !important;
  }
  .tbl tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
  }
  .tbl td.amt {
    white-space: normal;
    text-align: right;
  }
}

/* =====================================================================
   COURSES & MAJORS (Interactive table with level filter chips)
   ===================================================================== */
.prog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 16px;
}

.prog-chip {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font: 600 14px var(--body);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}

.prog-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.prog-chip.active {
  background: var(--blue-grad);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-btn);
}

/* =====================================================================
   REQUIREMENTS ACCORDION
   ===================================================================== */
details.acc {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
}

details.acc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16.5px;
  color: var(--navy);
  min-height: 54px;
}

details.acc summary::-webkit-details-marker {
  display: none;
}

details.acc summary::after {
  content: "+";
  font-size: 24px;
  color: var(--blue);
  line-height: 1;
}

details.acc[open] summary::after {
  content: "–";
}

details.acc .acc-body {
  padding: 0 20px 18px;
  line-height: 1.6;
}

details.acc .acc-body ul {
  margin: 0;
  padding-left: 20px;
}

details.acc .acc-body li + li {
  margin-top: 8px;
}

/* =====================================================================
   HOW TO APPLY
   ===================================================================== */
.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  counter-reset: s;
}

.steps li {
  counter-increment: s;
  padding: 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
}

.steps li::before {
  content: counter(s);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-grad);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 12px;
}

.steps h4 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

.steps p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
}

/* =====================================================================
   6. WHY CHOOSE YS GLOBAL STUDY  (reference: 6 cards with photos)
   ===================================================================== */
.why-sec {
  margin-top: 40px;
}

.why-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.045em;
  color: #101E4C;
  text-align: center;
}

.why-title-brand {
  color: #1462FF;
}

:root[data-theme="dark"] .why-title {
  color: #EAF0FF;
}

:root[data-theme="dark"] .why-title-brand {
  color: #8FB2FF;
}

.why-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1180px) {
  .why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #FFFFFF 0%, #F2F6FF 100%);
  border: 1px solid #E1E9FA;
  box-shadow: 0 10px 24px rgba(16, 42, 110, 0.08);
}

:root[data-theme="dark"] .why-card {
  background: var(--card);
  border-color: var(--line);
}

.why-body {
  padding: 18px 18px 12px;
}

.why-ic {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9), 0 8px 18px rgba(0, 0, 0, 0.12);
  margin: 2px 0 14px 4px;
}

.why-card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  color: var(--title-blue);
}

.why-card p {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
}

.why-photo {
  margin-top: auto;
  aspect-ratio: 212 / 156;
  clip-path: ellipse(140% 100% at 100% 100%);
}

.why-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================================
   FREE CONSULTATION FORM
   ===================================================================== */
.consult {
  margin-top: 26px;
  background: linear-gradient(135deg, #0A2D86, #0D5BF2);
  color: #ffffff;
  border: 0;
}

.consult .h2 {
  color: #ffffff;
}

.consult .sub {
  color: #D7E3FF;
}

.form {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

@media (max-width: 820px) {
  .form {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #D7E3FF;
}

.field input,
.field select {
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0 14px;
  font: 400 16px var(--body);
  transition: border-color 0.15s ease;
}

.field select option {
  color: #0B1F4D;
  background: #ffffff;
}

.field input::placeholder {
  color: #AFC3EE;
}

.field input[aria-invalid="true"] {
  border-color: var(--gold);
}

.form .btn {
  grid-column: 1 / -1;
  background: #ffffff;
  color: var(--blue) !important;
  font-weight: 700;
}

.form .btn:hover {
  background: #EEF3FF;
}

.form-err {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
}
