/**
 * Top 5 Adventure Activities in Sri Lanka - Dynamic Sliding Carousel
 * Matches reference aesthetic with curated typography, pill badges, and Thurya Voyages brand styling
 */

#adventure-activities-section {
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid #f1f5f9;
}

@media (min-width: 640px) {
  #adventure-activities-section {
    padding-top: 5rem;
    padding-bottom: 5.5rem;
  }
}

/* Container & Mask */
.adventure-carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 1.5rem 0 2rem 0;
}

.adventure-carousel-viewport:active {
  cursor: grabbing;
}

/* Desktop edge gradient fades */
@media (min-width: 768px) {
  .adventure-carousel-viewport {
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  }
}

/* Continuous Sliding Marquee Track */
.adventure-marquee-track {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
  animation: adventureSlideLeft 60s linear infinite;
}

@keyframes adventureSlideLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Pause conditions */
.adventure-marquee-track:hover,
.adventure-marquee-track:focus-within,
.adventure-marquee-track.is-paused {
  animation-play-state: paused !important;
}

/* Accessibility: respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .adventure-marquee-track {
    animation: none !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
    padding-bottom: 1rem;
  }

  .adventure-card-wrapper {
    scroll-snap-align: start;
  }
}

/* Activity Card Base (matching reference image) */
.adventure-card {
  width: 295px;
  min-width: 295px;
  height: 440px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.65rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
}

@media (min-width: 640px) {
  .adventure-card {
    width: 320px;
    min-width: 320px;
    height: 450px;
    border-radius: 32px;
    padding: 1.85rem;
  }
}

.adventure-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -12px rgba(0, 107, 118, 0.18), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
}

.adventure-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #006B76, 0 20px 35px -10px rgba(0, 107, 118, 0.25);
}

/* --- Theme 1: Clean Light (Pill tags style from Reference Image) --- */
.adv-theme-accent-light {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.adv-theme-accent-light .adv-tag-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.adv-theme-accent-light .adv-highlight {
  color: #0f172a;
}

.adv-theme-accent-light .adv-desc {
  color: #64748b;
}

/* --- Theme 2: Brand Teal (Vibrant Lime/Teal style from Reference Image) --- */
.adv-theme-brand-teal {
  background: linear-gradient(145deg, #006B76 0%, #004d55 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.adv-theme-brand-teal .adv-tag-pill {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.adv-theme-brand-teal .adv-highlight {
  color: #ffffff;
}

.adv-theme-brand-teal .adv-desc {
  color: rgba(226, 252, 254, 0.9);
}

/* --- Theme 3: Full Photo Bleed Overlay (Lush Nature Card in Reference) --- */
.adv-theme-photo-overlay {
  background-color: #081a1d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.adv-theme-photo-overlay .adv-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.adv-theme-photo-overlay:hover .adv-bg-image {
  transform: scale(1.06);
}

.adv-theme-photo-overlay .adv-photo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 15, 17, 0.95) 0%, rgba(3, 15, 17, 0.5) 50%, rgba(3, 15, 17, 0.2) 100%);
  z-index: 1;
}

.adv-theme-photo-overlay .adv-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.adv-theme-photo-overlay .adv-tag-pill {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.adv-theme-photo-overlay .adv-highlight {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.adv-theme-photo-overlay .adv-desc {
  color: #e2e8f0;
}

/* --- Theme 4: Brand Gold (Warm Luxury Accent Card) --- */
.adv-theme-brand-gold {
  background: #fbf8f3;
  border: 1px solid #ebd9c5;
  color: #1e293b;
}

.adv-theme-brand-gold .adv-tag-pill {
  background: #ffffff;
  border: 1px solid #e2cbaf;
  color: #ef5b3d;
  box-shadow: 0 1px 3px rgba(224, 129, 36, 0.06);
}

.adv-theme-brand-gold .adv-highlight {
  color: #ef5b3d;
}

.adv-theme-brand-gold .adv-desc {
  color: #57534e;
}

/* --- Theme 5: Deep Safari Slate (Wilderness Card) --- */
.adv-theme-dark-slate {
  background: linear-gradient(145deg, #0b1f22 0%, #051214 100%);
  border: 1px solid rgba(0, 107, 118, 0.3);
  color: #ffffff;
}

.adv-theme-dark-slate .adv-tag-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #99f6e4;
  backdrop-filter: blur(4px);
}

.adv-theme-dark-slate .adv-highlight {
  color: #ffffff;
}

.adv-theme-dark-slate .adv-desc {
  color: #cbd5e1;
}

/* Image frame for non-photo-bleed cards */
.adv-card-img-frame {
  width: 100%;
  height: 160px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  margin: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.adv-card-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.adventure-card:hover .adv-card-img-frame img {
  transform: scale(1.05);
}