/* ============================================
   Global Layout — Header, Footer, Mobile CTA
   ============================================ */

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Section spacing */
.section {
  padding: var(--space-2xl) 0;
}

/* Collapse doubled padding between adjacent same-background sections */
.section:not(.section--alt) + .section:not(.section--alt) {
  padding-top: 0;
}

.section.section--alt + .section.section--alt {
  padding-top: 0;
}

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

.section--dark {
  background: var(--gradient-cta);
  color: var(--text-light);
}

.section--dark h2,
.section--dark h3,
.section--dark p {
  color: var(--text-light);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height-mobile);
  background: var(--white);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: 40px;
  width: auto;
}

/* Desktop nav */
.header-nav {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.header-nav a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--deeper-water);
}

/* Header buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-actions .btn--secondary {
  display: none;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height-mobile);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 999;
  padding: var(--space-xl) var(--container-padding);
  overflow-y: auto;
}

.mobile-nav.open {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  display: block;
  padding: var(--space-md) 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.mobile-nav a:hover {
  color: var(--deeper-water);
}

.mobile-nav .mobile-nav-buttons {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-nav .mobile-nav-buttons .btn {
  text-align: center;
  justify-content: center;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: var(--space-3xl) 0 var(--space-xl);
}

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

.footer-brand .footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: var(--space-md);
  /* Invert to white for dark background */
  filter: brightness(0) invert(1);
}

.footer-brand p,
.footer-brand a {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.footer-brand a:hover {
  color: var(--white);
}

.footer-section h4 {
  color: var(--white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--shallow-gulf);
}

.footer-hours p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--font-size-sm);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.footer-social a:hover {
  background: var(--deeper-water);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 138, 145, 0.35);
}

.footer-social a svg {
  width: 20px;
  height: 20px;
}

.footer-social a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* ============================================
   FLOATING MOBILE CTA
   ============================================ */
.mobile-cta {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--white);
  box-shadow: 0 -2px 12px rgba(14, 74, 78, 0.1);
  padding: var(--space-sm) var(--container-padding);
  gap: var(--space-sm);
}

.mobile-cta .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  padding: var(--space-sm) var(--space-md);
  min-height: 44px;
}

/* Add bottom padding to body for mobile CTA */
body {
  padding-top: var(--header-height-mobile);
  padding-bottom: 60px;
}

/* ============================================
   PAGE HEADER (below sticky header)
   ============================================ */
.page-header {
  background: var(--gradient-hero);
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-md);
}

.page-header p {
  color: var(--white);
  font-size: var(--font-size-md);
  max-width: 600px;
  margin: 0 auto;
}

/* Typography helpers */
.text-center { text-align: center; }
.text-left { text-align: left; }

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-sm); }

p + p { margin-top: var(--space-md); }

.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-sm);
}

.section-title p {
  color: var(--text-secondary);
  font-size: var(--font-size-md);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */
:focus-visible {
  outline: 2px solid var(--deeper-water);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--deeper-water);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(26, 138, 145, 0.2);
}

.btn--white:focus-visible,
.btn--outline-white:focus-visible {
  outline-color: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.accordion-trigger:focus-visible {
  outline: 2px solid var(--deeper-water);
  outline-offset: -2px;
}

/* ============================================
   ENROLL PAGE OVERRIDES
   ============================================ */
body.enroll-page {
  padding-top: var(--header-height-mobile);
  padding-bottom: 0;
}
