/*
Theme Name: Chicago QB Coach
Theme URI: https://example.com
Author: Coach
Description: Single-page WordPress theme for a holistic quarterback coaching business. Sticky nav with anchor-link dropdowns, hero with a Chicago skyline photo, mission pillars, and booking/pricing sections, plus standalone About, Contact, and Mission pillar pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: chicago-qb-coach
*/

/* =========================================================
   1. CUSTOM PROPERTIES
   ========================================================= */
:root {
  /* Colors */
  --color-primary: #A51C30;       /* Harvard crimson - CTAs, dividers, highlights */
  --color-primary-dark: #7E1524;  /* hover/active state for primary */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F5F3;        /* off-white for alternating sections */
  --color-text: #1A1A1A;
  --color-text-muted: #5A5A5A;
  --color-border: #E7E3DF;
  --color-dark: #16130F;          /* footer band base */
  --color-white: #FFFFFF;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container-width: 1200px;
  --nav-width: 1560px;
  --nav-height: 92px;
  --nav-top-offset: 28px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Keep anchored sections/sub-anchors from being hidden under the fixed nav */
[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--nav-top-offset));
}

body,
h1, h2, h3, h4, p, ul, figure {
  margin: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--nav-height) + var(--nav-top-offset));
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
  padding: 0;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* =========================================================
   3. TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* =========================================================
   4. LAYOUT HELPERS
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section-intro {
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

.section-intro h1,
.section-intro h2 {
  margin-bottom: var(--space-sm);
}

.section-intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

section {
  padding-block: var(--space-2xl);
}

.bg-alt {
  background-color: var(--color-bg-alt);
}

/* =========================================================
   5. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

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

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

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* =========================================================
   6. SITE NAV (sticky/fixed)
   ========================================================= */
.site-header {
  position: fixed;
  top: var(--nav-top-offset);
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-bg);
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled,
.site-header:has(.site-nav.is-scrolled) {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
}

.nav-container {
  max-width: var(--nav-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 3vw, 1.5rem);
  height: var(--nav-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 1.5rem;
}

/* Brand+tagline: fixed size, never truncated. Tagline is shown/hidden by
   JS based on measured available space (see main.js), never clipped. */
.nav-brand {
  grid-column: 1;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-brand a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
  white-space: nowrap;
}

.nav-tagline {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* On desktop this wrapper is transparent to the grid (its two children —
   the tabs and the button pair — become grid items in their own right, so
   the tabs can be centered in the middle column independent of the
   buttons). On mobile it becomes the real collapsing dropdown box. */
.nav-collapsible {
  display: contents;
}

.nav-menu {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-menu > li {
  position: relative;
  flex: 0 0 auto;
}

.nav-menu > li > a {
  display: inline-block;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.nav-menu > li > a:hover {
  color: var(--color-primary);
}

/* Book Now + Contact Me sit together as a pair in the reserved right corner */
.nav-cta-group {
  grid-column: 3;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.6rem;
}

.nav-contact-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  animation: cqc-nav-shake 2s ease-in-out infinite;
}

@keyframes cqc-nav-shake {
  0%, 40%, 100% {
    transform: translateX(0) rotate(0);
  }
  4% {
    transform: translateX(-4px) rotate(-4deg);
  }
  8% {
    transform: translateX(4px) rotate(4deg);
  }
  12% {
    transform: translateX(-5px) rotate(-5deg);
  }
  16% {
    transform: translateX(5px) rotate(5deg);
  }
  20% {
    transform: translateX(-4px) rotate(-3deg);
  }
  24% {
    transform: translateX(4px) rotate(3deg);
  }
  28% {
    transform: translateX(-3px) rotate(-2deg);
  }
  32% {
    transform: translateX(3px) rotate(2deg);
  }
  36% {
    transform: translateX(-1px) rotate(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-contact-btn {
    animation: none;
  }
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =========================================================
   7. HERO (#home)
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-sm) 0;
  background-color: var(--color-bg);
}

.hero-skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 300px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-skyline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 25%);
  z-index: 1;
}

.hero-skyline-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  filter: grayscale(1) contrast(1.15);
  opacity: 0.35;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-content .eyebrow {
  margin-bottom: var(--space-md);
}

.hero-headline {
  margin-bottom: var(--space-md);
}

.hero-subheadline {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: var(--space-lg);
}

.hero-photo {
  display: flex;
  flex-direction: column;
}

.hero-photo-frame {
  position: relative;
}

.hero-photo-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

/* Name plate: sits directly above the photo, seamlessly attached — never
   overlaps or covers any part of the image. */
.hero-photo-nameplate {
  background-color: var(--color-white);
  border: 3px solid var(--color-primary);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.5rem;
  text-align: center;
}

.hero-photo-name {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.hero-photo-name-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0.15rem;
}

.hero-photo-name-years {
  font-weight: 500;
  color: var(--color-primary);
}

/* =========================================================
   8. MISSION (#mission)
   ========================================================= */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.mission-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.mission-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 3px solid var(--color-primary);
}

/* Logo collage graphic: show the whole thing on its white background
   instead of cropping into it */
.mission-card-img-contain {
  object-fit: contain;
  background-color: var(--color-white);
  padding: var(--space-md);
}

.mission-card-body {
  padding: var(--space-md);
}

.mission-card h3 {
  margin-bottom: var(--space-xs);
}

.mission-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.mission-card-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.mission-card-link:hover {
  color: var(--color-primary-dark);
}

/* =========================================================
   9. ABOUT ME PAGE (page-about.php, standalone page)
   ========================================================= */
.about-page {
  padding-block: var(--space-md) var(--space-2xl);
}

.about-page-intro {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

/* Slideshow of action photos, sits at the top of the page */
.about-slideshow {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto var(--space-2xl);
}

.about-slideshow-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.about-slideshow-track {
  display: flex;
  transition: transform 0.4s ease;
}

.about-slideshow-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Portrait photos: this frame is landscape and these photos are tall, so a
   crop can show the face or the rest of the shot but not both. Show the
   whole photo instead, scaled to fit, with the empty sides filled in. */
.about-slideshow-slide--portrait {
  object-fit: contain;
  background-color: var(--color-bg-alt);
}

.about-slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-white);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.about-slideshow-prev {
  left: -18px;
}

.about-slideshow-next {
  right: -18px;
}

.about-slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

.about-slideshow-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background-color: var(--color-border);
  cursor: pointer;
}

.about-slideshow-dot.is-active {
  background-color: var(--color-primary);
}

.about-page-body {
  max-width: 1040px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-2xl);
  align-items: start;
}

.about-page-text-col p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  font-size: 1.05rem;
}

.about-page-emphasis {
  font-weight: 600;
  color: var(--color-text);
}

/* Rhetorical questions pulled out of the bio paragraph as their own list */
.about-page-questions {
  border-left: 3px solid var(--color-primary);
  margin: 0 0 var(--space-lg);
  padding-left: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.about-page-questions li {
  color: var(--color-text);
  font-weight: 500;
  font-size: 1.02rem;
  font-style: italic;
  text-wrap: pretty;
}

.about-page-grad-col {
  position: static;
}

.about-page-grad-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block;
}

.about-page-grad-caption {
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.about-page-cta {
  text-align: center;
  margin-top: var(--space-2xl);
}

.credentials-list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.credentials-list li {
  position: relative;
  padding-left: 1.5rem;
  font-weight: 500;
}

.credentials-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
}

/* =========================================================
   11. WHERE I TRAIN (#booking)
   ========================================================= */
/* Intro text and map side by side, like the pillar pages, instead of a
   narrow block stacked above a small centered photo */
.training-locations-hero {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: var(--space-2xl);
  align-items: center;
  margin: var(--space-2xl) 0;
}

.training-locations-intro {
  max-width: none;
  margin: 0;
}

.training-locations-intro h3 {
  margin-bottom: var(--space-sm);
}

.training-locations-intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.training-map-figure {
  max-width: none;
  margin: 0;
}

.training-map-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block;
}

.training-map-caption {
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

/* Three balanced regions instead of five uneven ones, each its own card */
.training-locations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.training-location-group {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.training-location-group h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-border);
}

.training-location-group ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.training-location-group li {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .training-locations-hero,
  .training-locations {
    grid-template-columns: 1fr;
  }
}

.booking-widget-container {
  margin-top: var(--space-2xl);
}

.consultation-intro {
  max-width: 560px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.consultation-intro h3 {
  margin-bottom: var(--space-sm);
}

.consultation-intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

.consultation-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.consultation-tags li {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.calendly-inline-widget {
  width: 100%;
  min-width: 320px;
  height: 700px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* =========================================================
   11b. CONTACT PAGE (page-contact.php)
   ========================================================= */
.contact-page {
  padding-block: var(--space-lg) var(--space-2xl);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info h1 {
  margin-bottom: var(--space-md);
}

.contact-info-intro {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
}

.contact-info-intro a,
.contact-format p a,
.contact-form-notice a {
  color: var(--color-primary);
  font-weight: 600;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.contact-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
}

.contact-detail-icon svg,
.contact-format-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-detail-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

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

.contact-detail-value:hover {
  color: var(--color-primary);
}

/* Zoom vs. on-field: kept short so someone outside Chicago sees right away
   that Zoom works for them */
.contact-formats-title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.contact-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.contact-format {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.contact-format-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: var(--space-xs);
}

.contact-format-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-bg-alt);
  color: var(--color-primary);
}

/* Zoom's brand blue, so the Zoom card reads at a glance without a
   trademarked logo asset */
.contact-format-icon--zoom {
  background-color: #2d8cff;
  color: var(--color-white);
}

.contact-format-icon svg {
  width: 18px;
  height: 18px;
}

.contact-format h3 {
  font-size: 1rem;
}

.contact-format-tag {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.contact-format p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.contact-form-card {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.contact-form-lead {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.contact-form-notice {
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.contact-form-notice--success {
  background-color: #eaf6ee;
  border: 1px solid #bfe3cb;
  color: #1f6b3a;
}

.contact-form-notice--error {
  background-color: #fbeaec;
  border: 1px solid #efc3c9;
  color: var(--color-primary-dark);
}

.contact-field {
  margin-bottom: var(--space-md);
}

.contact-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.contact-field-optional {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  font: inherit;
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
}

.contact-field textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(165, 28, 48, 0.15);
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

/* Honeypot: real visitors never see or tab into this */
.contact-form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 640px) {
  .contact-formats,
  .contact-form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: var(--space-md);
  }
}

/* =========================================================
   11c. MISSION PILLAR PAGES (page-physical.php, page-mental.php,
        page-recruiting.php, page-eq.php)
   ========================================================= */
.pillar-page {
  padding-block: var(--space-2xl);
}

/* Top: intro copy and photo side by side, like the homepage hero, so the
   page uses the full width instead of one narrow centered column */
.pillar-page-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-bottom: var(--space-2xl);
}

/* No hero photo on this page: intro takes the full width instead of
   leaving an empty second column. */
.pillar-page-hero--single {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-inline: auto;
}

.pillar-page-intro {
  max-width: none;
  margin-bottom: 0;
}

.pillar-page-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block;
}

/* Logo collage graphic: show the whole thing on its white background
   instead of cropping into it */
.pillar-page-photo-contain {
  object-fit: contain;
  background-color: var(--color-white);
  padding: var(--space-xl);
}

/* Portrait photo in a landscape frame: show the whole shot instead of
   cropping into it, same fix as the about-page slideshow. */
.pillar-page-photo--portrait {
  object-fit: contain;
  background-color: var(--color-bg-alt);
}

/* Below: body copy plus a "what we work on" sidebar, so wide screens don't
   end in one skinny paragraph column with empty space on both sides */
.pillar-page-content {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.pillar-page-body p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

/* Supporting photo dropped into the body copy: floats beside the text on
   wide screens, like a magazine inset, and stacks full-width on mobile. */
.pillar-page-inline-figure {
  float: right;
  width: 260px;
  margin: 0.25rem 0 var(--space-md) var(--space-lg);
}

.pillar-page-inline-photo {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.pillar-page-inline-caption {
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

@media (max-width: 640px) {
  .pillar-page-inline-figure {
    float: none;
    width: 100%;
    margin: 0 0 var(--space-md);
  }
}

.pillar-page-highlights {
  background-color: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.pillar-page-highlights h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.pillar-page-highlights ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pillar-page-highlights li {
  position: relative;
  padding-left: 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.pillar-page-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.pillar-page-note {
  text-align: center;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
}

@media (max-width: 860px) {
  .pillar-page-hero,
  .pillar-page-content {
    grid-template-columns: 1fr;
  }
}

.pillar-page-cta {
  text-align: center;
  margin-top: var(--space-lg);
}

/* =========================================================
   11d. MISSION PAGE (page-mission.php): statement up top, then one
        alternating photo/text section per pillar
   ========================================================= */
.mission-page {
  padding-block: var(--space-lg) var(--space-2xl);
}

.mission-page-intro {
  max-width: 760px;
  margin-bottom: var(--space-xl);
}

.mission-page-intro h1 {
  margin-bottom: var(--space-md);
}

.mission-page-intro p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.mission-page-intro .mission-page-statement {
  color: var(--color-text);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.mission-pillar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.mission-pillar:nth-of-type(even) .mission-pillar-media {
  order: 2;
}

/* Offset crimson frame sits behind each photo, mirroring the hero */
.mission-pillar-media {
  position: relative;
  isolation: isolate;
}

.mission-pillar-media::before {
  content: '';
  position: absolute;
  inset: var(--space-sm) calc(-1 * var(--space-sm)) calc(-1 * var(--space-sm)) var(--space-sm);
  border: 3px solid var(--color-primary);
  border-radius: var(--radius);
  z-index: -1;
}

.mission-pillar:nth-of-type(even) .mission-pillar-media::before {
  inset: var(--space-sm) var(--space-sm) calc(-1 * var(--space-sm)) calc(-1 * var(--space-sm));
}

.mission-pillar-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.mission-pillar-photo--wide {
  aspect-ratio: 640 / 356;
}

/* Logo collage is small, so it stays at a size where it remains sharp
   and sits centered on a white card instead of being stretched */
.mission-pillar-photo--logos {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white);
  overflow: hidden;
}

/* Portrait photo/collage in a landscape frame: show the whole thing
   instead of cropping into it. */
.mission-pillar-photo--portrait {
  object-fit: contain;
  background-color: var(--color-bg-alt);
}

.mission-pillar-logos-img {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.mission-pillar-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.mission-pillar-body h2 {
  margin-bottom: var(--space-sm);
}

.mission-pillar-body p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
}

@media (max-width: 860px) {
  .mission-pillar {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding-block: var(--space-xl);
  }

  .mission-pillar:nth-of-type(even) .mission-pillar-media {
    order: 0;
  }
}

/* =========================================================
   12. FOOTER
   ========================================================= */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  border-top: 4px solid var(--color-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-lg);
  padding-block: var(--space-2xl) var(--space-xl);
}

.footer-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer-contact h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-sm);
}

.footer-contact p {
  margin-bottom: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
}

.footer-contact a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-md);
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* =========================================================
   13. RESPONSIVE (mobile-first breakpoints)
   ========================================================= */
@media (max-width: 1024px) {
  .mission-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .training-locations {
    grid-template-columns: 1fr 1fr;
  }

  .hero-container {
    gap: var(--space-lg);
  }
}

/* Above the mobile breakpoint, tagline visibility is decided by JS
   (see main.js) based on whether it actually fits — not a fixed
   breakpoint, since that has to be re-tuned every time nav content
   changes. This class is the fallback for that check. */
.nav-tagline.is-hidden {
  display: none;
}

@media (max-width: 860px) {
  .nav-tagline {
    display: none;
  }

  .nav-container {
    display: flex;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-collapsible {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-collapsible.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-menu > li {
    padding-inline: var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-menu > li > a {
    display: block;
    padding-block: var(--space-sm);
  }

  .nav-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    margin: var(--space-sm) var(--space-md);
  }

  .nav-contact-btn {
    display: block;
    text-align: center;
    animation: none;
  }

  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    order: -1;
    max-width: 360px;
    margin-inline: auto;
  }

  .about-page-body {
    grid-template-columns: 1fr;
  }

  .about-page-grad-col {
    position: static;
    max-width: 320px;
    margin-inline: auto;
  }

  .about-slideshow-arrow {
    width: 34px;
    height: 34px;
  }

  .about-slideshow-prev {
    left: 8px;
  }

  .about-slideshow-next {
    right: 8px;
  }
}

@media (max-width: 640px) {
  :root {
    --space-2xl: 3.5rem;
    --space-xl: 2.5rem;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
