/* sections.css - Shared section styling for DARTS website */

/* ========================================
   SCROLL ANCHOR OFFSET (for sticky header)
   ======================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* Sticky header offset for anchor links */
}

:target {
  scroll-margin-top: 96px;
}

* {
  box-sizing: border-box;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: clip;
}

/* ========================================
   A) SECTION BAND STYLING (ALTERNATING)
   ======================================== */

main > section {
  padding: 2.25rem 1.5rem;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg, 24px);
  border: 1px solid rgba(210, 223, 240, 0.9);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

main > section:nth-of-type(even) {
  background: rgba(65, 200, 244, 0.08);
}

/* Exclude hero/intro sections from band styling */
main > section.hero,
main > section.sub-hero,
main > #hero-top,
main > section:has(.hero-container),
main > section:has(.sub-hero),
main > section:has(.sports-strap),
main > section:has(.strap-headline) {
  padding: 2rem 0 1rem;
  margin: 0;
  border: none;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ========================================
   B) BADGE-STYLE SECTION LABELS (NO DOTS)
   ======================================== */

.section-label,
.sub-hero-kicker,
.rtvar-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(65, 200, 244, 0.12);
  border: 1px solid rgba(65, 200, 244, 0.35);
  color: #0a6fb0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

/* Remove any existing dot/bullet pseudo-elements */
.section-label::before,
.sub-hero-kicker::before,
.rtvar-kicker::before {
  display: none !important;
}

/* ========================================
   C) LEFT ACCENT LINE FOR HEADINGS
   ======================================== */

.section-title {
  position: relative;
  padding-left: 0.9rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 4px;
  height: 1.2em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(65, 200, 244, 0.95), rgba(65, 200, 244, 0.35));
}

/* ========================================
   D) DISABLE STRAP-DOT ELEMENTS
   ======================================== */

.strap-dot {
  display: none !important;
}

/* ========================================
   E) SCROLL-REVEAL ANIMATION
   ======================================== */

/* Default hidden state for sections */
main > section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms ease, transform 600ms ease;
}

/* Visible state when scrolled into view */
main > section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero sections should be visible immediately */
main > section.hero,
main > section.sub-hero,
main > #hero-top,
main > section:first-of-type {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion support - disable animations */
@media (prefers-reduced-motion: reduce) {
  main > section {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ========================================
   F) RE-ENABLE BAND STYLING FOR SUB-HERO SECTIONS
   ======================================== */

/* Override exclusion to restore band styling for sections with .sub-hero */
main > section:has(.sub-hero) {
  padding: 2.25rem 1.5rem;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg, 24px);
  border: 1px solid rgba(210, 223, 240, 0.9);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Alternating tint for even sub-hero sections */
main > section:has(.sub-hero):nth-of-type(even) {
  background: rgba(65, 200, 244, 0.08);
}

/* ========================================
   G) MOBILE BASELINE
   ======================================== */

@media (max-width: 960px) {
  html {
    scroll-padding-top: 88px;
  }

  :target {
    scroll-margin-top: 88px;
  }

  main > section {
    padding: 1.5rem 1rem;
    margin: 0.8rem 0;
    border-radius: 16px;
  }

  main > section:has(.sub-hero) {
    padding: 1.5rem 1rem;
    margin: 0.8rem 0;
    border-radius: 16px;
  }

  .page-title-section .container,
  .container,
  .inner,
  .section-inner {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 82px;
  }

  :target {
    scroll-margin-top: 82px;
  }

  main > section {
    padding: 1.2rem 0.85rem;
    border-radius: 14px;
  }

  .section-title {
    padding-left: 0.7rem;
  }
}
