/* Home hero slider — "editorial" captions (default; /?hero=v1 = old captions).
   Active only when <html> has class "hero-v2". Animations are keyed on
   flexslider's .flex-active-slide, so they replay on every slide change. */

html.hero-v2 #sliders-container .tfs-slider {
  --hero-ease: cubic-bezier(0.22, 0.61, 0.16, 1);
}

/* Avada hides/fades the caption with jQuery — keep it in the DOM and let CSS animate. */
html.hero-v2 .tfs-slider .slide-content-container {
  display: block !important;
  opacity: 1 !important;
}
html.hero-v2 .tfs-slider .slide-content-container .slide-content {
  opacity: 1 !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  left: auto !important;
  max-width: 760px;
}
html.hero-v2 .tfs-slider .slide-content-container.slide-content-center .slide-content {
  margin-left: auto !important;
}
html.hero-v2 .tfs-slider .slide-content-container {
  padding-left: 7vw !important;
  padding-right: 7vw !important;
}

/* 1) Slow Ken Burns zoom on the photo */
html.hero-v2 .tfs-slider .slides > li { overflow: hidden; }
html.hero-v2 .tfs-slider .slides > li .background {
  transform: scale(1);
  transition: transform 0s 0.7s; /* reset after the fade-out finishes */
  will-change: transform;
}
html.hero-v2 .tfs-slider .slides > li.flex-active-slide .background {
  transform: scale(1.08);
  transition: transform 7s ease-out;
}

/* 2) Soft gradient instead of the grey box */
html.hero-v2 .tfs-slider .slides > li::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 16, 12, 0.55) 0%, rgba(20, 16, 12, 0.25) 45%, rgba(20, 16, 12, 0) 70%),
    linear-gradient(0deg, rgba(20, 16, 12, 0.35) 0%, rgba(20, 16, 12, 0) 40%);
}
html.hero-v2 .tfs-slider .slides > li .slide-content-container { z-index: 5; }
html.hero-v2 .tfs-slider .slide-content-container .heading.with-bg,
html.hero-v2 .tfs-slider .slide-content-container .heading.with-bg * {
  background: none !important;
  box-shadow: none !important;
}
html.hero-v2 .tfs-slider .slide-content-container .with-bg .fusion-title-sc-wrapper { padding: 0 !important; }

/* 3a) Thin line draws in */
html.hero-v2 .tfs-slider .slide-content::before {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.85);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0s 0.7s;
}
html.hero-v2 .tfs-slider .slide-content-container.slide-content-center .slide-content::before {
  margin-left: auto; margin-right: auto; transform-origin: center;
}
html.hero-v2 .tfs-slider .flex-active-slide .slide-content::before {
  transform: scaleX(1);
  transition: transform 0.9s var(--hero-ease) 0.25s;
}

/* 3b) Title rises through a mask */
html.hero-v2 .tfs-slider .slide-content-container .heading {
  overflow: hidden;
  margin-bottom: 30px;
  padding-bottom: 0.08em; /* keep descenders inside the mask */
}
html.hero-v2 .tfs-slider .slide-content-container .heading :is(h1, h2, h3) {
  display: block;
  color: #fff;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(110%);
  transition: transform 0s 0.7s;
}
html.hero-v2 .tfs-slider .flex-active-slide .slide-content-container .heading :is(h1, h2, h3) {
  transform: translateY(0);
  transition: transform 1.1s var(--hero-ease) 0.45s;
}

/* 3c) Button fades up last — ghost style */
html.hero-v2 .tfs-slider .slide-content-container .buttons {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0s 0.7s, transform 0s 0.7s;
}
html.hero-v2 .tfs-slider .flex-active-slide .slide-content-container .buttons {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease 1s, transform 0.8s var(--hero-ease) 1s;
}
html.hero-v2 .tfs-slider .slide-content-container .buttons .fusion-button {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 0 !important;
  padding: 14px 30px !important;
  letter-spacing: 0.18em;
  transition: background-color 0.3s ease, color 0.3s ease;
}
html.hero-v2 .tfs-slider .slide-content-container .buttons .fusion-button,
html.hero-v2 .tfs-slider .slide-content-container .buttons .fusion-button * {
  color: #fff !important;
}
html.hero-v2 .tfs-slider .slide-content-container .buttons .fusion-button:hover {
  background: #fff !important;
}
html.hero-v2 .tfs-slider .slide-content-container .buttons .fusion-button:hover,
html.hero-v2 .tfs-slider .slide-content-container .buttons .fusion-button:hover * {
  color: #2b2620 !important;
}

/* Mobile: stronger bottom gradient, caption near the bottom */
@media (max-width: 640px) {
  html.hero-v2 .tfs-slider .slides > li::after {
    background: linear-gradient(0deg, rgba(20, 16, 12, 0.7) 0%, rgba(20, 16, 12, 0.15) 60%, rgba(20, 16, 12, 0) 100%);
  }
  html.hero-v2 .tfs-slider .slide-content::before { margin-bottom: 16px; }
  html.hero-v2 .tfs-slider .slide-content-container .heading { margin-bottom: 18px; }
}

/* Respect reduced-motion preferences: show everything, no movement */
@media (prefers-reduced-motion: reduce) {
  html.hero-v2 .tfs-slider .slides > li .background,
  html.hero-v2 .tfs-slider .slide-content::before,
  html.hero-v2 .tfs-slider .slide-content-container .heading :is(h1, h2, h3),
  html.hero-v2 .tfs-slider .slide-content-container .buttons {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}
