/* =========================================================
   Webflow-inspired motion: slider, scroll, hover, filters
   Matches Parkes Fitness4All interaction language
   ========================================================= */

/* Smooth base */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .partners-marquee .partners-track,
  .partners.partners-marquee .partners-track {
    animation: none !important;
    transform: none !important;
  }
  /* JS pauses autoplay videos; keep first frame/poster visible */
}

/* Scroll reveal (GSAP-like) */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }
.reveal-left { transform: translateX(-40px); }
.reveal-left.is-visible { transform: translateX(0); }
.reveal-right { transform: translateX(40px); }
.reveal-right.is-visible { transform: translateX(0); }
.reveal-scale { transform: scale(.94); }
.reveal-scale.is-visible { transform: scale(1); }

/* Hero slider — matches data-delay 4500, duration 600, ease-in-out-expo */
/* First screen = header + hero + partner marquee, exactly one viewport tall.
   svh (small viewport height) keeps mobile browser chrome from pushing the marquee
   below the fold; the vh line is the fallback for older browsers. */
.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h, 72px) - var(--partners-h, 102px));
  min-height: calc(100svh - var(--header-h, 72px) - var(--partners-h, 102px));
  background: #0a0a0a;
}
.hero-slider .hero-track {
  display: flex;
  height: 100%;
  min-height: inherit;
  transition: transform .6s cubic-bezier(.19,1,.22,1); /* expo-ish */
  will-change: transform;
}
.hero-slider .hero-slide {
  min-width: 100%;
  width: 100%;
  min-height: 78vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #0a0a0a;
  flex-shrink: 0;
}
/* Match live Webflow crop positions */
.hero-slider .hero-slide-dual { background-position: 70% 50%; }
.hero-slider .hero-slide-evolt { background-position: 40% 45%; }
.hero-slider .hero-slide-aquatic { background-position: 80% 55%; }
.hero-slider .hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.42) 52%, rgba(0,0,0,.55) 100%);
  z-index: 0;
}
.hero-slider .hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 48px 24px;
  text-align: center;
  color: #fff;
}
.hero-slider .hero-content h1,
.hero-slider .hero-content h2 {
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  line-height: 1.05;
  margin-bottom: 1.1rem;
  letter-spacing: .02em;
  text-shadow: 0 4px 24px rgba(0,0,0,.45);
  animation: heroIn .75s cubic-bezier(.16,1,.3,1) both;
}
.hero-slider .hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 640px;
  margin: 0 auto 1.75rem;
  opacity: .95;
  animation: heroIn .85s .1s cubic-bezier(.16,1,.3,1) both;
}
.hero-slider .btn-group {
  animation: heroIn .9s .18s cubic-bezier(.16,1,.3,1) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-nav {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 5;
}
/* The dot stays 10px, the button around it is 24px so it can actually be
   tapped on a phone. Visual size and hit area are deliberately different. */
.hero-dot {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}
.hero-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.75);
  background: transparent;
  transition: all .35s ease;
}
.hero-dot.active::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
  backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--accent); border-color: var(--accent); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
@media (max-width: 768px) {
  .hero-arrow { display: none; }
  .hero-slider, .hero-slider .hero-track, .hero-slider .hero-slide { min-height: 62vh; }
}

/* Button press / glow */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease !important;
}
.btn:hover { box-shadow: 0 10px 28px rgba(var(--accent-rgb), .28); }
.btn:active { transform: scale(.97) !important; }
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }

/* Card hover lift (Webflow-style) */
.card {
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease !important;
}
.card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.14) !important;
}

/* Equipment page — original card overlay language */
.equip-toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}
.equip-rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
/* Room buttons styled in catalog.css for consistency */
.equip-room-btn { transition: all .2s ease; }
.equip-room-btn:hover { }
.equip-room-btn.active { }

.equip-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  max-width: none;
  margin: 0;
}
.equip-filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  color: #333;
}
.equip-filter-btn:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.equip-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.equip-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: .9rem;
  color: #666;
}
.equip-reset {
  border: none;
  background: transparent;
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8rem;
}
.equip-reset:hover { text-decoration: underline; }

/* Horizontal scroll collection (like original scrolling-collection-wrap) */
.equip-scroll-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  margin: 0 -12px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.equip-scroll-wrap::-webkit-scrollbar { height: 8px; }
.equip-scroll-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.equip-scroll-row {
  display: flex;
  gap: 18px;
  padding: 8px 12px 16px;
  width: max-content;
}
.equip-grid-view {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  width: 100% !important;
  padding: 8px 0 16px !important;
}
.equip-scroll-wrap.is-grid {
  overflow: visible !important;
  margin: 0 !important;
}
.equip-grid-view .equip-card-v2 {
  width: 100%;
  height: 320px;
}
.view-toggle {
  display: flex;
  gap: 6px;
}
.view-toggle button {
  border: 1px solid #ddd;
  background: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
}
.view-toggle button.active { background: #111; color: #fff; border-color: #111; }

/* Equipment post card with overlay (original post-item / card-overlay) */
.equip-card-v2 {
  position: relative;
  width: 300px;
  height: 360px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: #111;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s ease;
  cursor: pointer;
}
.equip-grid-view .equip-card-v2 {
  width: 100%;
  height: 320px;
}
.equip-card-v2:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
}
.equip-card-v2 .equip-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.equip-card-v2:hover .equip-img { transform: scale(1.08); }
.equip-card-v2 .card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55) 65%, rgba(0,0,0,.88) 100%);
  color: #fff;
  transition: background .35s ease;
}
.equip-card-v2:hover .card-overlay {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .15) 0%, rgba(0,0,0,.75) 55%, rgba(0,0,0,.92) 100%);
}
.equip-card-v2 .body-part {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-transform: uppercase;
  margin: 0 0 6px;
  letter-spacing: .03em;
  transform: translateY(8px);
  transition: transform .35s ease;
}
.equip-card-v2:hover .body-part { transform: translateY(0); }
.equip-card-v2 .name-of-equipment {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 4px;
}
.equip-card-v2 .plate-or-pin {
  font-size: .78rem;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.equip-card-v2.is-hidden { display: none !important; }
.equip-empty {
  text-align: center;
  padding: 48px 20px;
  color: #888;
  font-size: 1.05rem;
  display: none;
}
.equip-empty.show { display: block; }

/* Partner marquee — primary rules live in styles.css (.partners-marquee-scroll)
   Keep a fallback keyframe name for older markup */
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* Nav underline animation.
   Text links only. The JOIN pill and the LOGIN pill are already
   shaped controls, so an underline sliding under the rounded edge looked broken. */
.nav-links > li > a {
  position: relative;
}
.nav-links > li.nav-login-item > a::after,
.nav-links > li > a.nav-join::after,
.nav-links > li > a.nav-login-btn::after,
.nav-links > li > a.btn::after { content: none !important; }
.nav-links > li > a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .3s ease;
}
.nav-links > li > a:hover::after { width: 100%; }
.dropdown-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  display: block !important;
  pointer-events: none;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 768px) {
  .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none !important;
    pointer-events: auto;
  }
  .dropdown.active .dropdown-content { display: block !important; }
  .nav-links > li > a::after { display: none; }
}

/* Stagger children utility */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}
.stagger.is-visible > * {
  opacity: 1;
  transform: none;
}
.stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .1s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .15s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .2s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .25s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .3s; }
.stagger.is-visible > *:nth-child(7) { transition-delay: .35s; }
.stagger.is-visible > *:nth-child(8) { transition-delay: .4s; }
.stagger.is-visible > *:nth-child(9) { transition-delay: .45s; }

/* Product image contain for store */
.card-img.has-photo.contain-img img {
  object-fit: contain;
  background: #f7f7f7;
  padding: 12px;
}

/* Team photo fill */
.team-card .card-img.has-photo {
  border-radius: 50%;
  width: 180px;
  height: 180px;
  margin: 28px auto 0;
  padding-top: 0;
  aspect-ratio: 1;
}
.team-card .card-img.has-photo img {
  object-fit: cover;
}

/* Page hero entrance */
.page-hero h1 {
  animation: heroIn .65s cubic-bezier(.16,1,.3,1) both;
}
.page-hero p {
  animation: heroIn .75s .08s cubic-bezier(.16,1,.3,1) both;
}

/* Image zoom utility */
.zoom-img {
  overflow: hidden;
}
.zoom-img img {
  transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.zoom-img:hover img { transform: scale(1.06); }

/* Loading skeleton for images */
img[loading="lazy"] {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
}
img[loading="lazy"].loaded {
  background: none;
  animation: none;
}

/* =========================================================
   Live-site media: full-bleed video banners, media thumbs
   ========================================================= */

/* Full-width autoplay background video (locals / aquatic) */
.video-banner {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0a;
  color: #fff;
}
.video-banner.compact { min-height: 48vh; }
.video-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.video-banner-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.4) 55%, rgba(0,0,0,.55) 100%);
}
.video-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 64px 20px;
}
.video-banner-content h2 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  letter-spacing: .02em;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 28px rgba(0,0,0,.5);
  animation: heroIn .75s cubic-bezier(.16,1,.3,1) both;
}
.video-banner-content p {
  font-size: 1.1rem;
  opacity: .92;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}
.video-banner-content .btn {
  animation: heroIn .9s .12s cubic-bezier(.16,1,.3,1) both;
}

/* Photo CTA (confidence band) */
.photo-cta {
  position: relative;
  background-size: cover !important;
  background-position: center !important;
  min-height: 42vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.photo-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,0,0,.78), rgba(0, 119, 163, .55));
  z-index: 0;
}
.photo-cta-inner {
  position: relative;
  z-index: 1;
  padding: 72px 20px;
}
.photo-cta h2 {
  text-shadow: 0 4px 24px rgba(0,0,0,.4);
}

/* Team band on dark after video */
.team-band .team-card {
  background: #161616;
  color: #fff;
}
.team-band .team-card .card-title { color: #fff; }
.team-band .team-role { color: #ccc; }
.team-band .section-header h2 { color: #fff; }

/* Media / latest videos thumbs */
.media-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #111;
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .65s cubic-bezier(.16,1,.3,1), filter .35s ease;
}
.media-thumb.tall { aspect-ratio: 4/3; }
.media-card:hover .media-thumb img,
.blog-card:hover .media-thumb img {
  transform: scale(1.06);
  filter: brightness(.85);
}
.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
  pointer-events: none;
}
.play-badge.large {
  width: 80px;
  height: 80px;
  font-size: 1.6rem;
}
.media-card:hover .play-badge,
.blog-card:hover .play-badge,
.media-thumb:hover .play-badge {
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(-50%, -50%) scale(1.08);
}

/* Post media hero */
.media-hero {
  position: relative;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #111;
  margin-bottom: 2rem;
}
.media-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inline class videos */
.class-video {
  border-radius: var(--radius, 8px);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}
.class-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Page heroes with optional photo bg utility */
.page-hero.with-photo {
  background-size: cover;
  background-position: center;
  position: relative;
}
.page-hero.with-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
}
.page-hero.with-photo .container { position: relative; z-index: 1; }

@media (max-width: 768px) {
  .video-banner { min-height: 48vh; }
  .video-banner.compact { min-height: 36vh; }
  .play-badge { width: 52px; height: 52px; font-size: 1rem; }
}
