/* ── Official FBLA brand typefaces, loaded from local files ── */
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Light.otf") format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Regular.otf") format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Italic.otf") format('opentype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Medium.otf") format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Medium Italic.otf") format('opentype');
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Bold.otf") format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url("../Fonts/Apercu Pro/Apercu Pro Bold Italic.otf") format('opentype');
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Gelasio';
  src: url("../Fonts/Gelasio/Gelasio-Regular.ttf") format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gelasio';
  src: url("../Fonts/Gelasio/Gelasio-MediumItalic.ttf") format('truetype');
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Gelasio';
  src: url("../Fonts/Gelasio/Gelasio-SemiBold.ttf") format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gelasio';
  src: url("../Fonts/Gelasio/Gelasio-Bold.ttf") format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Official FBLA brand palette (Brand Center 2024) ── */
:root {
  --navy:       #0a2e7f;
  --blue:       #1d52bc;
  --cobalt:     #226add;
  --gold:       #f4ab19;
  --ink:        #2d2b2b;
  --white:      #ffffff;

  --primary:    var(--navy);
  --accent:     var(--gold);
  --bg:         var(--white);
  --surface:    #f5f7fb;
  --text:       var(--ink);
  --text-muted: #5f6b86;
  --border:     #d6deef;

  --radius:     12px;
  --radius-pill: 999px;
  --font-body:    'Apercu Pro', 'Helvetica Neue', Arial, sans-serif;
  --font-head:    'Apercu Pro', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Apercu Pro', 'Helvetica Neue', Arial, sans-serif;
  --shadow:     0 8px 24px rgba(10,46,127,0.08);
  --shadow-lg:  0 16px 40px rgba(10,46,127,0.14);
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ── */
header {
  background: var(--white);
  color: var(--navy);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(10,46,127,0.06);
  border-bottom: 3px solid var(--gold);
  min-height: 72px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: .85rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--navy);
}

.logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.logo-chapter {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  border-left: 2px solid var(--border);
  padding-left: .85rem;
}
.logo-chapter .chapter-school {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.logo-chapter .chapter-tag {
  font-size: .7rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}
@media (max-width: 640px) {
  .logo-chapter { display: none; }
}

nav { display: flex; gap: .25rem; align-items: center; }

nav a {
  color: var(--navy);
  text-decoration: none;
  padding: .55rem 1rem;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

nav a:hover {
  background: rgba(10,46,127,.07);
  color: var(--navy);
}

nav a.active {
  background: var(--navy);
  color: var(--white);
}

nav a.nav-accent {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}

nav a.nav-accent:hover { background: var(--surface); color: var(--navy); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--navy);
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Mobile nav ── */
@media (max-width: 640px) {
  .hamburger { display: flex; }
  nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    gap: .35rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(10,46,127,0.12);
  }
  nav.open { display: flex; }
  nav a { width: 100%; text-align: center; padding: .8rem; }
}

/* ── Main content ── */
main {
  flex: 1;
  opacity: 1;
  transition: opacity var(--transition);
}

main.fading { opacity: 0; }

/* ── Page container ── */
.page { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* ── Hero ── */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 5.5rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 50%, rgba(244,171,25,.16) 0%, rgba(34,106,221,.22) 45%, transparent 75%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  padding: .35rem .85rem;
  border: 1px solid rgba(244,171,25,.45);
  border-radius: var(--radius-pill);
  background: rgba(244,171,25,.08);
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
  display: block;
  white-space: nowrap;
}

.hero h1 span { color: var(--gold); }

/* Allow the title to wrap on small phones so it never overflows/clips. */
@media (max-width: 600px) {
  .hero h1 { white-space: normal; }
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,.88);
  max-width: 600px;
  margin: 0 auto 2.2rem;
  font-weight: 400;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10,46,127,.22); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(244,171,25,.32);
}
.btn-primary:hover { background: #ffba2e; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.55);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--blue); color: var(--white); }
.btn-danger { background: #dc3545; color: var(--white); }

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Sections ── */
.section { padding: 4rem 1.5rem; }
.section-alt { background: var(--surface); }

.section-inner { max-width: 1100px; margin: 0 auto; }

.section-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .55rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.section-line {
  width: 56px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 2rem;
}

/* ── Announcement card (homepage) ── */
.announcement-section { padding: 2.5rem 1.5rem 0; }
.announcement {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
}
.announcement-icon {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  box-shadow: 0 6px 14px rgba(10,46,127,.18);
}
.announcement-body { min-width: 0; }
.announcement-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .35rem;
}
.announcement-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: .3rem;
  letter-spacing: -0.01em;
}
.announcement-text {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.announcement-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .6rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: .85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.announcement-cta:hover { background: var(--blue); transform: translateY(-1px); }

@media (max-width: 720px) {
  .announcement {
    grid-template-columns: auto 1fr;
    row-gap: 1rem;
  }
  .announcement-cta { grid-column: 1 / -1; justify-self: start; }
}

/* ── Embedded calendars / Google Forms ── */
.embeds-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .embeds-grid.two-col { grid-template-columns: 1fr 1fr; }
}
.embed-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.embed-card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
  font-size: .95rem;
  display: flex; align-items: center; gap: .55rem;
}
.embed-card-head svg { color: var(--gold); }
.embed-frame {
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
  background: var(--surface);
}

/* ── Cards grid ── */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(29,82,188,.25);
}
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 12px rgba(10,46,127,.18);
}

.card-icon svg { fill: var(--gold); }

.card h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: .5rem;
}

.card p {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.card a.card-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition), gap var(--transition);
}
.card a.card-link:hover { color: var(--navy); gap: .55rem; }

/* ── Officers ── */
.officers {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.officer {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.officer:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.officer-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .85rem;
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(10,46,127,.22);
  overflow: hidden;
}
.officer-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.officer h4 {
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .15rem;
}
.officer span {
  font-size: .76rem;
  color: var(--text-muted);
  letter-spacing: .02em;
}

/* ── CTA banner ── */
.cta-banner {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  border-radius: 18px;
  padding: 3rem 2.5rem;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(10,46,127,.22);
}
.cta-banner::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  background-image: url("../Media/FBLA Emblem FINAL RGB (1).png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.10;
  pointer-events: none;
  filter: brightness(2);
}

.cta-banner h2 {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: .85rem;
}

.cta-banner p {
  position: relative;
  color: rgba(255,255,255,.88);
  margin-bottom: 1.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.cta-banner .hero-actions { position: relative; }

/* ── Events ── */
.events-list {
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.events-list::-webkit-scrollbar { width: 8px; }
.events-list::-webkit-scrollbar-thumb {
  background: rgba(10,46,127,.18);
  border-radius: 4px;
}
.events-list::-webkit-scrollbar-thumb:hover { background: rgba(10,46,127,.32); }

.event-item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: .7rem .25rem;
  border-bottom: 1px solid var(--border);
}
.event-item:last-child { border-bottom: none; }

.event-date {
  color: var(--blue);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 92px;
  line-height: 1.3;
}

.event-info { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; flex: 1; }
.event-info h4 {
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
}
.event-info p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Password page ── */
.password-page {
  max-width: 420px;
  margin: 6rem auto;
  padding: 0 1.5rem;
}

.password-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.75rem 2rem 2.25rem;
  box-shadow: 0 20px 50px rgba(10,46,127,.12);
  text-align: center;
  overflow: hidden;
}
.password-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 50%, var(--gold) 100%);
}

.password-card .lock-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 20px rgba(10,46,127,.22);
}

.password-card h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  margin-bottom: .5rem;
}

.password-card p {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.password-input-wrap { position: relative; margin-bottom: 1rem; }

.password-input-wrap input {
  width: 100%;
  padding: .85rem 2.8rem .85rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.password-input-wrap input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,82,188,.15);
}

.password-toggle {
  position: absolute;
  right: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--text-muted);
  padding: 0;
}

.error-msg {
  background: #fff0f0;
  border: 1px solid #ffcdd2;
  color: #c62828;
  border-radius: 8px;
  padding: .6rem .9rem;
  font-size: .85rem;
  margin-bottom: 1rem;
  display: none;
}

.error-msg.show { display: block; }

.btn-full { width: 100%; justify-content: center; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-left: .3rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Study page ── */
.study-header {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}
.study-header::after {
  content: '';
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%) rotate(-12deg);
  width: 260px;
  height: 260px;
  background-image: url("../Media/FBLA Emblem FINAL RGB (1).png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.08;
  pointer-events: none;
  filter: brightness(2);
}

.study-header h1 {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: .5rem;
}

.study-header p {
  position: relative;
  color: rgba(255,255,255,.85);
  font-size: .98rem;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto;
}

.study-content { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.study-warning {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .75rem 1rem;
  margin-bottom: 1.75rem;
  background: rgba(214, 158, 46, .12);
  border: 1px solid rgba(214, 158, 46, .4);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--text);
}
.study-warning svg {
  flex-shrink: 0;
  margin-top: .1rem;
  color: var(--gold);
}

.study-events-cta {
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.study-events-cta-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: .4rem;
}
.study-events-cta-desc {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: .85rem;
}
.study-events-cta-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}
.study-events-cta-link:hover { color: var(--navy); text-decoration: underline; }
.study-events-cta-link svg { flex-shrink: 0; }

.study-accordion {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.study-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.study-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  transition: background var(--transition);
}
.study-section summary::-webkit-details-marker { display: none; }
.study-section summary:hover { background: var(--surface); }
.study-section-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.study-section[open] .study-section-chevron { transform: rotate(180deg); }
.study-section-body {
  padding: 0 1.25rem 1.25rem;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.study-section-empty { font-style: italic; color: var(--text-muted); }
.study-block { margin-bottom: 1.5rem; }
.study-block:last-child { margin-bottom: 0; }
.study-block-header {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.01em;
  margin-bottom: .5rem;
}
.study-block-desc {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: .5rem;
}
.study-block-desc:last-child { margin-bottom: 0; }
.study-block-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
  margin-top: .65rem;
}
.study-block-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}
.study-block-links a:hover { color: var(--navy); text-decoration: underline; }
.study-block-links svg { flex-shrink: 0; }

.study-events {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 3rem;
  max-height: 155px;
  overflow-y: auto;
  padding-right: .4rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 66%, transparent 100%);
  transition: -webkit-mask-image var(--transition), mask-image var(--transition);
}
.study-events.at-bottom {
  -webkit-mask-image: none;
  mask-image: none;
}

.events-search-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}
.events-search-wrap svg {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.events-search {
  width: 100%;
  padding: .7rem 1rem .7rem 2.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.events-search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,82,188,.15);
}

.event-card-tag {
  display: inline-block;
  background: rgba(29,82,188,.10);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: var(--radius-pill);
  letter-spacing: .08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.event-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.event-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(29,82,188,.25);
}
.event-row-info { flex: 1; min-width: 0; }
.event-row-info h4 {
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: .15rem;
}
.event-row-info p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.event-row-actions {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-shrink: 0;
}
.event-row-actions a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition), gap var(--transition);
  white-space: nowrap;
}
.event-row-actions a:hover { color: var(--navy); gap: .55rem; }

.events-empty {
  text-align: center;
  padding: 1.75rem 1rem;
  color: var(--text-muted);
  font-size: .9rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

@media (max-width: 640px) {
  .event-row {
    flex-direction: column;
    align-items: stretch;
  }
  .event-row-actions { justify-content: space-between; }
}

/* ── Chatbot ── */
.chatbot-section {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.chatbot-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: center;
  gap: .85rem;
}

.chatbot-avatar {
  width: 42px; height: 42px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(244,171,25,.35);
}

.chatbot-header .bot-name { font-weight: 700; font-size: .95rem; }
.chatbot-header .bot-sub { font-size: .75rem; color: rgba(255,255,255,.75); }

.chatbot-status {
  width: 9px; height: 9px;
  background: #4cde80;
  border-radius: 50%;
  margin-left: auto;
  box-shadow: 0 0 6px #4cde80;
}

.chatbot-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  scroll-behavior: smooth;
}

.message {
  max-width: 82%;
  animation: msgIn .25s ease forwards;
}

@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.message.user { align-self: flex-end; }
.message.bot  { align-self: flex-start; }

.msg-bubble {
  padding: .65rem 1rem;
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.6;
}

.message.user .msg-bubble {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(10,46,127,.15);
}

.message.bot .msg-bubble {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-name {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .2rem;
  padding: 0 .25rem;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: .65rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.chatbot-input-area {
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: .6rem;
  align-items: flex-end;
}

.chatbot-input-area textarea {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--text);
  background: var(--surface);
  max-height: 120px;
  transition: border-color var(--transition);
  line-height: 1.5;
}

.chatbot-input-area textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,82,188,.12);
}

.send-btn {
  width: 44px; height: 44px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 14px rgba(244,171,25,.28);
}

.send-btn:hover { background: #ffba2e; transform: scale(1.06); box-shadow: 0 8px 18px rgba(244,171,25,.4); }
.send-btn:active { background: #d99007; transform: scale(.97); }
.send-btn:disabled { background: #d9d9d9; color: #999; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Chat sidebar / launcher ── */
.chat-fab {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  height: 56px;
  padding: 0 1.4rem 0 1.15rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  box-shadow: 0 10px 26px rgba(10,46,127,.4);
  z-index: 1200;
  transition: transform var(--transition), box-shadow var(--transition), opacity .2s ease;
}
.chat-fab-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}
.chat-fab:hover { transform: scale(1.05); box-shadow: 0 14px 32px rgba(10,46,127,.5); }
.chat-fab:active { transform: scale(.96); }
.chat-fab.hidden { opacity: 0; pointer-events: none; transform: scale(.6); }

.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,45,.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  z-index: 1250;
}
.chat-overlay.show { opacity: 1; pointer-events: auto; }

.chat-sidebar {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 400px;
  max-width: 92vw;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,.22);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 1300;
}
.chat-sidebar.open { transform: translateX(0); }

.chat-sidebar .chatbot-header { border-radius: 0; flex-shrink: 0; }

.chat-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: var(--white);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-left: .5rem;
  flex-shrink: 0;
  transition: background var(--transition);
}
.chat-close:hover { background: rgba(255,255,255,.28); }

.chat-sidebar .chatbot-input-area { flex-shrink: 0; }

@media (max-width: 480px) {
  .chat-fab { bottom: 1.1rem; right: 1.1rem; height: 50px; padding: 0 1.2rem 0 1rem; }
}

/* ── Access denied ── */
.denied {
  text-align: center;
  padding: 8rem 1.5rem;
}

.denied h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: #c62828;
  letter-spacing: -0.015em;
  margin-bottom: .75rem;
}

.denied p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Footer ── */
footer {
  position: relative;
  background: var(--navy);
  color: rgba(255,255,255,.78);
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  font-size: .85rem;
  margin-top: auto;
  border-top: 4px solid var(--gold);
}

footer .footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: .75rem;
  display: inline-block;
}

footer .footer-divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  margin: 1rem auto;
  opacity: .6;
}

footer .footer-tag {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-top: .85rem;
}

footer strong { color: var(--gold); font-weight: 600; }

footer a.insta-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .82rem;
  margin-top: .5rem;
  transition: color .2s;
}
footer a.insta-link:hover { color: #fff; }
footer a.insta-link svg { flex-shrink: 0; }

footer a.footer-admin {
  display: inline-block;
  margin-top: 1rem;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .2s;
}
footer a.footer-admin:hover { color: var(--gold); }

/* ── Utility ── */
.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: var(--radius-pill);
  margin-left: .4rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim { animation: fadeUp .5s ease both; }
.anim-1 { animation-delay: .05s; }
.anim-2 { animation-delay: .12s; }
.anim-3 { animation-delay: .19s; }
.anim-4 { animation-delay: .26s; }

/* ── Quiz Me button on event cards ── */
.quiz-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--navy);
  color: var(--gold);
  border: none;
  border-radius: var(--radius-pill);
  padding: .45rem 1rem;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .25rem;
  align-self: flex-start;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.quiz-btn:hover {
  background: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(10,46,127,.2);
}

/* ── Quiz Overlay ── */
.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: qFadeIn .2s ease;
}
@keyframes qFadeIn { from { opacity: 0; } to { opacity: 1; } }

.quiz-box {
  background: var(--bg);
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
}

.quiz-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}
.quiz-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  flex: 1;
}

.quiz-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .82rem;
}

.quiz-timer {
  background: rgba(255,255,255,.18);
  border-radius: 6px;
  padding: .25rem .65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.quiz-timer.warning { background: rgba(220,53,69,.85); animation: timerPulse .8s infinite; }
@keyframes timerPulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }

.quiz-progress-bar { height: 4px; background: rgba(10,46,127,.08); flex-shrink: 0; }
.quiz-progress-fill { height: 100%; background: var(--gold); transition: width .35s ease; box-shadow: 0 0 8px rgba(244,171,25,.5); }

.quiz-body { padding: 1.75rem 1.5rem; flex: 1; }

.quiz-question-num {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}

.quiz-question-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.quiz-options { display: flex; flex-direction: column; gap: .6rem; }

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .88rem;
  color: var(--text);
  background: var(--bg);
  text-align: left;
  transition: border-color .15s, background .15s, transform .1s;
  width: 100%;
  font-family: var(--font-body);
  line-height: 1.45;
}
.quiz-option:hover:not(:disabled) { border-color: var(--blue); background: #eef2fb; transform: translateX(2px); }

.opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-weight: 700;
  font-size: .78rem;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}

.quiz-option.correct { border-color: #2e7d32; background: #f1f8e9; }
.quiz-option.correct .opt-letter { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.quiz-option.wrong   { border-color: #c62828; background: #fff5f5; }
.quiz-option.wrong   .opt-letter { background: #c62828; border-color: #c62828; color: #fff; }
.quiz-option:disabled { cursor: default; transform: none !important; }

.quiz-next-btn {
  margin-top: 1.1rem;
  width: 100%;
  padding: .9rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 6px 16px rgba(10,46,127,.22);
}
.quiz-next-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(10,46,127,.3); }

.quiz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
  gap: .85rem;
  text-align: center;
}
.quiz-spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--surface);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: qSpin .8s linear infinite;
}
@keyframes qSpin { to { transform: rotate(360deg); } }

.quiz-score-screen { padding: 2rem 1.5rem; text-align: center; }

.quiz-score-circle {
  width: 118px; height: 118px;
  border-radius: 50%;
  border: 6px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.quiz-score-pct  { font-size: 2rem; font-weight: 900; line-height: 1; color: var(--primary); }
.quiz-score-lbl  { font-size: .72rem; color: var(--text-muted); margin-top: .1rem; }

.quiz-score-stats {
  display: flex;
  justify-content: center;
  gap: 2.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.quiz-stat { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.quiz-stat-val { font-size: 1.3rem; font-weight: 800; }
.quiz-stat-key { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.quiz-review { text-align: left; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.quiz-review h3 { font-size: .9rem; font-weight: 700; color: var(--primary); margin-bottom: .85rem; }

.review-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin-bottom: .65rem;
  border-left: 3px solid #c62828;
}
.review-item .rq { font-size: .86rem; font-weight: 600; margin-bottom: .4rem; line-height: 1.45; }
.review-item .ra { font-size: .8rem; color: var(--text-muted); line-height: 1.6; }

.quiz-score-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}

.quiz-history-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

.quiz-history-list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }

.quiz-history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.qhi-event { font-weight: 700; font-size: .88rem; flex: 1; min-width: 140px; }
.qhi-score { font-size: 1.1rem; font-weight: 800; }
.qhi-meta  { font-size: .76rem; color: var(--text-muted); }
