:root {
  --bg: #fcfcfd;                 /* soft off-white */
  --surface: #ffffff;            /* cards/surfaces */
  --text: #111318;               /* near-black */
  --muted: #667085;              /* refined gray for body text */
  --divider: #eef1f4;            /* lighter divider */

  /* Brand reds – smoother, less harsh than before */
  --accent: #E02020;             /* primary red */
  --accent-600: #B81719;         /* hover/active */
  --accent-700: #991417;

  /* Supporting neutrals for shadows/overlays */
  --ink-05: rgba(17,19,24,0.05);
  --ink-08: rgba(17,19,24,0.08);
  --ink-12: rgba(17,19,24,0.12);

  --container: 1160px;

  --shadow-sm: 0 1px 2px var(--ink-06), 0 1px 0 var(--ink-05);
  --shadow-md: 0 10px 30px var(--ink-08), 0 6px 12px var(--ink-06);

  /* Accent gradient used for lines/pills */
  --accent-grad: linear-gradient(135deg, #E02020, #B81719 60%, #991417);
}

/* Header sizing var */
:root { --header-h: 56px; }

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { 
  scroll-behavior: smooth; 
  /* Safari mobile viewport fix */
  height: 100%;
  height: -webkit-fill-available;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* Safari mobile viewport fix */
  min-height: 100%;
  min-height: -webkit-fill-available;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem; background: #fff; border: 2px solid var(--accent);
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}
.section { padding: 1.5rem 0; }
.section-sm { padding: 1rem 0; }
.divider { border-top: 1px solid var(--divider); }

/* Edge alignment helpers */
.full-bleed { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.flush { padding-left: 0; padding-right: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--divider); transition: box-shadow .25s ease, background .25s ease; }
.navbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; height: var(--header-h); transition: height .22s ease; }
.site-header.shrink .navbar { height: calc(var(--header-h) - 8px); }
.site-header.shrink { box-shadow: 0 6px 18px rgba(17,17,17,0.06); }
.brand { display: flex; align-items: center; gap: .4rem; font-weight: 700; letter-spacing: .2px; font-size: .95rem; }
.brand img { height: 40px; width: auto; aspect-ratio: 366 / 202; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.nav-links > a, .nav-links .nav-item > a { padding: .4rem .5rem; border-radius: .4rem; transition: background .2s ease; position: relative; }
.nav-links > a::after, .nav-links .nav-item > a::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: 0.25rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; border-radius: 1px; }
.nav-links > a:not(.btn):hover, .nav-links .nav-item > a:hover { background: var(--divider); }
.nav-links > a:hover::after, .nav-links > a[aria-current="page"]::after, .nav-links .nav-item > a:hover::after, .nav-links .nav-item > a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { margin-left: .25rem; padding: .4rem .75rem !important; font-size: .85rem; }

/* Dropdown menu */
.nav-item { position: relative; }
.nav-item > a { display: flex; align-items: center; gap: .2rem; }
.dropdown-arrow { display: inline-block; width: 10px; height: 10px; transition: transform .2s ease; }
.nav-item:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: .4rem;
  box-shadow: var(--shadow-md);
  padding: .4rem;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  margin-top: .3rem;
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: .5rem .65rem;
  border-radius: .3rem;
  transition: background .15s ease;
  font-size: .85rem;
}

.dropdown-menu a::after { display: none; }

.dropdown-menu a:hover {
  background: var(--divider);
}

/* Mobile nav */
.nav-toggle { display: none; background: transparent; border: 0; padding: .4rem; border-radius: .4rem; transition: background .2s ease; }
.nav-toggle:hover { background: var(--divider); }
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links { position: fixed; inset: 56px 0 auto 0; background: #fff; border-bottom: 1px solid var(--divider); flex-direction: column; align-items: stretch; padding: .65rem; display: none; box-shadow: var(--shadow-sm); font-size: .9rem; }
  .nav-links.open { display: flex; }
  .nav-cta { margin: 0; padding: .5rem .75rem !important; }
  
  /* Mobile dropdown */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 .85rem;
    margin-top: .2rem;
    display: none;
    font-size: .875rem;
  }
  
  .nav-item.open .dropdown-menu {
    display: block;
  }
  
  .dropdown-arrow {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: clip;
  background: #fff;
  /* Safari mobile viewport fix - use dvh (dynamic viewport height) when supported, fallback to vh */
  min-height: clamp(460px, 72vh, 880px);
}
@supports (height: 100dvh) {
  .hero {
    min-height: clamp(460px, 72dvh, 880px);
  }
}
.hero::before {
  content: "";
  position: absolute; inset: -8% -2% 0 -2%;
  background:
    radial-gradient(1200px 300px at 80% 5%, rgba(224,32,32,0.08), rgba(224,32,32,0) 60%),
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    repeating-linear-gradient(-8deg,
      rgba(224,32,32,0.08) 0 8px,
      transparent 8px 22px);
  pointer-events: none;
  animation: heroFloat 7s ease-in-out infinite alternate;
}

.hero::after {
  content:"";
  position:absolute; inset:0;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' opacity='0.06' viewBox='0 0 100 100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events:none;
}
/* Hero parallax layer */
.hero .hero-parallax {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
    radial-gradient(1200px 200px at 80% 10%, rgba(225,6,0,0.06), rgba(225,6,0,0) 70%),
    radial-gradient(800px 140px at 10% 20%, rgba(17,17,17,0.05), rgba(17,17,17,0) 70%),
    url('/Hero.jpg');
  background-size: auto, auto, auto, cover;
  background-position: center, 70% 10%, 10% 30%, center 20%;
  background-repeat: no-repeat;
  transform: translateY(0);
  will-change: transform;
}
.hero .container, .hero h1, .hero p { color: #fff; }
.hero .muted { color: rgba(255,255,255,0.85); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: center; min-height: inherit; padding: 1.5rem 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 .5rem; }
.hero p { font-size: clamp(1rem, 2.5vw, 1.125rem); color: var(--muted); margin: 0 0 .75rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
@keyframes heroFloat { from { transform: translateY(-6%); } to { transform: translateY(-2%); } }
@media (max-width: 920px) { .hero-inner { grid-template-columns: 1fr; } }

/* Cards / grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 920px) { 
  .grid-3 { grid-template-columns: 1fr; gap: 1rem; } 
  .grid-2 { grid-template-columns: 1fr; gap: 1rem; } 
}

/* Safari mobile specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Safari only - ensure proper document flow */
  body {
    min-height: -webkit-fill-available;
  }
  
  /* Ensure main content is in normal flow */
  main,
  main#content {
    position: relative;
    display: block;
    width: 100%;
    min-height: auto;
  }
  
  @media (max-width: 920px) {
    /* Ensure forms and sections stay in flow on Safari mobile */
    .section {
      position: relative;
      display: block;
      width: 100%;
      margin: 0;
      padding: 1.5rem 0;
    }
    
    .contact-section {
      position: relative;
      display: block;
      overflow: visible;
      width: 100%;
    }
    
    .grid-2,
    .grid-3 {
      display: grid;
      grid-template-columns: 1fr;
      position: relative;
      width: 100%;
    }
    
    .form {
      position: relative;
      display: grid;
      width: 100%;
    }
    
    /* Ensure footer doesn't cause layout issues */
    .site-footer {
      position: relative;
      display: block;
      width: 100%;
    }
  }
}
.card { border: 1px solid var(--divider); border-radius: .9rem; padding: 1rem; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.card p { margin: 0 0 0.5rem; color: var(--muted); }

/* Programme cards with images */
.programme-card {
  background: var(--surface);
  border-radius: .9rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--divider);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}

.programme-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(17,19,24,0.12);
}

.programme-card-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.programme-card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.programme-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.programme-card-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.programme-card p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.programme-card ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  flex: 1;
}

.programme-card li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.programme-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Feature cards with icons */
.feature-card {
  background: var(--surface);
  padding: 1.75rem;
  border-radius: .9rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--divider);
  height: 100%;
  transition: all .25s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(17,19,24,0.1);
  border-color: rgba(224, 32, 32, 0.3);
}

.feature-card h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}

.feature-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.feature-card li {
  margin-bottom: 0.65rem;
  line-height: 1.6;
}

/* Image text split layout */
.image-text-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.image-text-split img {
  width: 100%;
  border-radius: .9rem;
  box-shadow: var(--shadow-md);
}

.image-text-split h3 {
  margin-top: 0;
}

@media (max-width: 760px) {
  .image-text-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .image-text-split img {
    order: -1;
  }
  
  .programme-card-image {
    height: 220px;
  }
}

/* Enhanced headings */
h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; line-height: 1.3; }

/* Prose content formatting */
.prose { line-height: 1.7; }
.prose p { margin: 0 0 .75rem; }
.prose ul { margin: 0 0 .75rem; padding-left: 1.1rem; }
.prose li { margin: 0 0 .4rem; }

/* Photo grid for action shots */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.photo-grid img { width: 100%; height: 220px; object-fit: cover; border-radius: .6rem; box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.photo-grid .photo-card { position: relative; overflow: hidden; border-radius: .6rem; }
.photo-grid .photo-card::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.7); opacity: 0; transition: opacity .25s ease; }
.photo-grid .photo-card:hover::before { opacity: 1; }
.photo-grid .photo-card:hover img { transform: scale(1.075) rotate(-.3deg); box-shadow: var(--shadow-md); }
.photo-grid .photo-caption { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: .5rem; color: #fff; font-weight: 700; letter-spacing: .2px; opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.photo-grid .photo-card:hover .photo-caption { opacity: 1; transform: translateY(0); }
@media (max-width: 920px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid img { height: 180px; }
}
@media (max-width: 520px) {
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid img { height: 220px; }
}

/* Simple embed / logo placeholders */
.embed-placeholder, .logo-placeholder {
  width: 100%;
  height: 260px;
  border: 1px dashed #d1d5db;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #fafafa;
}
.logo-placeholder { height: 80px; background: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .56rem .9rem; border-radius: .6rem; font-weight: 700; letter-spacing: .2px; border: 1px solid transparent; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .06s ease; line-height: 1.1; background-clip: padding-box; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(225,6,0,0.15); }

/* Sizes */
.btn-sm { padding: .45rem .7rem; font-weight: 600; border-radius: .5rem; }
.btn-lg { padding: .75rem 1.1rem; font-weight: 700; border-radius: .7rem; }
.btn-pill { border-radius: 999px; }

/* Variants */
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-600); transform: translateY(-2px) scale(1.01); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--divider); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #c9cdd3; background: #f9fafb; transform: translateY(-2px) scale(1.01); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(17,17,17,0.04); }

.hero .btn-ghost, .hero .btn-outline { position: relative; }
.hero .btn-ghost::after, .hero .btn-outline::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .45rem; height: 2px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; opacity: .5; }
.hero .btn-ghost:hover::after, .hero .btn-outline:hover::after { transform: scaleX(1); }

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: background .18s ease, color .18s ease, border-color .18s ease; }
  .btn:hover, .btn:active { transform: none; }
}

/* Table */
.table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  .table-wrapper { 
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
    border-radius: .6rem;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    box-sizing: border-box;
    /* Ensure it stays within container bounds like other sections */
    position: relative;
  }
  /* Make scrollbar visible on mobile */
  .table-wrapper::-webkit-scrollbar {
    height: 8px;
  }
  .table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }
  .table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
  }
  .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.5);
  }
}
.table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: .6rem; box-shadow: var(--shadow-sm); }
.table th, .table td { text-align: left; padding: .75rem; border-bottom: 1px solid var(--divider); }
.table th { font-weight: 700; background: #fafafa; }
@media (max-width: 760px) {
  .table { 
    min-width: 700px; 
    width: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .table-wrapper .table {
    margin: 0;
  }
}

/* Footer */
.site-footer { 
  background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%);
  color: #fff;
  position: relative;
}

.footer-main {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo {
  height: 120px;
  width: 217.4px;
  aspect-ratio: 366 / 202;
  object-fit: contain;
}

.footer-brand h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.footer-column h4 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-column p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
  border-bottom-color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  padding: 1rem 0;
  background: rgba(0, 0, 0, 0.2);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-bottom-content p {
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: #fff;
}

.footer-divider {
  color: rgba(255, 255, 255, 0.3);
}

/* Footer Responsive */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-main {
    padding: 2rem 0 1.5rem;
  }
}

/* Utilities */
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--muted); }
.center { text-align: center; }
.badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.badge { background: #fff; border: 1px solid var(--divider); border-radius: 999px; padding: .25rem .6rem; font-size: .85rem; color: var(--text); }
.band {
  background: var(--accent);
  color: #fff;
  padding: 1rem 0;
}

/* Contact section highlight */
.contact-section {
  position: relative;
  background:
    linear-gradient(0deg, rgba(225,6,0,0.06), rgba(225,6,0,0.06));
  /* Safari mobile fix - ensure proper positioning */
  display: block;
  width: 100%;
}
.contact-section .card,
.contact-section .embed-placeholder {
  background: #fff;
  border: 2px solid #f1f3f5;
  box-shadow: none;
}
.contact-section .card:hover { box-shadow: var(--shadow-sm); }
.contact-section .form .input,
.contact-section .form .textarea {
  border-width: 2px;
}
.contact-section h2 { margin-top: 0; }

/* Forms */
.form { 
  display: grid; 
  gap: .75rem; 
  /* Safari mobile fix - ensure form stays in flow */
  position: relative;
  width: 100%;
}
.input, .textarea, .checkbox {
  width: 100%;
}
.input, .textarea {
  border: 1px solid var(--divider);
  border-radius: .6rem;
  padding: .6rem .7rem;
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:hover, .textarea:hover { border-color: #e5e7eb; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(225,6,0,0.15); outline: none; }
.textarea { min-height: 140px; resize: vertical; }
.label { font-weight: 600; }
.hint { font-size: .9rem; color: var(--muted); }
.error { color: var(--accent); font-size: .9rem; }
.success { color: #0a7a3d; font-weight: 600; }

/* FAQ */
.faq-item { border: 1px solid var(--divider); border-radius: .6rem; padding: .75rem 1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Section heading underline on hover (interactive feel) */
.section h1, .section h2, .section h3 { position: relative; display: inline-block; }
.section h1::after, .section h2::after, .section h3::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.section:hover h1::after, .section:hover h2::after, .section:hover h3::after { transform: scaleX(1); }

/* Disable heading underline for specific sections */
.no-heading-underline h1::after,
.no-heading-underline h2::after,
.no-heading-underline h3::after {
  content: none;
}

/* Center headings while keeping intrinsic width so underline fits words */
.section h1.center, .section h2.center, .section h3.center {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Card underline hint when hovering parent section */
.section:hover .card:hover { box-shadow: var(--shadow-md); }

/* Animated highlight dividers */
.hl {
  height: 3px; width: 120px; margin: 0.25rem auto 1rem;
  background: var(--accent-grad);
  border-radius: 999px;
  position: relative; overflow:hidden;
}
.hl::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  mix-blend-mode: overlay;
  animation: sweep 2.4s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%);} to { transform: translateX(100%);} }

/* Accessibility improvements for animations */
@media (prefers-reduced-motion: reduce) {
  .hl::after { animation: none; }
  .hero::before { animation: none; }
  .hero::after { display: none; }
}

/* Map container styling */
.map-container {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--divider);
  transition: box-shadow 0.2s ease;
}

.map-container:hover {
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
}

/* Affiliation Logos */
.affiliation-logos {
  background: #ffffff;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
}

.affiliation-logos-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.affiliation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.affiliation-link:hover {
  transform: scale(1.05);
}

.affiliation-logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  min-width: 240px;
}

.affiliation-logo {
  height: 80px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.affiliation-link:hover .affiliation-logo {
  animation: micro-lift 0.4s ease;
}

.affiliation-fallback {
  display: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  color: var(--text);
}

.affiliation-logo[data-failed="true"] {
  display: none;
}

.affiliation-logo[data-failed="true"] + .affiliation-fallback {
  display: block;
}

@keyframes micro-lift {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--surface);
  border-radius: 0.6rem;
  box-shadow: var(--shadow-md);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--divider);
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: var(--divider);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-form .label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  color: var(--text);
}

.modal-form .input,
.modal-form .select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--divider);
  border-radius: 0.4rem;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-form .input:focus,
.modal-form .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 32, 32, 0.1);
}

.modal-form .error {
  color: var(--accent);
  font-size: 0.8125rem;
  margin-top: -0.5rem;
}

.modal-form .success {
  color: #059669;
  font-size: 0.8125rem;
  margin-top: -0.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .affiliation-logos-container {
    gap: 2rem;
  }
  
  .affiliation-logo-wrapper {
    min-width: 200px;
  }
  
  .affiliation-logo {
    max-width: 200px;
    height: 60px;
  }

  .modal-container {
    max-width: 100%;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }
}

/* Notification System */
.notification-container {
  position: fixed;
  top: calc(var(--header-h) + 1rem);
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  transform-origin: right center;
  position: relative;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification.fade-out {
  animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.notification-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.notification-message {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

.notification-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  margin: -0.25rem -0.25rem -0.25rem 0.5rem;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  line-height: 1;
  font-size: 1.25rem;
}

.notification-close:hover {
  opacity: 1;
}

/* Success notification */
.notification.success {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}

.notification.success .notification-icon {
  color: #10b981;
}

.notification.success .notification-title {
  color: #065f46;
}

/* Error notification */
.notification.error {
  border-left: 4px solid var(--accent);
  background: #fef2f2;
}

.notification.error .notification-icon {
  color: var(--accent);
}

.notification.error .notification-title {
  color: #991b1b;
}

/* Info notification */
.notification.info {
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
}

.notification.info .notification-icon {
  color: #3b82f6;
}

.notification.info .notification-title {
  color: #1e40af;
}

@media (max-width: 760px) {
  .notification-container {
    top: calc(var(--header-h) + 0.5rem);
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
  }
  
  .notification {
    padding: 0.875rem 1rem;
  }
}

/* First Session Banner with Sliding Animation */
.first-session-banner {
  background: var(--accent);
  color: #ffffff;
  padding: 1rem 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.banner-content {
  display: flex;
  white-space: nowrap;
  width: fit-content;
  animation: slide 30s linear infinite;
}

.banner-text {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 3rem;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-25%);
  }
}

/* Pause animation on hover for better readability */
.first-session-banner:hover .banner-content {
  animation-play-state: paused;
}

@media (max-width: 760px) {
  .banner-text {
    font-size: 0.875rem;
    padding: 0 2rem;
  }
  
  .first-session-banner {
    padding: 0.75rem 0;
  }
  
  .banner-content {
    animation-duration: 25s;
  }
}

/* Schedule Tabs */
.schedule-tabs {
  margin: 2rem 0;
}

.tab-list {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--divider);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-button {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: var(--text);
  background: rgba(224, 32, 32, 0.05);
}

.tab-button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}

.tab-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.session-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.session-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.session-time {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.5rem;
}

.session-focus {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.session-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divider);
}

.session-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.session-detail-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.session-detail-value {
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 600;
}

.session-location {
  color: var(--muted);
  font-size: 0.875rem;
}

.session-action {
  margin-left: auto;
}

@media (max-width: 760px) {
  .tab-list {
    gap: 0.25rem;
  }
  
  .tab-button {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
  }
  
  .session-card {
    padding: 0.875rem 1rem;
  }
  
  .session-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .session-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .session-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .session-action {
    margin-left: 0;
    width: 100%;
  }
  
  .session-action .btn {
    width: 100%;
  }
}

/* Membership Modal Styles */
.membership-modal-container {
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
}

.membership-summary {
  background: var(--divider);
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.form-section {
  border: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column: 1 / -1;
}

.field-error {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  min-height: 1.2rem;
}

.age-preview {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--divider);
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 32, 32, 0.1);
}

@media (max-width: 760px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .membership-modal-container {
    max-width: 95vw;
    margin: 1rem;
  }
}
