/* ── Design tokens ── */
:root {
  --navy: #0d3b66;
  --navy-dark: #092d50;
  --saltire: #005EB8;
  --gold: #E8A33D;
  --gold-hover: #d4902a;
  --neutral-bg: #f5f7fa;
  --text-main: #1f2937;
  --text-muted: #6b7280;

  /* Type scale — replaces the ~9 near-duplicate small-text sizes
     (.65/.7/.72/.75/.8/.85/.875/.9/.95rem) that had accumulated with
     no naming. Two sizes below base cover every "small text" role. */
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2rem;
  --fs-3xl: 3rem;

  /* Fluid hero/display sizes — named per the section that owns them,
     values unchanged from what was already shipping. */
  --fs-hero-classic: clamp(1.75rem, 4vw, 2.8rem);
  --fs-hero-title: clamp(2.3rem, 4vw, 3.5rem);
  --fs-hero-page: clamp(1.5rem, 3vw, 2.2rem);

  /* Line-height tokens — the 1 / 1.15 / 1.2 / 1.9 values that were
     each invented per-rule, now named by role. */
  --lh-solid: 1;
  --lh-tight: 1.15;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.9;

  /* Spacing scale — for the raw-pixel margins/padding that had been
     mixed in alongside Bootstrap's rem-based utility classes. */
  --space-xs: .625rem;
  --space-sm: .75rem;
  --space-md: 1.25rem;
  --space-lg: 1.75rem;
  --space-xl: 1.875rem;
  --space-2xl: 2.1875rem;
}

/* ── Heading scale ──
   Explicit h1-h6 rules so headings without a component-specific
   override (previously falling back to un-styled Bootstrap defaults)
   are consistent with the rest of the type system. */
h1 { font-size: var(--fs-2xl); font-weight: 700; line-height: var(--lh-snug); }
h2 { font-size: var(--fs-xl); font-weight: 700; line-height: var(--lh-snug); }
h3 { font-size: var(--fs-md); font-weight: 700; line-height: var(--lh-normal); }
h4 { font-size: var(--fs-base); font-weight: 700; line-height: var(--lh-normal); }
h5 { font-size: var(--fs-base); font-weight: 600; line-height: var(--lh-normal); }
h6 { font-size: var(--fs-sm); font-weight: 600; line-height: var(--lh-normal); }

/* ── Base ── */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Navbar ── */
.siam-navbar {
  background: var(--navy) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.siam-navbar .navbar-brand {
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

.brand-qs {
  color: #fff;
  font-weight: 700;
}

.brand-at {
  color: var(--gold);
  font-size: 0.8em;
  margin: 0 .25rem;
}

.brand-siam {
  color: var(--gold);
  font-weight: 600;
}

.siam-navbar .nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-size: var(--fs-sm);
  transition: color .15s;
}

.siam-navbar .nav-link:hover {
  color: var(--gold) !important;
}

.siam-navbar .nav-link.active {
  color: var(--gold) !important;
  font-weight: 600;
  position: relative;
}

.siam-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: .5rem;
  right: .5rem;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* ── Gold button ── */
.btn-gold {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  border: none;
  border-radius: 4px;
  transition: background .15s, transform .1s;
}

.btn-gold:hover {
  background: var(--gold-hover);
  color: var(--navy);
  transform: translateY(-1px);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--saltire) 100%);
  color: #fff;
  padding: 80px 0 60px;
}

.hero h1 {
  font-size: var(--fs-hero-classic);
  font-weight: 800;
  line-height: var(--lh-snug);
}

.hero .lead {
  color: rgba(255, 255, 255, .85);
  font-size: var(--fs-md);
}

/* ============ Hero Improvements  ==============*/
.hero {
  overflow: hidden;
}

.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .15);
  color: var(--gold);
  border-radius: 30px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: var(--fs-hero-title);
  font-weight: 800;
  line-height: var(--lh-tight);
  max-width: 720px;
}

.hero-description {
  max-width: 680px;
  color: rgba(255, 255, 255, .82);
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
}

/* ============== Partnership Card  =========*/
.partnership-panel {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .22);
  transition: transform .35s ease, box-shadow .35s ease;
}

.partnership-panel:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 70px rgba(0, 0, 0, .28);
}

/* ==========  Ribbon ===========*/
.partner-ribbon {
  background: linear-gradient(90deg, var(--gold), #f0b34d);
  color: var(--navy);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 2px;
  padding: var(--space-sm);
  text-transform: uppercase;
}

/* =============== Logos  =======*/
.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 20px 25px 20px;
}

.logo-item {
  flex: 1;
  display: flex;
  justify-content: center;
}

.logo-item img {
  max-width: 160px;
  max-height: 120px;
  object-fit: contain;
  transition: transform .35s ease;
}

.partnership-panel:hover .logo-item img {
  transform: scale(1.05);
}

/* ======================== Gold X  =======*/
.partner-x {
  font-size: 42px;
  font-weight: 300;
  color: var(--gold);
  opacity: .85;
}

/* ============ Divider  ======*/
.gold-divider {
  width: 85%;
  height: 1px;
  margin: auto;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* ============= Title  ========*/
.partnership-panel h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  text-align: center;
  color: var(--navy);
  font-size: var(--fs-xl);
  font-weight: 700;
}

.partner-text {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: 30px;
}

/* ============= Approval Box  ==============*/
.approval-card {
  margin: 0 var(--space-xl) var(--space-2xl);
  border-radius: 12px;
  background: linear-gradient(135deg, #0d3b66, #164d82);
  color: #fff;
  padding: var(--space-lg);
  text-align: center;
}

.approval-label {
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--fs-xs);
}

.approval-number {
  margin: 12px 0;
  font-size: var(--fs-3xl);
  font-weight: 300;
  line-height: var(--lh-solid);
}

.approval-footer {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .78);
}

/* ================ Buttons  ============*/
.hero .btn {
  min-width: 220px;
}

@media(max-width:991px) {
  .hero {
    text-align: center;
  }

  .hero-title {
    max-width: 100%;
  }

  .hero-description {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .logos-row {
    gap: 10px;
    padding: 35px 20px 25px;
  }

  .logo-item img {
    max-width: 150px;
    max-height: 100px;
  }

  .approval-number {
    font-size: var(--fs-2xl);
  }
}

.partner-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 80px;
}

.connector-line {
  width: 2px;
  height: 35px;
  background: var(--gold);
}

.connector-label {
  color: var(--gold);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

/* ── Trust strip ── */
.trust-strip {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, .8);
  font-size: var(--fs-xs);
  padding: var(--space-xs) 0;
}

.trust-strip .trust-item {
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, .2);
}

.trust-strip .trust-item:last-child {
  border-right: none;
}

/* ── Section ── */
.section-navy {
  background: var(--navy);
  color: #fff;
}

.section-light {
  background: var(--neutral-bg);
}

/* ── Cards ── */
.card-programme {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  transition: transform .2s, box-shadow .2s;
  height: 100%;
}

.card-programme:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
}

.card-programme .card-header {
  background: var(--navy);
  color: #fff;
  border-radius: 10px 10px 0 0 !important;
  padding: 1rem 1.25rem;
}

.badge-approved {
  background: #198754;
  color: #fff;
  font-size: var(--fs-xs);
}

.badge-planned {
  background: var(--saltire);
  color: #fff;
  font-size: var(--fs-xs);
}

.badge-scqf {
  background: var(--gold);
  color: var(--navy);
  font-size: var(--fs-xs);
  font-weight: 700;
}

/* ── Value cards ── */
.value-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  height: 100%;
}

.value-card .icon {
  font-size: var(--fs-2xl);
  color: var(--saltire);
  margin-bottom: .75rem;
}

/* ── Page hero (non-home) ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff;
  padding: 50px 0 40px;
}

.page-hero h1 {
  font-size: var(--fs-hero-page);
  font-weight: 700;
}

/* ── Unit table ── */
.unit-table th {
  background: var(--navy);
  color: #fff;
  font-size: var(--fs-sm);
}

.unit-table td {
  font-size: var(--fs-sm);
}

.scqf-7 {
  background: #e8f4fd;
}

.scqf-8 {
  background: #fff3cd;
}

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(90deg, var(--navy-dark), var(--saltire));
  color: #fff;
  padding: 50px 0;
}

/* ── Disclaimer ── */
.disclaimer {
  border-left: 4px solid var(--gold);
  background: #fffbf0;
  padding: .75rem 1rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  border-radius: 0 6px 6px 0;
}

/* ── Steps (diploma-to-degree) ── */
.step-circle {
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
}

/* ── Accordion ── */
.accordion-button:not(.collapsed) {
  background: var(--navy);
  color: #fff;
}

.accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(13, 59, 102, .25);
}

/* ── Contact ── */
.contact-card {
  background: var(--neutral-bg);
  border-radius: 10px;
  padding: 1.5rem;
}

.contact-card .contact-icon {
  font-size: 1.5rem;
  color: var(--saltire);
}

/* ── Footer ── */
.siam-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, .7);
}

.text-gold {
  color: var(--gold) !important;
}

.footer-link {
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
  transition: color .15s;
}

.footer-link:hover {
  color: var(--gold);
}

/* ── Admin ── */
.admin-sidebar {
  background: var(--navy);
  min-height: 100vh;
}

.admin-sidebar .nav-link {
  color: rgba(255, 255, 255, .75);
  padding: .5rem 1rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: var(--gold);
  background: rgba(255, 255, 255, .06);
  border-radius: 6px;
}

.admin-topbar {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

/* ── Form ── */
.form-control:focus,
.form-select:focus {
  border-color: var(--saltire);
  box-shadow: 0 0 0 .2rem rgba(0, 94, 184, .15);
}

.honeypot-field {
  display: none !important;
}

/* ── Utilities ── */
.bg-navy {
  background: var(--navy) !important;
}

.text-navy {
  color: var(--navy) !important;
}

.border-gold {
  border-color: var(--gold) !important;
}

/* ── Navy button variants ── */
.btn-navy {
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  transition: background .15s;
}

.btn-navy:hover {
  background: var(--navy-dark);
  color: #fff;
}

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
  transition: background .15s, color .15s;
}

.btn-outline-navy:hover {
  background: var(--navy);
  color: #fff;
}

/* ── Post body ── */
.post-body h2,
.post-body h3 {
  color: var(--navy);
  margin-top: 1.5rem;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.post-body a {
  color: var(--saltire);
}

.letterhead-logo {
  height: 56px;
  width: auto;
}

@media print {
  body.form-print-page .siam-navbar,
  body.form-print-page .siam-footer,
  body.form-print-page .page-hero {
    display: none !important;
  }
}