/* ==========================================================================
   B&M Blueprint L.L.C. - SAT & Academic Tutoring Website Style System
   Primary Color: Blueprint Blue rgb(0, 123, 255) / #007bff
   Secondary Accent: Light Yellow-Gold #ffd700
   Default: Light Mode with Theme Toggle Switch for Dark Mode
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Color Palette
   -------------------------------------------------------------------------- */
:root {
  /* Brand Tokens */
  --color-blueprint: rgb(0, 123, 255);
  --color-blueprint-hover: #0056b3;
  --color-blueprint-light: rgba(0, 123, 255, 0.08);
  --color-gold: #ffd700;
  --color-gold-dark: #d4a000;
  --color-gold-light: rgba(255, 215, 0, 0.2);

  /* Light Theme Defaults */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-surface-translucent: rgba(255, 255, 255, 0.65);
  --bg-overlay: rgba(15, 23, 42, 0.5);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-blue: #ffffff;

  --border-color: #e2e8f0;
  --border-color-active: #007bff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Fonts */
  --font-primary: 'EB Garamond', 'Crimson Text', 'Libre Baskerville', 'Merriweather', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --color-blueprint: #38bdf8;
  --color-blueprint-hover: #0284c7;
  --color-blueprint-light: rgba(56, 189, 248, 0.15);

  --bg-page: #0b132b;
  --bg-surface: #1c2541;
  --bg-surface-alt: #131b33;
  --bg-surface-translucent: rgba(28, 37, 65, 0.65);
  --bg-overlay: rgba(0, 0, 0, 0.7);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-on-blue: #ffffff;

  --border-color: #334155;
  --border-color-active: #38bdf8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   2. Base Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 2px solid transparent;
}

.btn-blueprint {
  background-color: var(--color-blueprint);
  color: #ffffff;
}

.btn-blueprint:hover {
  background-color: var(--color-blueprint-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background-color: var(--color-gold);
  color: #0f172a;
}

.btn-gold:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-blueprint);
  color: var(--color-blueprint);
}

.btn-outline:hover {
  background-color: var(--color-blueprint-light);
}

/* --------------------------------------------------------------------------
   3. Header Navigation & Theme Switcher
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 90;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.logo-image-wrapper {
  width: 86.1px;
  height: 48px;
  border-radius: 6px; /* Slightly more rounded */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  
  border: 2px solid rgba(15, 23, 42, 0.15); /* Light mode subtle border */
  box-shadow: var(--shadow-sm);
  
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.3s ease, 
              border-color 0.3s ease;
}

[data-theme="dark"] .logo-image-wrapper {
  border-color: rgba(255, 255, 255, 0.15); /* Dark mode border */
}

.logo-image-wrapper:hover {
  transform: translateY(-3px) scale(1.05) rotate(-3deg);
  box-shadow: 0 8px 16px rgba(0, 123, 255, 0.3); /* Blueprint blue glow */
  border-color: var(--color-blueprint); /* Highlight border on hover */
}

.logo-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cropped perfectly to the bounds of the rounded wrapper */
}

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

/* Theme Switcher Toggle */
.theme-toggle-btn-header {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-normal);
}

.theme-toggle-btn-header:hover {
  border-color: var(--color-blueprint);
  color: var(--color-blueprint);
  transform: translateY(-1px);
}

.theme-toggle-btn-drawer {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
}

.theme-toggle-btn-drawer:hover {
  border-color: var(--color-blueprint);
  color: var(--color-blueprint);
}

/* Vector SVG Symbol Styling with High-Contrast Color Adaptation */
.theme-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-symbol-icon {
  width: 18px;
  height: 18px;
  stroke: var(--color-blueprint);
  transition: transform 0.3s ease, stroke 0.3s ease;
}

[data-theme="dark"] .theme-symbol-icon {
  stroke: var(--color-gold);
}

@media (max-width: 480px) {
  .theme-toggle-btn-header #header-theme-text {
    display: none;
  }
  .theme-toggle-btn-header {
    padding: 0.55rem 0.65rem;
  }
}

/* Menu Trigger Button */
.menu-trigger-btn {
  background-color: var(--color-blueprint);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-normal);
}

.menu-trigger-btn:hover {
  background-color: var(--color-blueprint-hover);
}

/* --------------------------------------------------------------------------
   4. Right Slide-Out Navigation Drawer
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-overlay);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.slide-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background-color: var(--bg-surface);
  z-index: 101;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  overflow-y: auto;
}

.slide-drawer.active {
  transform: translateX(0);
}

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

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

.drawer-close-btn:hover {
  transform: rotate(45deg) scale(1.2);
  color: var(--color-gold);
}

.drawer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.drawer-nav-link {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: var(--transition-fast);
}

.drawer-nav-link:hover, .drawer-nav-link.active {
  color: var(--color-blueprint);
  padding-left: 0.5rem;
}

.drawer-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   5. Hero Section & Parallax Logo Window Effect
   -------------------------------------------------------------------------- */
.hero-wrapper {
  padding-top: 88px;
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-page);
  border-top: 4px solid var(--color-blueprint);
  transition: padding 0.45s cubic-bezier(0.16, 1, 0.3, 1), min-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sub-Page Compact Hero Wrapper */
.hero-wrapper.is-subpage {
  min-height: 360px;
  padding-top: 80px;
  border-top-width: 3px;
}

.hero-wrapper.is-subpage .hero-tagline-bordered-box {
  padding: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  border-width: 1px;
  background-color: var(--bg-surface-alt);
}

.hero-wrapper.is-subpage .hero-tagline-top {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-wrapper.is-subpage .hero-tagline-top span {
  color: var(--color-blueprint);
  font-weight: 800;
}

.hero-tagline-bordered-box {
  border: 3px solid var(--color-blueprint);
  padding: 1.25rem 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  border-radius: var(--radius-sm);
  transition: padding 0.45s cubic-bezier(0.16, 1, 0.3, 1), margin 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-overview-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.price-large {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-blueprint);
}

.mission-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--color-blueprint);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .mission-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .mission-card {
    padding: 1.5rem;
  }
}

.sat-score-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background-color: var(--color-blueprint-light);
  color: var(--color-blueprint);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-blueprint);
  margin-bottom: 0.75rem;
}

.tutor-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: 400px;
  background-color: var(--bg-surface-alt);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-blueprint);
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .tutor-photo-placeholder {
  border-color: rgba(255, 255, 255, 0.25);
}

.tutor-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-tagline-top {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0;
  transition: font-size 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-tagline-top span {
  color: var(--color-blueprint);
  font-style: italic;
}

/* Full-Width Viewport Window Stretching from Left to Right & Bottom of Screen */
.hero-window-frame-full {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  flex: 1;
  height: calc(100vh - 220px);
  min-height: calc(100vh - 220px);
  border-top: 4px solid var(--color-blueprint);
  border-bottom: 4px solid var(--color-blueprint);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: min-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-window-frame-full.is-subpage {
  min-height: 220px;
  height: 220px;
}

@media (max-width: 768px) {
  .hero-window-frame-full {
    height: 450px;
    min-height: 450px;
    /* Removed CSS height transition for mobile to prevent address bar jitter */
    transition: none;
  }
  .hero-window-frame-full.is-subpage {
    min-height: 200px;
    height: 200px;
  }
}

/* Fixed Background Image Viewport (Logo Image Standstill Illusion) */
.hero-window-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/logo_light.png?v=1');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Keeps logo image stationary as content scrolls past */
}

/* Mobile Fallback: 
   Parallax on mobile browsers is notoriously jittery and prone to zooming bugs 
   when the address bar collapses. We use a static scroll layout for stability. */
@media (max-width: 768px) {
  .hero-window-bg {
    background-attachment: scroll !important;
    height: 100%;
    top: 0;
    background-size: cover;
    background-position: center 80%; /* Keeps the blueprint nicely framed near the bottom without severe cropping */
    transform: none !important;
  }
}

/* Dark Mode Hero Background Override */
[data-theme="dark"] .hero-window-bg {
  background-image: url('../assets/logo_dark.png?v=1');
}

.hero-window-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* Centered Banner inside the Window */
.hero-centered-banner {
  position: relative;
  z-index: 2;
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 2rem 2.5rem;
  text-align: center;
  max-width: 680px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  border: 2px solid color-mix(in srgb, var(--color-gold) 40%, transparent);
  transition: padding 0.45s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-centered-banner.is-subpage {
  padding: 1.25rem 2rem;
  max-width: 760px;
  border-color: color-mix(in srgb, var(--color-blueprint) 40%, transparent);
  box-shadow: var(--shadow-md);
}

.banner-tagline {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1.25;
  transition: font-size 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-centered-banner.is-subpage .banner-tagline {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.hero-banner-actions {
  margin-top: 1rem;
}

.hero-banner-actions.hidden {
  display: none !important;
}

@keyframes heroBannerFadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-centered-banner.hero-banner-animating {
  animation: heroBannerFadeInScale 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --------------------------------------------------------------------------
   6. General Section Styling & Multi-Page View Container
   -------------------------------------------------------------------------- */
.page-view {
  display: block;
}

.page-view.hidden {
  display: none;
}

@keyframes pageReloadIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.page-view.page-reload-in {
  animation: pageReloadIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-block {
  padding: 80px 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--color-blueprint);
}

/* --------------------------------------------------------------------------
   7. Highlights & Bright Futures 1330 Goal Section
   -------------------------------------------------------------------------- */
.bright-futures-card {
  background-color: var(--bg-surface);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 4rem;
}

.score-badge-large {
  font-size: 4rem;
  font-weight: 800;
  color: var(--color-blueprint);
  line-height: 1;
  font-family: var(--font-primary);
}

.score-badge-large span {
  color: var(--color-gold-dark);
}

.program-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   8. Program Structure (4-Week 18-Hour Breakdown)
   -------------------------------------------------------------------------- */
.program-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.timeline-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.timeline-card:hover {
  border-color: var(--color-blueprint);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.timeline-week-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-blueprint-light);
  color: var(--color-blueprint);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

/* Program Subpage Interactive Cards */
.program-overview-card {
  background-color: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.program-overview-card:hover {
  border-color: var(--color-blueprint);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.session-structure-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.session-structure-pill {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Hour 1 Card Hover */
.session-structure-card.hour-1:hover {
  border-color: var(--color-blueprint);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.session-structure-card.hour-1:hover .session-structure-pill {
  background: var(--color-blueprint-light);
  border-color: var(--color-blueprint);
  color: var(--color-blueprint);
}

/* Hour 2 Card Hover */
.session-structure-card.hour-2:hover {
  border-color: var(--color-gold-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.session-structure-card.hour-2:hover .session-structure-pill {
  background: rgba(251, 192, 45, 0.18);
  border-color: var(--color-gold-dark);
  color: var(--color-gold-dark);
}

/* --------------------------------------------------------------------------
   9. Co-Founders & Lead Tutors Section
   -------------------------------------------------------------------------- */
.tutor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.tutor-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tutor-card-expanded {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 1. Header Row: Top Left Name & Title, Top Right School Logo Icon */
.tutor-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.tutor-card-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tutor-school-logo-top-right {
  width: 140px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-blueprint);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.tutor-school-logo-top-right .tutor-school-logo-img {
  max-height: 48px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* 2. Middle Row: Photo on Left, SAT Score & Bio Info on Right */
.tutor-card-middle-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: stretch;
}

@media (min-width: 1150px) {
  .tutor-card-middle-row {
    grid-template-columns: 300px 1fr;
  }
}

.tutor-card-photo-wrapper {
  width: 100%;
  max-width: 300px;
}

.tutor-card-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.tutor-bio-paragraph {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  padding: 0;
  min-height: 140px;
}

/* Single-Line High School SAT Info (Minimal, Non-Glowing Typography) */
.tutor-sat-single-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
  text-align: center;
}

.tutor-sat-score-highlight {
  color: var(--color-blueprint);
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1rem;
}

/* 3. Bottom Row: Focus & University Info Block (Bottom Center) */
.tutor-card-bottom-row {
  width: 100%;
  padding-top: 0.5rem;
}

.tutor-focus-univ-block {
  background: var(--bg-surface-alt);
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  width: 100%;
}

.tutor-school-logo-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-blueprint);
  box-shadow: var(--shadow-md);
}

.tutor-school-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-blueprint);
  margin-top: 1rem;
  box-shadow: var(--shadow-md);
  width: fit-content;
}

.tutor-school-logo {
  max-height: 44px;
  max-width: 130px;
  object-fit: contain;
  display: block;
}

.tutor-avatar-photo-wrapper {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  overflow: hidden;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background-color: var(--bg-surface-alt);
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.tutor-avatar-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

#tutor-preview-kasey-mick .tutor-avatar-photo-img {
  transform: scale(1.38);
  transform-origin: 50% 18%;
}

.tutor-preview-logo-box {
  width: 140px;
  height: 48px;
  background-color: #ffffff;
  border: 1.5px solid var(--color-blueprint);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto 0 auto;
  padding: 4px 12px;
  box-shadow: var(--shadow-sm);
}

.tutor-preview-logo-img {
  max-width: 115px;
  max-height: 34px;
  object-fit: contain;
  display: block;
}

.tutor-avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: var(--color-blueprint-light);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-blueprint);
  margin: 0 auto 1.25rem auto;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.interactive-card:hover .tutor-avatar-photo-wrapper,
.interactive-card:hover .tutor-avatar-placeholder {
  border-color: var(--color-blueprint);
  box-shadow: 0 8px 16px var(--color-blueprint-light);
}

.tutor-name {
  font-size: 1.4rem;
  font-weight: 800;
}

.tutor-credentials {
  font-weight: 600;
  color: var(--color-blueprint);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   10. Testimonials Grid
   -------------------------------------------------------------------------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.testimonial-text {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.testimonial-author {
  font-weight: 700;
  color: var(--color-blueprint);
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   11. Contact & Inquiry Section
   -------------------------------------------------------------------------- */
.contact-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background-color: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.contact-info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 4px;
  background-color: var(--color-blueprint);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom;
}

.contact-info-item:hover {
  background-color: var(--bg-surface-alt);
  border-color: var(--border-color);
  transform: translateX(8px);
  box-shadow: var(--shadow-sm);
}

.contact-info-item:hover::before {
  transform: scaleY(1);
}

.contact-info-item .contact-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.contact-info-item:hover .contact-title {
  color: var(--color-blueprint);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--bg-surface-alt);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .mission-card, .bright-futures-card, .contact-box {
    grid-template-columns: 1fr;
  }

  .bf-text-column, .mission-text-column {
    text-align: center;
  }

  .hero-tagline-top {
    font-size: 1.75rem;
  }

  .hero-window-frame {
    height: 380px;
  }

  .banner-tagline {
    font-size: 1.4rem;
  }
}

@media (max-width: 1150px) {
  .tutor-card-photo-wrapper {
    margin: 0 auto;
  }
}

@media (max-width: 1100px) {
  .tutor-grid {
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
  }
  .tutor-grid > * {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .program-breakdown-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .program-header-flex {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .program-header-left, .program-header-right {
    text-align: center !important;
  }
  .tutor-card-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .tutor-card-header-left {
    align-items: center;
  }
  .tutor-card-info-right {
    align-items: center;
    text-align: center;
  }
  .tutor-sat-single-line {
    justify-content: center;
  }
  .tutor-focus-univ-block {
    text-align: center;
  }
  .pricing-price-text {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .header-logo-text {
    display: none;
  }

  .mission-card, .bright-futures-card, .contact-box, .program-overview-card {
    padding: 1.5rem;
  }

  .hero-centered-banner {
    padding: 1.5rem;
  }

  .hero-centered-banner.is-subpage {
    padding: 1.25rem;
  }

  .hero-tagline-top {
    font-size: 1.5rem;
  }

  .banner-tagline {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .price-large {
    font-size: 2rem;
  }
  
  .hero-banner-actions .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   14. Creative Scroll Reveal Animations
   -------------------------------------------------------------------------- */
.reveal-init {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-fade-up {
  transform: translateY(35px);
}

.reveal-slide-left {
  transform: translateX(-45px);
}

.reveal-slide-right {
  transform: translateX(45px);
}

.reveal-scale {
  transform: scale(0.92);
}

.reveal-init.is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Staggered Cards Reveal within Grid Containers */
.reveal-stagger-parent .reveal-card {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
  transition: opacity 1.0s cubic-bezier(0.22, 1, 0.36, 1), transform 1.0s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-stagger-parent.is-revealed .reveal-card {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger-parent.is-revealed .reveal-card:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger-parent.is-revealed .reveal-card:nth-child(2) { transition-delay: 0.25s; }
.reveal-stagger-parent.is-revealed .reveal-card:nth-child(3) { transition-delay: 0.4s; }
.reveal-stagger-parent.is-revealed .reveal-card:nth-child(4) { transition-delay: 0.55s; }
.reveal-stagger-parent.is-revealed .reveal-card:nth-child(5) { transition-delay: 0.7s; }
.reveal-stagger-parent.is-revealed .reveal-card:nth-child(6) { transition-delay: 0.85s; }

/* --------------------------------------------------------------------------
   15. Bright Futures Interactive Cards
   -------------------------------------------------------------------------- */
.bf-tier-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bf-tier-card.fas:hover {
  border-color: var(--color-blueprint);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.bf-tier-card.fms:hover {
  border-color: var(--color-gold-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.bf-interactive-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.bf-interactive-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-blueprint);
  box-shadow: var(--shadow-md);
}

/* Track Record & Cohort Grid */
.cohort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.cohort-card {
  background: var(--bg-surface);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.cohort-card.active {
  border: 2px solid var(--color-gold);
}

.cohort-card.upcoming {
  border: 1.5px dashed var(--border-color);
  background-color: var(--bg-surface-alt);
}

.cohort-card.upcoming:hover {
  border-color: var(--color-blueprint);
  border-style: dashed;
}

.cohort-card.registration-open {
  border: 2px solid var(--color-blueprint);
  background-color: rgba(0, 123, 255, 0.05); /* Very light blue tint */
}

[data-theme="dark"] .cohort-card.registration-open {
  background-color: rgba(0, 123, 255, 0.15); /* Slightly darker blue tint for contrast in dark mode */
}

/* Contact Form Styles */
.contact-input {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-ui);
  box-sizing: border-box;
  height: 48px;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.contact-input::placeholder {
  color: var(--text-muted);
  opacity: 1; /* Override Firefox default opacity */
}

select.contact-input:invalid {
  color: var(--text-muted);
}
select.contact-input option {
  color: var(--text-primary);
}

#testimonial-rating:not(:invalid),
#parent-testimonial-rating:not(:invalid) {
  color: var(--color-blueprint);
}
#testimonial-rating option,
#parent-testimonial-rating option {
  color: var(--color-blueprint);
}

.contact-input:focus {
  outline: none;
  border-color: var(--color-blueprint);
  box-shadow: 0 0 0 3px var(--color-blueprint-light);
}

.progressive-field {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-bottom 0.4s ease-out;
}

.progressive-field.is-active {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 1rem;
  overflow: visible;
}

/* Specific fix for textareas to allow growth if they expand */
textarea.contact-input {
  resize: vertical;
  height: auto;
  min-height: 120px;
}

/* Button States */
.btn-blueprint:disabled, .btn-gold:disabled {
  background-color: var(--bg-surface-alt);
  color: var(--text-muted);
  border-color: var(--border-color);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-blueprint:disabled:hover, .btn-gold:disabled:hover {
  background-color: var(--bg-surface-alt);
  transform: none;
  box-shadow: none;
}

@keyframes bounceIn {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.btn-blueprint.is-ready, .btn-gold.is-ready {
  animation: bounceIn 0.4s ease-out;
}

/* --------------------------------------------------------------------------
   14. Interactive Hover Utilities
   -------------------------------------------------------------------------- */

.interactive-card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.interactive-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-blueprint);
}

.interactive-portrait {
  transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
}

.interactive-portrait:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
  box-shadow: var(--shadow-lg);
}

.interactive-hero-box {
  transition: all 0.5s ease;
}

.interactive-hero-box:hover {
  transform: scale(1.015);
  box-shadow: 0 0 25px rgba(0, 123, 255, 0.3);
  border-color: var(--color-blueprint-light);
}

.interactive-accent-side {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.interactive-accent-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 4px;
  background-color: var(--color-blueprint);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom;
}

.interactive-accent-side:hover {
  background-color: var(--bg-surface-alt);
  border-color: var(--border-color);
  transform: translateX(8px);
  box-shadow: var(--shadow-sm);
}

.interactive-accent-side:hover::before {
  transform: scaleY(1);
}

/* ==========================================================================
   Custom Alert Modal
   ========================================================================== */
.custom-alert-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-overlay);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-alert-backdrop.is-visible {
  display: flex;
  opacity: 1;
}

.custom-alert-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-color);
}

.custom-alert-backdrop.is-visible .custom-alert-card {
  transform: translateY(0);
}

.custom-alert-title {
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.custom-alert-message {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Custom Checkbox Implementation */
.hidden-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.custom-checkbox-ui {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm, 4px);
  position: relative;
  transition: all var(--transition-normal, 0.2s) ease;
  margin-top: 0; /* Optical alignment with text */
}

/* Interactive hover glow */
label:hover .custom-checkbox-ui,
.hidden-checkbox:focus-visible + .custom-checkbox-ui {
  border-color: var(--color-blueprint);
  box-shadow: 0 0 0 3px var(--color-blueprint-light);
}

/* Add the Blueprint-Blue Checkmark when the invisible input is checked */
.hidden-checkbox:checked + .custom-checkbox-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 4px;
  height: 9px;
  border: solid var(--color-blueprint);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
