/* ===================================
   HERO
   =================================== */

/* creates positioning context for child elements */
.hero-wrapper {
  position: relative;
  width: 100%;
  overflow: visible; /* changed from hidden — was blocking parallax scroll */
  margin-bottom: 0;
}

.hero {
  font-family: 'Open Sans', sans-serif;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  color: rgb(1, 9, 67);
  padding: 8rem 2rem 2rem; /* 8rem top clears the fixed nav */
  position: relative;
  z-index: 2;
  min-height: 40vh;
  margin-bottom: 0;
  overflow: visible; /* needed for parallax — text moves beyond hero bounds */
}

/* gradient text clip trick */
.hero h1,
#heroTitle {
  font-size: 90px;
  font-weight: 700;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: -1px;
  color: rgb(1, 9, 67);
  z-index: 10;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease, opacity 0.4s ease;
  text-align: center;
}

.tagline {
  margin-top: 15px;
  font-size: 20px;
  color: rgb(1, 9, 67);
  opacity: 0.9;
  z-index: 10;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease, opacity 0.4s ease;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  text-align: center;
  padding: 0 20px;
}

.accent {
  color: #1e40ff;
  transition: color 0.3s ease;
}

/* ===================================
   IMAGE REVEAL
   =================================== */

.image-reveal {
  height: 80vh;
  position: relative;
  overflow: hidden; /* clips image as it scales/moves */
  z-index: 1; /* sits behind hero text (z-index: 2) */
  margin: 0;
  padding: 0;
  display: block;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%); /* fills space while video loads */
}

.hero-media {
  height: 100%;
  width: 155vh;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  position: relative; /* positioning context for absolute iframe */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* overlay hides YouTube controls/title that flash on load */
.hero-media::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 2; /* above video (0) but below page text (10) */
  pointer-events: none; /* clicks pass through to page */
}

.hero-image {
  display: block;
  margin: 0;
  padding: 0;
  border: none; /* removes iframe's default border */
  pointer-events: none; /* prevents accidental click-to-pause */
  transform: scale(1); /* JS increases this on scroll for zoom effect */
  transform-origin: center center;
  transition: transform 0.1s ease-out, width 0.1s ease-out, border-radius 0.1s ease-out;
}

/* iframe needs absolute centering; regular img doesn't */
iframe.hero-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%; /* ensures video always covers container, no black bars */
  object-fit: contain;
  z-index: 0; /* behind the ::before overlay */
}

img.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===================================
   CAROUSEL
   =================================== */

.carousel {
  position: relative;
  max-width: 100%;
  margin: 60px auto 0;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0;
  margin: 0;
  list-style: none;
  user-select: none;
}

.scrollbar-jump { 
  scroll-behavior: auto;
}

/* hide scrollbar */
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track {
  scrollbar-width: none;
}

.slide {
  flex: 0 0 100%;
  height: 300px;
  scroll-snap-align: center;
  border-radius: 14px;
  overflow: hidden;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 5;
}

.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.carousel-dots button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #000;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button.active {
  background: #000;
}

/* ===================================
   CONTENT SECTIONS
   =================================== */

.point {
  padding: 120px 0px;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  margin: 0;
  position: relative;
  overflow: visible; /* allows content to move during JS animations */
}

.point-content {
  max-width: 800px;
  margin: 0 auto;
  overflow: visible;
}

/* wider container for the split layout in the first point section */
.point-content-split {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.point-content-split h2 {
  font-size: 48px;
  margin-bottom: 40px;
  color: rgb(1, 9, 67);
  font-weight: 700;
  text-align: center;
}

.split-container {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  justify-content: center;
}

/* slides in from the right on scroll */
.paragraph-side {
  flex: 1;
  max-width: 600px;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.paragraph-side.slide-in {
  opacity: 1;
  transform: translateX(0);
}

.paragraph-side p {
  font-size: 18px;
  line-height: 1.6;
  color: rgb(1, 9, 67);
  opacity: 0.8;
  text-align: left;
}

/* slides in from the left on scroll */
.engage-side {
  flex: 1;
  max-width: 400px;
  text-align: left;
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.engage-side.slide-in {
  opacity: 1;
  transform: translateX(0);
}

.engage-label {
  font-size: 24px;
  font-weight: 700;
  color: rgb(1, 9, 67);
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.engage-label.show {
  opacity: 1;
}

.engage-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.engage-item {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  opacity: 0; /* each item fades in as it types */
  transition: opacity 0.3s ease;
}

.engage-item.typing {
  opacity: 1;
}

/* category colors */
.engage-item[data-category="political"] .typewriter-text    { color: #2563eb; }
.engage-item[data-category="environmental"] .typewriter-text { color: #10b981; }
.engage-item[data-category="innovative"] .typewriter-text   { color: #ec4899; }
.engage-item[data-category="youth"] .typewriter-text        { color: #f59e0b; }
.engage-item[data-category="educational"] .typewriter-text  { color: #8b5cf6; }

/* blinking cursor after typewriter text */
.typewriter-text::after {
  content: '|';
  animation: blink 0.7s infinite;
  margin-left: 2px;
}

/* remove cursor once typing is done */
.typewriter-text.done::after {
  content: '';
  animation: none;
}

@keyframes blink {
  0%, 50%  { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.point h2 {
  font-size: 48px;
  margin-bottom: 20px;
  color: rgb(1, 9, 67);
  font-weight: 700;
}

.first-point h2 {
  opacity: 1;
}

.point p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.6;
  color: rgb(1, 9, 67);
  opacity: 0.8;
}

/* alternate sections use a flat gray instead of the gradient */
.point-alt {
  background: #f6f6f6;
  padding: 120px 40px;
  text-align: center;
  margin: 0;
}

.point-alt .point-content {
  max-width: 800px;
  margin: 0 auto;
}

.point-alt h2 {
  font-size: 48px;
  margin-bottom: 20px;
  color: rgb(1, 9, 67);
  font-weight: 700;
}

.point-alt p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.6;
  color: rgb(1, 9, 67);
  opacity: 0.8;
}

/* ===================================
   FOOTER CTA
   =================================== */

.footer-cta {
  text-align: center;
  padding: 80px 40px;
  margin: 0;
  background: white;
}

.cta-text {
  font-size: 24px;
  margin-bottom: 30px;
  color: rgb(1, 9, 67);
  font-weight: 600;
}

.cta {
  background: rgb(1, 9, 67);
  color: white;
  padding: 16px 40px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 20px;
  text-decoration: none; /* styled as button, not a link */
  transition: all 0.3s ease;
  display: inline-block;
}

.cta:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(30, 64, 255, 0.3);
}

/* ===================================
   MISC
   =================================== */

.hero-inner {
  position: relative;
  z-index: 10;
}

/* overflow: visible (not hidden) — parallax animations move content outside bounds */
main {
  margin: 0;
  padding: 0;
  overflow: visible;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .hero {
    padding: 6rem 1.5rem 1.5rem;
    min-height: 25vh;
  }

  .hero h1,
  #heroTitle {
    font-size: 50px;
  }

  .tagline {
    font-size: 18px;
  }

  /* stack two columns vertically on mobile */
  .split-container {
    flex-direction: column;
    gap: 40px;
  }

  .paragraph-side,
  .engage-side {
    max-width: 100%;
  }

  .paragraph-side p {
    text-align: center;
  }

  .engage-side {
    text-align: center;
  }

  .engage-label {
    font-size: 20px;
  }

  .engage-item {
    font-size: 24px;
  }

  .point,
  .point-alt {
    padding: 80px 20px;
  }

  .point h2,
  .point-alt h2 {
    font-size: 36px;
    margin-bottom: 15px;
  }

  .point p,
  .point-alt p {
    font-size: 16px;
  }

  .footer-cta {
    padding: 60px 20px;
  }

  .cta-text {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .cta {
    padding: 14px 30px;
    font-size: 18px;
  }

  .image-reveal {
    height: 60vh;
  }
}

html {
  scroll-behavior: smooth;
}

.nextstep-paragraph {
  text-align: center !important;
}