/* spi-bright.css -- South Padre Island bright theme (Operation Stormtrooper).
 *
 * SPI-ONLY. Loaded exclusively on south-padre-island pages via the
 * `bright_theme` feature flag (see private/features.php). Never loaded
 * on Rockport-Fulton or Corpus Christi pages.
 *
 * Palette (all text/background pairs verified WCAG AA 4.5:1+):
 *   --spi-turquoise:  #2DD4BF  (Gulf turquoise)
 *   --spi-yellow:     #FFD93D  (sunshine yellow)
 *   --spi-coral:      #FF7F50  (sunset coral)
 *   --spi-seafoam:    #7FFFD4  (seafoam)
 *   --spi-ocean:      #0077BE  (ocean blue)
 *   --spi-navy:       #0C4A6E  (deep navy, primary text on brights)
 *   --spi-ink:        #1a1a1a  (body text on coral)
 *
 * Brand lockup (logo, smiling sun, van artwork) is untouched. This file
 * only adjusts section energy: backgrounds, accents, cards, CTAs.
 */

:root {
  --spi-turquoise: #2DD4BF;
  --spi-turquoise-deep: #0FA3A3;
  --spi-yellow: #FFD93D;
  --spi-yellow-deep: #EAB308;
  --spi-coral: #FF7F50;
  --spi-coral-deep: #E85D2F;
  --spi-seafoam: #7FFFD4;
  --spi-ocean: #0077BE;
  --spi-ocean-deep: #005A8C;
  --spi-navy: #0C4A6E;
  --spi-ink: #1a1a1a;
  --spi-sand: #FFF8E7;
  --spi-magenta: #D63384;   /* geometric accent (decorative only) */
  --spi-card-radius: 1rem;
  --spi-shadow: 0 4px 24px rgba(12, 74, 110, 0.12);
}

/* ---- Page backdrop: warm sand tint behind content (SPI only) ---- */
body.spi-bright {
  background: linear-gradient(180deg, #FFFDF5 0%, var(--spi-sand) 100%);
}

/* ---- Section bands: alternating cheerful backgrounds ---- */
body.spi-bright .spi-band-turquoise {
  background: linear-gradient(135deg, var(--spi-turquoise) 0%, var(--spi-seafoam) 100%);
  color: var(--spi-navy);
  border-radius: var(--spi-card-radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
body.spi-bright .spi-band-sunshine {
  background: linear-gradient(135deg, var(--spi-yellow) 0%, #FFE89A 100%);
  color: var(--spi-navy);
  border-radius: var(--spi-card-radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
body.spi-bright .spi-band-ocean {
  background: linear-gradient(135deg, var(--spi-ocean) 0%, var(--spi-ocean-deep) 100%);
  color: #fff;
  border-radius: var(--spi-card-radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
body.spi-bright .spi-band-coral {
  background: linear-gradient(135deg, var(--spi-coral) 0%, #FFB38A 100%);
  color: var(--spi-ink);
  border-radius: var(--spi-card-radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

/* ---- Headings: ocean blue with sunshine underline accent ---- */
body.spi-bright main h2 {
  color: var(--spi-ocean-deep);
  border-bottom: 3px solid var(--spi-yellow);
  display: inline-block;
  padding-bottom: 0.25rem;
}

/* ---- CTA buttons: coral primary, ocean secondary ---- */
body.spi-bright .spi-cta {
  display: inline-block;
  background: var(--spi-coral);
  color: var(--spi-ink);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--spi-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
body.spi-bright .spi-cta:hover,
body.spi-bright .spi-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(12, 74, 110, 0.18);
  color: var(--spi-ink);
}
body.spi-bright .spi-cta-ocean {
  background: var(--spi-ocean);
  color: #fff;
}
body.spi-bright .spi-cta-ocean:hover,
body.spi-bright .spi-cta-ocean:focus-visible {
  color: #fff;
}

/* ============================================================
 * Attraction category carousel v2
 * Semantic: <section aria-label> > <ul> of cards. Vanilla JS.
 * Reference: 5 visible desktop / 1 tablet+phone, centered slides,
 * infinite loop, 15px gap, 300ms transition, 3000ms autoplay.
 * ============================================================ */
.spi-carousel {
  margin: 2rem 0;
  position: relative;
  border-radius: var(--spi-card-radius);
  padding: 2rem 1.5rem 1.75rem;
  overflow: hidden;
  /* BOLD geometric background: large solid diagonal color fields.
     Magenta wedge sweeps in from the top-left, golden-yellow wedge
     from the bottom-right, bright turquoise base fills the middle.
     High-energy beach-party look in the spirit of the
     MississippiFun.org reference. Original CSS composition --
     not copied from any source. */
  background:
    linear-gradient(135deg, #E91E63 0%, #D81B60 34%, rgba(216, 27, 96, 0) 34.6%),
    linear-gradient(315deg, #FFC107 0%, #FFB300 30%, rgba(255, 179, 0, 0) 30.6%),
    linear-gradient(180deg, #4DD0E1 0%, #00BCD4 55%, #0097A7 100%);
  box-shadow: 0 10px 36px rgba(1, 87, 105, 0.30);
}
.spi-carousel h2 {
  color: #fff;
  margin-bottom: 0.25rem;
  border-bottom-color: #fff;
  text-shadow: 0 2px 10px rgba(1, 60, 75, 0.50);
}
.spi-carousel .spi-carousel-sub {
  color: #fff;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(1, 60, 75, 0.50);
}
.spi-carousel-viewport {
  overflow: hidden;
  border-radius: calc(var(--spi-card-radius) - 0.25rem);
  cursor: grab;
  /* Let the page scroll vertically on touch; horizontal goes to the carousel */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.spi-carousel-viewport.dragging {
  cursor: grabbing;
}
.spi-carousel-viewport img {
  /* Prevent native image drag from fighting the carousel drag */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.spi-carousel-track {
  display: flex;
  gap: 15px; /* reference: 15px card spacing */
  padding: 0.5rem 0.25rem 1rem;
  margin: 0;
  list-style: none;
  transition: transform 0.3s ease; /* reference: 300ms */
  will-change: transform;
}
/* 5 visible on desktop: equal-width cards, 15px gaps, centered by JS */
.spi-carousel-card {
  flex: 0 0 calc((100% - 4 * 15px) / 5);
  min-width: 0;
  background: #fff;
  border-radius: var(--spi-card-radius);
  overflow: hidden;
  /* Stronger shadow so white cards pop against the bold background */
  box-shadow: 0 10px 30px rgba(1, 60, 75, 0.28);
  border-top: 6px solid var(--spi-turquoise);
  transition: transform 0.15s ease;
}
.spi-carousel-card:hover {
  transform: translateY(-4px);
}
.spi-carousel-card.accent-yellow { border-top-color: var(--spi-yellow); }
.spi-carousel-card.accent-coral { border-top-color: var(--spi-coral); }
.spi-carousel-card.accent-seafoam { border-top-color: var(--spi-turquoise-deep); }
.spi-carousel-card.accent-ocean { border-top-color: var(--spi-ocean); }
/* Tall photographic cards: portrait image, white label below */
.spi-carousel-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--spi-sand);
}
.spi-carousel-card-body {
  background: #fff; /* white label area below the photo */
  padding: 1rem 1.25rem 1.25rem;
}
.spi-carousel-card-body h3 {
  margin: 0 0 0.4rem;
  font-family: 'Zilla Slab', 'Rockwell', Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--spi-navy);
}
.spi-carousel-card-body h3 a {
  color: var(--spi-ocean-deep);
  text-decoration: none;
}
.spi-carousel-card-body h3 a:hover,
.spi-carousel-card-body h3 a:focus-visible {
  text-decoration: underline;
}
.spi-carousel-card-body p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}
.spi-carousel-card-link {
  font-weight: 700;
  color: var(--spi-ocean-deep);
  text-decoration: none;
  font-size: 0.95rem;
}
.spi-carousel-card-link:hover,
.spi-carousel-card-link:focus-visible {
  text-decoration: underline;
}

/* Carousel controls */
.spi-carousel-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}
.spi-carousel-btn {
  background: var(--spi-ocean);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--spi-shadow);
}
.spi-carousel-btn:hover,
.spi-carousel-btn:focus-visible {
  background: var(--spi-ocean-deep);
  outline: 3px solid var(--spi-yellow);
  outline-offset: 2px;
}
.spi-carousel-dots {
  display: flex;
  gap: 0.4rem;
  margin-left: 0.5rem;
  list-style: none;
  padding: 0;
}
.spi-carousel-dots button {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: none;
  /* Translucent white reads on turquoise, magenta, and yellow fields */
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 0;
}
.spi-carousel-dots button[aria-current="true"] {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(1, 60, 75, 0.35);
}

/* Responsive: 1 card on tablet/phone (<1024px), 5 on desktop */
@media (max-width: 1023.5px) {
  .spi-carousel-card { flex: 0 0 100%; }
  .spi-carousel { padding: 1.5rem 1rem 1.25rem; }
}

/* Reduced motion: no slide animation, no auto-advance (JS also checks) */
@media (prefers-reduced-motion: reduce) {
  .spi-carousel-track,
  .spi-carousel-card,
  body.spi-bright .spi-cta {
    transition: none;
  }
  .spi-carousel-card:hover,
  body.spi-bright .spi-cta:hover {
    transform: none;
  }
}

/* Print: show all cards stacked, hide controls */
@media print {
  .spi-carousel-viewport { overflow: visible; cursor: default; }
  .spi-carousel-track { flex-wrap: wrap; transform: none !important; }
  .spi-carousel-card { flex-basis: 100%; }
  .spi-carousel-controls { display: none; }
}

/* ---- Full-width carousel breakout (MGM launch requirement) ----
 * The carousel <section> renders inside .content-page .wrap (max-width: 46rem).
 * These rules break it out to full viewport width for prominence.
 * Uses the standard full-bleed technique: 100vw + negative margins.
 */
body.spi-bright .spi-carousel {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

/* ---- Short labels instead of paragraphs (MGM launch requirement) ----
 * Card blurbs are hidden; the title + Explore link carry the card.
 * This matches the MississippiFun.org reference: photo + short label.
 */
body.spi-bright .spi-carousel-card-body p {
  display: none;
}
body.spi-bright .spi-carousel-card-body {
  padding: 0.75rem 1rem 1rem;
}
/* SPI grid placement fix */
.shell > aside.sidebar { grid-column: 1; grid-row: 1; }
.shell > main { grid-column: 2; grid-row: 1; min-width: 0; }

/* Disable full-bleed carousel breakout - breaks grid layout */
body.spi-bright .spi-carousel {
  width: auto !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* Carousel: 3 cards per view (was 5, too skinny in column) */
body.spi-bright .spi-carousel-card {
  flex: 0 0 calc((100% - 2 * 15px) / 3) !important;
}
/* Title font upgrade */
body.spi-bright .spi-carousel h2,
body.spi-bright main h1 {
  font-family: 'Fredoka', 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Title handwriting font - Caveat Bold with gradient color */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&display=swap');
body.spi-bright .spi-carousel h2,
body.spi-bright main h1 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 2.8rem;
  background: linear-gradient(135deg, #E91E63, #FF6F00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Revert main titles to original, apply handwriting ONLY to carousel card titles */
body.spi-bright .spi-carousel h2,
body.spi-bright main h1 {
  font-family: inherit;
  background: none;
  -webkit-text-fill-color: inherit;
  color: inherit;
}

/* Handwriting font for carousel card titles (Fishing, Dining, etc.) */
body.spi-bright .spi-carousel-card-body h3 {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.6rem;
  color: #00695C;
}

/* H2 smaller than H1, same handwriting font as card titles */
body.spi-bright .spi-carousel h2 {
  display: block;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Force carousel links clickable */
body.spi-bright .spi-carousel-card-link {
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
  display: inline-block;
}
body.spi-bright .spi-carousel-card {
  pointer-events: auto !important;
}
