/* ==========================================================================
   PSA Home — Water Sports Theme
   Ocean palette, parallax hero, wave dividers, scroll-reveal animations.
   ========================================================================== */

:root {
  --psa-deep:   #051c2c;
  --psa-navy:   #0a253a;
  --psa-teal:   #158e8f;
  --psa-teal-2: #0f7577;
  --psa-cyan:   #04adbf;
  --psa-aqua:   #6fe3e0;
  --psa-foam:   #eafcff;
}

/* ---------- Typography ---------- */
body {
  font-family: 'Poppins', "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--psa-deep);
}

h1, h2, h3, h4 {
  font-family: 'Bebas Neue', "Poppins", "Montserrat", sans-serif;
  font-style: normal;
  letter-spacing: 2px;
}

.section-title {
  color: var(--psa-navy);
  font-size: clamp(1.9rem, 4vw + 1rem, 2.6rem);
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--psa-teal), var(--psa-cyan));
}

.section-subtitle {
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.5px;
  color: #4a6572;
  max-width: 640px;
  margin: 0 auto 30px;
}

/* Modifiers for titles sitting directly on the dark ocean body background */
.section-title--onlight {
  color: var(--psa-foam);
}

.section-title--onlight::after {
  background: linear-gradient(90deg, var(--psa-aqua), var(--psa-cyan));
}

.section-subtitle--onlight {
  color: rgba(234, 252, 255, 0.75);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1.in-view { transition-delay: 0.12s; }
.reveal-delay-2.in-view { transition-delay: 0.24s; }
.reveal-delay-3.in-view { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in-view { transition: none; transform: none; opacity: 1; }
}

/* ---------- Hero / parallax slider ---------- */
.hero {
  position: relative;
  overflow: hidden;
  height: 100vh;
  min-height: 100vh;
}

@supports (height: 100dvh) {
  .hero {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.hero #carouselExampleCaptions,
.hero .carousel-inner,
.hero .carousel-item {
  height: 100%;
}

.hero .carousel-item {
  background-attachment: fixed;
  background-position: center;
  position: relative;
}

.hero .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 28, 44, 0.55) 0%, rgba(5, 28, 44, 0.35) 45%, rgba(5, 28, 44, 0.85) 100%);
}

@media (max-width: 768px) {
  .hero .carousel-item {
    background-attachment: scroll;
  }
}

.hero-content {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--psa-foam);
  padding: 90px 20px 40px;
  overflow-y: auto;
  pointer-events: none;
}

.hero-content > * {
  pointer-events: auto;
}

@media (max-height: 560px) {
  .hero-content {
    justify-content: flex-start;
  }
}

.hero-eyebrow {
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.85rem;
  color: var(--psa-aqua);
  margin-bottom: 14px;
  opacity: 0;
  animation: heroFadeUp 0.9s ease forwards 0.2s;
}

.hero-title {
  font-size: clamp(2.1rem, 6vw + 1rem, 4.2rem);
  line-height: 1.1;
  margin: 0 0 18px;
  text-shadow: 0 6px 30px rgba(0,0,0,0.35);
  opacity: 0;
  animation: heroFadeUp 0.9s ease forwards 0.4s;
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--psa-aqua), var(--psa-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(0.92rem, 1.6vw + 0.6rem, 1.15rem);
  max-width: 620px;
  margin: 0 auto 32px;
  color: rgba(234, 252, 255, 0.9);
  opacity: 0;
  animation: heroFadeUp 0.9s ease forwards 0.6s;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: heroFadeUp 0.9s ease forwards 0.8s;
}

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

.btn-wave {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 14px 34px;
  border-radius: 50px;
  border: none;
  color: #fff;
  background: linear-gradient(90deg, var(--psa-teal), var(--psa-cyan));
  box-shadow: 0 10px 25px rgba(4, 173, 191, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

.btn-wave:hover, .btn-wave:focus {
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(4, 173, 191, 0.5);
}

.btn-wave-outline {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 13px 32px;
  border-radius: 50px;
  border: 2px solid rgba(234, 252, 255, 0.75);
  color: var(--psa-foam);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.btn-wave-outline:hover, .btn-wave-outline:focus {
  color: var(--psa-navy);
  background: var(--psa-foam);
  transform: translateY(-4px);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: rgba(234, 252, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bobDown 2.2s ease-in-out infinite;
}

.scroll-cue .scroll-cue-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(234, 252, 255, 0.85);
  border-radius: 14px;
  margin-top: 8px;
  position: relative;
}

.scroll-cue .scroll-cue-mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--psa-aqua);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes bobDown {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

@keyframes scrollDot {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 6px; }
}

/* ---------- Wave dividers ---------- */
.wave-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 4;
  display: flex;
  animation: waveFlow 22s linear infinite;
}

.wave-divider svg {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 80px;
}

.wave-divider.wave-fast { animation-duration: 14s; }
.wave-divider.wave-slow { animation-duration: 32s; }

@keyframes waveFlow {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

.wave-divider--to-navy path   { fill: var(--psa-navy); }
.wave-divider--to-white path  { fill: #ffffff; }
.wave-divider--to-teal path   { fill: var(--psa-teal); }
.wave-divider--to-cyan path   { fill: var(--psa-cyan); }
.wave-divider--to-deep path   { fill: var(--psa-deep); }

@media (prefers-reduced-motion: reduce) {
  .wave-divider { animation: none; }
  .wave-divider svg:last-child { display: none; }
}

/* ---------- About section ---------- */
.aboutus-section {
  background-attachment: fixed;
}

.aboutus-box {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(5, 28, 44, 0.45);
  border: 1px solid rgba(234, 252, 255, 0.18);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  padding: 20px;
}

/* ---------- Mission / Vision — alternating parallax rows ---------- */
.mv-section {
  padding: 20px 0 60px;
}

.mv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  min-height: 440px;
  margin: 0 0 0;
}

.mv-row--reverse {
  flex-direction: row-reverse;
}

.mv-media {
  flex: 1 1 50%;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.mv-text {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff;
  padding: 50px 45px;
}

.mv-badge {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 18px;
  color: #fff;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--psa-teal), var(--psa-cyan));
  box-shadow: 0 12px 24px rgba(4, 173, 191, 0.35);
}

.mv-title {
  font-size: 1.9rem;
  color: var(--psa-teal-2);
  margin-bottom: 6px;
}

.mv-title::after {
  content: '';
  display: block;
  width: 46px;
  height: 3px;
  margin: 8px auto 16px;
  background: linear-gradient(90deg, var(--psa-teal), var(--psa-cyan));
  border-radius: 3px;
}

.mv-copy {
  color: var(--psa-navy);
  max-width: 460px;
  line-height: 1.75;
}

@media (max-width: 768px) {
  .mv-row, .mv-row--reverse {
    flex-direction: column;
  }

  .mv-media {
    min-height: 220px;
    background-attachment: scroll;
  }

  .mv-text {
    padding: 36px 24px;
  }
}

/* ---------- Search section ---------- */
#search-section {
  background: linear-gradient(180deg, #ffffff 0%, #f2fbfc 100%);
}

#search-section .search-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 3px;
  font-size: 2rem;
}

#search-section .row .card {
  border: none;
  border-radius: 22px;
  padding: 34px 12px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

#search-section .row .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 22px 40px rgba(21, 142, 143, 0.22);
}

.instructor-search-icon,
.course-search-icon {
  transition: transform 0.4s ease, color 0.4s ease;
}

#search-section .row .card:hover .instructor-search-icon,
#search-section .row .card:hover .course-search-icon {
  transform: translateY(-6px) scale(1.08);
  color: var(--psa-cyan);
}

/* ---------- Footer ---------- */
.page-footer {
  position: relative;
}

/* ---------- Misc ---------- */
::selection {
  background: var(--psa-teal);
  color: #fff;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .scroll-cue { bottom: 18px; }
  .wave-divider svg { height: 45px; }
}
