﻿/* Full-page scroll and section styling */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: auto;
}

/* Enable scroll snapping on the main index page */
body.index-container {
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #fff;
  scroll-snap-type: none; /* default: no snap to avoid auto-jump on load */
}
body.index-container.snap-enabled {
  scroll-snap-type: y proximity; /* enable snap only after entering sections */
}

/* Each fullpage section aligns to the center of viewport */
.fp-section {
  min-height: 100vh;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  /* bottom: 20rem; */
}
/* Hide non-active sections until user scrolls into them */
.fp-section:not(.fp-active) {
  visibility: hidden;
  opacity: 0;
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
}

/* Right-side dot navigation */
.fp-nav {
  position: fixed;
  top: 50%;
  right: 1.25rem; /* 20px */
  transform: translateY(-50%);
  z-index: 9999;
  transition: opacity .2s ease;
}
.fp-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fp-nav li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #0152B2;
  margin: 10px 0;
  cursor: pointer;
  position: relative;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.fp-nav li.active {
  transform: scale(1.4);
  background: #0152B2;
  border-color: #fff;
}

/* Tooltip with section name */
.fp-nav li::after {
  content: attr(title);
  position: absolute;
  right: 150%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.fp-nav li:hover::after {
  opacity: 1;
}

/* Gate WOW elements: only control animation state, never hide content */
.fp-section .wow.animate__animated {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}
.fp-section.fp-active .wow.animate__animated {
  -webkit-animation-play-state: running;
  animation-play-state: running;
}

/* Center active section content vertically, with slight upward offset */
.fp-section.fp-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  --fp-active-offset-y: -5vh;
}


/* Shift all direct children up a bit to appear slightly above center */
.fp-section.fp-active > * {
  transform: translateY(var(--fp-active-offset-y));
}
@media (prefers-reduced-motion: reduce) {
  .fp-section.fp-active > * { transform: none; }
}

/* Always show first section on initial load (no animation yet) */
.fp-section:first-of-type {
  visibility: visible;
  opacity: 1;
  min-height: auto; /* allow natural height for the first section */
  scroll-snap-align: start; /* snap to start for natural flow */
  display: block; /* override flex for first section */
}
/* First section should not vertically center when active */
.fp-section:first-of-type.fp-active {
  display: block;
}
/* First section uses natural height; disable upward offset transform */
.fp-section:first-of-type.fp-active > * {
  transform: none;
}