/* ============================================================
   SBS Swiss Business School — faithful recreation
   Real brand tokens (extracted from live site):
   Navy #1A418C (headings) · Apply red #E03123 · Body Roboto
   Program accents: Bachelor #009EA3 · Master #DE4C02 ·
   MBA #004777 · Doctorate #D5A021 · Executive #7A7A7A
   ============================================================ */

:root {
  --navy:        #1A418C;
  --navy-dark:   #143269;
  --apply-red:   #E03123;
  --apply-dark:  #c0261a;
  --ink:         #010101;
  --ink-soft:    #343A40;
  --muted:       #6C757D;
  --line:        #DEE2E6;
  --bg-soft:     #F5F6F8;
  --bg-soft2:    #F0F3F8;
  --white:       #FFFFFF;
  --font-head:   'Montserrat', system-ui, sans-serif;
  --font-body:   'Roboto', Arial, sans-serif;
  --radius:      6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--navy); font-weight: 700; }
a { color: var(--navy); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== UTILITY BAR ===== */
.utility-bar { background: var(--navy); color: rgba(255,255,255,0.85); font-size: 13px; }
.utility-bar__inner { display: flex; justify-content: space-between; align-items: center; padding: 8px 24px; flex-wrap: wrap; gap: 8px; }
.utility-bar__contact { display: flex; gap: 22px; flex-wrap: wrap; }
.utility-bar__actions { display: flex; gap: 18px; }
.utility-bar__actions a { color: rgba(255,255,255,0.85); font-weight: 500; }
.utility-bar__actions a:hover { color: #fff; text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 24px; }

.logo__img { height: 48px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { color: var(--ink); font-weight: 500; font-size: 15px; font-family: var(--font-body); transition: color .15s; }
.nav-link:hover { color: var(--navy); }

.nav-item summary { list-style: none; cursor: pointer; color: var(--ink); font-weight: 500; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.nav-item summary::-webkit-details-marker { display: none; }
.caret { font-size: 10px; color: var(--muted); }
.nav-item[open] summary { color: var(--navy); }

.mega-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--white); border-top: 3px solid var(--navy);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  padding: 28px 24px; max-width: 1200px; margin: 0 auto; border-radius: 0 0 var(--radius) var(--radius);
}
.mega-col h4 { font-size: 13px; text-transform: uppercase; color: var(--navy); letter-spacing: 0.6px; margin-bottom: 10px; }
.mega-col a { display: block; color: var(--ink-soft); font-size: 14px; padding: 5px 0; }
.mega-col a:hover { color: var(--navy); }
.nav-item { position: static; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: none; border: none; color: var(--ink-soft); cursor: pointer; padding: 6px; display: inline-flex; }
.icon-btn:hover { color: var(--navy); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  padding: 10px 22px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: transform .12s, background .15s; letter-spacing: 0.5px;
}
.btn:hover { transform: translateY(-1px); }
.btn--apply { background: var(--apply-red); color: #fff; text-transform: uppercase; }
.btn--apply:hover { background: var(--apply-dark); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--bg-soft); }
.btn--lg { padding: 14px 28px; font-size: 15px; }

/* ===== HERO (photo + scrim + white text) ===== */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(20,50,105,0.78) 0%, rgba(20,50,105,0.45) 55%, rgba(20,50,105,0.15) 100%);
}
.hero__content { position: relative; z-index: 2; color: #fff; max-width: 760px; padding: 70px 24px; }
.hero__content h1 { color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; }
.hero__hl { color: #6FBDFF; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero__badges { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; }
.hero__badge {
  flex: 1; min-width: 220px; background: rgba(26, 65, 140, 0.92); color: #fff;
  padding: 14px 20px; font-size: 13.5px; font-weight: 500; border-right: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; backdrop-filter: blur(2px);
}
.hero__badge:last-child { border-right: none; }

/* ===== SECTIONS ===== */
.section-title { font-size: clamp(24px, 3vw, 32px); text-align: center; color: var(--navy); font-weight: 700; }
.section-sub { text-align: center; color: var(--muted); font-size: 16px; margin-top: 8px; }

/* ===== PROGRAMS ===== */
.programs { padding: 70px 0; }
.programs .section-title { margin-bottom: 40px; }
.programs__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prog {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column;
}
.prog:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,0.10); }
.prog__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.prog__body { padding: 18px 16px; display: flex; flex-direction: column; flex: 1; }
.prog__body h3 { font-size: 22px; margin-bottom: 8px; font-weight: 700; }
.prog__body p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; flex: 1; }
.prog__link { font-family: var(--font-head); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }

/* ===== RANKINGS ===== */
.rankings { background: var(--bg-soft2); padding: 60px 0; }
.rankings__title { text-align: center; color: #809AC6; font-size: 22px; font-weight: 600; margin-bottom: 30px; }
.rankings__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.rank { text-align: center; }
.rank__num { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.rank p { font-size: 14px; color: var(--ink-soft); }

/* ===== ACCREDITATION ===== */
.accreditation { padding: 70px 0; background: #fff; }
.accreditation__row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.accred-pill {
  font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--navy);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 20px; background: var(--bg-soft);
}

/* ===== STATS ===== */
/* ===== HOW IT WORKS (SBS Agent) ===== */
.howitworks { padding: 70px 0; background: #fff; }
.howitworks .section-title { margin-bottom: 6px; }
.flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.flow-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px;
  text-align: center; transition: transform .15s, box-shadow .15s;
}
.flow-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(26,65,140,0.10); }
.flow-card__num {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--navy), var(--apply-red)); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.flow-card h3 { font-size: 17px; margin-bottom: 8px; }
.flow-card p { font-size: 14px; color: var(--muted); }
.flow-cta { text-align: center; margin-top: 30px; font-size: 16px; color: var(--ink-soft); }
.flow-cta b { color: var(--navy); }

/* ===== STATS ===== */
.stats { background: var(--navy); color: #fff; padding: 50px 0; }
.stats__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 40px; font-weight: 800; color: #6FBDFF; }
.stat span { font-size: 14px; color: rgba(255,255,255,0.8); }

/* ===== CTA ===== */
.cta { background: var(--bg-soft); padding: 70px 0; text-align: center; }
.cta__inner { max-width: 680px; margin: 0 auto; }
.cta h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.cta p { color: var(--muted); margin-bottom: 26px; font-size: 17px; }

/* ===== FOOTER ===== */
.site-footer { background: #0a1f3d; color: rgba(255,255,255,0.8); padding: 56px 0 0; }
.site-footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.site-footer__brand p { font-size: 14px; margin-top: 16px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.site-footer__contact { color: rgba(255,255,255,0.5) !important; font-size: 13px !important; }
.site-footer__col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.6px; }
.site-footer__col a { display: block; color: rgba(255,255,255,0.7); font-size: 14px; padding: 5px 0; }
.site-footer__col a:hover { color: #6FBDFF; }
.logo__img--light { filter: brightness(0) invert(1); height: 42px; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; }
.site-footer__bottom p { font-size: 13px; color: rgba(255,255,255,0.45); }

/* ============================================================
   COPILOT FLOATING CHAT WIDGET
   ============================================================ */
.copilot-fab {
  position: fixed; bottom: 26px; right: 26px; z-index: 200;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; border: none; cursor: pointer;
  padding: 0 22px 0 16px; height: 54px; border-radius: 999px;
  box-shadow: 0 10px 28px rgba(26, 65, 140, 0.40);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  transition: transform .15s, background .15s;
}
.copilot-fab:hover { transform: translateY(-2px); background: var(--navy-dark); }
.copilot-fab__ping {
  position: absolute; top: 9px; right: 11px; width: 10px; height: 10px;
  background: #28d27d; border: 2px solid var(--navy); border-radius: 50%; animation: ping 1.8s ease-in-out infinite;
}
@keyframes ping { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.copilot-panel {
  position: fixed; bottom: 90px; right: 26px; z-index: 199;
  width: 384px; height: 600px; max-height: calc(100vh - 130px);
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(20px) scale(0.96); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.copilot-panel--open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.copilot-panel__header { background: var(--navy); color: #fff; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; }
.copilot-panel__title { display: flex; align-items: center; gap: 12px; }
.copilot-panel__avatar {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 12px;
}
.copilot-panel__title strong { display: block; font-family: var(--font-head); font-size: 14px; }
.copilot-panel__title em { font-style: normal; font-size: 11.5px; color: rgba(255,255,255,0.75); }
.copilot-panel__close { background: rgba(255,255,255,0.2); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px; }
.copilot-panel__close:hover { background: rgba(255,255,255,0.35); }
.copilot-panel__body { flex: 1; overflow: hidden; background: #fff; }
.copilot-panel__body iframe { display: block; width: 100%; height: 100%; }

/* ============================================================
   CONVERSATION STARTER CHIPS (in-widget)
   ============================================================ */
.sbs-starters {
  position: absolute;
  left: 12px; right: 12px; bottom: 56px;
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 8px 4px 10px;
  background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
  z-index: 10; pointer-events: auto;
}
.sbs-starter {
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 500;
  color: var(--navy);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
  white-space: nowrap;
}
.sbs-starter:hover {
  background: #fff;
  border-color: var(--navy);
  transform: translateY(-1px);
}
/* the webchat container must be positioned so the chip overlay anchors correctly */
#webchat { position: relative; height: 100%; }

/* Welcome bubble (rendered by embed.js, styled to match bot bubbles) */
.sbs-welcome-bubble {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 16px 12px;
  font-family: var(--font-body);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .programs__grid { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .rankings__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main-nav, .header-actions .icon-btn { display: none; }
  .hero { min-height: 440px; }
  .hero__content { padding: 50px 24px; }
  .programs__grid { grid-template-columns: 1fr 1fr; }
  .stats__inner, .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .copilot-panel { width: calc(100vw - 32px); right: 16px; bottom: 84px; height: 72vh; }
}
