/* ============================================================
   YORKSHIRE LIFEGUARD ACADEMY — Components
   components.css
   ============================================================ */

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.site-nav.scrolled {
  background: rgba(0, 33, 71, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 30px rgba(0, 33, 71, 0.3);
}

.site-nav.nav-light {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0, 33, 71, 0.08);
}

.site-nav.nav-light .nav-logo-text { color: var(--navy); }
.site-nav.nav-light .nav-link { color: var(--navy); }
.site-nav.nav-light .nav-link:hover { color: var(--gold); }
.site-nav.nav-light .hamburger span { background: var(--navy); }

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo-mark {
  width: 44px;
  height: 44px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.nav-logo-mark svg {
  width: 26px;
  height: 26px;
  fill: var(--navy);
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.nav-logo-text span {
  display: block;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--gold);
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
  transform-origin: left;
}

.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 0.5rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

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

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--navy-dark);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-link {
  display: block;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.25rem;
}

.mobile-menu .nav-link:hover {
  background: rgba(255,255,255,0.06);
}

.mobile-menu .btn {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-sm);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 21, 48, 0.82) 0%,
    rgba(0, 33, 71, 0.65) 50%,
    rgba(0, 21, 48, 0.45) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-height);
  padding-block: var(--space-3xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 184, 28, 0.18);
  border: 1px solid rgba(255, 184, 28, 0.4);
  color: var(--gold);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: var(--space-md);
  max-width: 780px;
}

.hero-title .highlight {
  color: var(--gold);
  position: relative;
  display: inline;
}

.hero-body {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.8;
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.5); opacity: 0.2; }
}

/* ── Wave dividers ─────────────────────────────────────────── */
.wave-divider {
  position: relative;
  z-index: 2;
  margin-top: -1px;
  line-height: 0;
}

.wave-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Programme Cards ───────────────────────────────────────── */
.programme-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.programme-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--coastal-mid);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

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

.programme-card__img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.programme-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.programme-card:hover .programme-card__img img {
  transform: scale(1.08);
}

.programme-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.programme-card__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.programme-card__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.programme-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.programme-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: var(--space-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: gap var(--transition-fast);
}

.programme-card:hover .programme-card__link {
  gap: 0.7rem;
  color: var(--crimson);
}

/* ── Pathway ───────────────────────────────────────────────── */
.pathway-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  overflow-x: auto;
  padding-bottom: var(--space-sm);
}

.pathway-step {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}

.pathway-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: 60%;
  right: -40%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--navy));
  z-index: 0;
}

.pathway-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--gold);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: var(--transition-normal);
  box-shadow: 0 4px 16px rgba(0, 33, 71, 0.2);
}

.pathway-step:hover .pathway-node {
  background: var(--gold);
  color: var(--navy);
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(255, 184, 28, 0.4);
}

.pathway-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.pathway-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* ── Location Cards ────────────────────────────────────────── */
.location-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.location-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
}

.location-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.location-card:hover .location-card__img {
  transform: scale(1.08);
}

.location-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 21, 48, 0.9) 0%, rgba(0, 33, 71, 0.3) 60%, transparent 100%);
  transition: background var(--transition-normal);
}

.location-card:hover .location-card__overlay {
  background: linear-gradient(to top, rgba(0, 21, 48, 0.95) 0%, rgba(0, 33, 71, 0.5) 70%, transparent 100%);
}

.location-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  color: var(--white);
}

.location-card__tag {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.location-card__name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.location-card__desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), opacity 0.4s;
  opacity: 0;
}

.location-card:hover .location-card__desc {
  max-height: 100px;
  opacity: 1;
}

/* ── Stat Blocks ───────────────────────────────────────────── */
.stat-block {
  text-align: center;
  padding: var(--space-md);
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* ── FAQ Accordion ─────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--coastal-mid);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  transition: color var(--transition-fast);
}

.faq-question:hover { color: var(--crimson); }

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--coastal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-normal);
}

.faq-item.open .faq-icon {
  background: var(--navy);
  transform: rotate(45deg);
}

.faq-icon svg {
  width: 12px;
  height: 12px;
  fill: var(--navy);
  transition: fill var(--transition-fast);
}

.faq-item.open .faq-icon svg { fill: var(--white); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease-out);
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding-bottom: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Form ──────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--coastal-mid);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23002147' d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
  padding-right: 2.5rem;
}

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

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--navy);
  margin-top: 2px;
  cursor: pointer;
}

.form-checkbox-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: var(--white);
  padding-top: var(--space-2xl);
}

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

.footer-brand {}

.footer-brand .nav-logo { margin-bottom: var(--space-md); }

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

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

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition-fast);
  line-height: 1.5;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

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

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

.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

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

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  color: rgba(255,255,255,0.6);
}

.social-icon:hover {
  background: var(--gold);
  color: var(--navy);
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Page Hero (inner pages) ───────────────────────────────── */
.page-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 5rem;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 21, 48, 0.4) 0%, rgba(0, 21, 48, 0.85) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-height);
}

.page-hero-content .eyebrow { margin-bottom: 0.5rem; }
.page-hero-content h1 { color: var(--white); margin-bottom: var(--space-sm); }
.page-hero-content .lead { color: rgba(255,255,255,0.8); max-width: 600px; }

/* ── CTA Band ──────────────────────────────────────────────── */
.cta-band {
  background: var(--navy);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,184,28,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Skills list ───────────────────────────────────────────── */
.skills-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.skill-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.skill-item::before {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23002147' d='M7 10l2.5 2.5L14 8'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ── Info box ──────────────────────────────────────────────── */
.info-box {
  background: var(--coastal-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-md);
}

.info-box h4 {
  margin-bottom: 0.5rem;
}

.info-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Responsive nav ────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .location-cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .skills-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .page-hero { min-height: 45vh; }
}
