/* ==========================================
   DMP Micro-Animations & UX Enhancements
   ========================================== */

/* Hero Section Design */

/* 4:3 Aspect Ratio for Hero Images (matches membership pages) */
.hero-aspect-ratio {
  aspect-ratio: 4 / 3;
  max-height: 75vh;
}

@media screen and (max-width: 991px) {
  .hero-aspect-ratio {
    aspect-ratio: 3 / 2;
    max-height: 60vh;
  }
}

@media screen and (max-width: 767px) {
  .hero-aspect-ratio {
    aspect-ratio: 1;
    max-height: 50vh;
  }
}

/* Hero Section Enhancements */

/* Animated Gradient Background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-gradient-bg {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 36, 0.1),
    rgba(0, 0, 0, 0.3),
    rgba(239, 68, 36, 0.15)
  );
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* Sequential Text Animation */
.hero-text-animate .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: wordFadeIn 0.6s ease forwards;
}

@keyframes wordFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger delay for each word */
.hero-text-animate .word:nth-child(1) { animation-delay: 0.1s; }
.hero-text-animate .word:nth-child(2) { animation-delay: 0.2s; }
.hero-text-animate .word:nth-child(3) { animation-delay: 0.3s; }
.hero-text-animate .word:nth-child(4) { animation-delay: 0.4s; }
.hero-text-animate .word:nth-child(5) { animation-delay: 0.5s; }
.hero-text-animate .word:nth-child(6) { animation-delay: 0.6s; }
.hero-text-animate .word:nth-child(7) { animation-delay: 0.7s; }
.hero-text-animate .word:nth-child(8) { animation-delay: 0.8s; }
.hero-text-animate .word:nth-child(9) { animation-delay: 0.9s; }
.hero-text-animate .word:nth-child(10) { animation-delay: 1.0s; }

/* Floating/Pulsing CTA Button */
@keyframes ctaFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(239, 68, 36, 0.4);
  }
  50% {
    box-shadow: 0 8px 25px rgba(239, 68, 36, 0.6);
  }
}

.button-float {
  animation: ctaFloat 3s ease-in-out infinite;
  will-change: transform;
}

.button-pulse {
  animation: ctaPulse 2s ease-in-out infinite;
  will-change: box-shadow;
}

.button-hero-enhanced {
  animation: ctaFloat 3s ease-in-out infinite, ctaPulse 2s ease-in-out infinite;
  will-change: transform, box-shadow;
  transition: all 0.3s ease;
}

.button-hero-enhanced:hover {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.05);
}

/* Scroll Fade-In Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delay for sequential animations */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* Card Hover Lift Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Product Card Specific Hover */
.product-card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.product-card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Session/Event Card Hover */
.session-card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.session-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Button Transform Animations */
.button-animate,
.button.is-alternate,
.button.w-button,
button[type="submit"],
.cta-button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  will-change: transform;
}

.button-animate:hover,
.button.is-alternate:hover,
.button.w-button:hover,
button[type="submit"]:hover,
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.button-animate:active,
.button.is-alternate:active,
.button.w-button:active,
button[type="submit"]:active,
.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Primary CTA Enhanced */
.button-primary-enhanced {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.button-primary-enhanced::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.button-primary-enhanced:hover::before {
  width: 300px;
  height: 300px;
}

.button-primary-enhanced:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(239, 68, 36, 0.3);
}

/* Cart Icon Bounce Animation */
@keyframes cart-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.cart-bounce {
  animation: cart-bounce 0.4s ease;
}

/* Add to Cart Flight Animation */
@keyframes fly-to-cart {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(var(--fly-x, 0), var(--fly-y, 0)) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translate(var(--fly-x, 0), var(--fly-y, 0)) scale(0.3);
  }
}

.flying-to-cart {
  animation: fly-to-cart 0.8s ease-in-out;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

/* Sticky Header Shrink Animation */
.header-shrink {
  transition: padding 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.header-shrink.is-scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-shrink.is-scrolled .navbar1_logo {
  transition: height 0.3s ease;
  height: 40px;
}

/* Image Hover Zoom */
.image-zoom {
  overflow: hidden;
}

.image-zoom img {
  transition: transform 0.4s ease;
  will-change: transform;
}

.image-zoom:hover img {
  transform: scale(1.08);
}

/* Link Underline Animation */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Focus Visible Enhancement */
*:focus-visible {
  outline: 3px solid #EF4424;
  outline-offset: 3px;
  transition: outline-offset 0.2s ease;
}

/* Loading Skeleton Animation */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* Pulse Animation for Notifications */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Membership Pricing Cards */
.pricing-card,
.membership-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.membership-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--color-secondary, #EF4424);
}

/* Pricing Grid Responsive */
.pricing-grid {
  display: grid;
  gap: 2rem;
}

@media screen and (min-width: 992px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
  }
  
  /* Reset scale for most popular on tablet */
  .pricing-card[style*="scale"] {
    transform: scale(1) !important;
  }
  
  .pricing-card[style*="scale"]:hover {
    transform: translateY(-8px) !important;
  }
}

@media screen and (max-width: 767px) {
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  /* Reset scale for most popular on mobile */
  .pricing-card[style*="scale"] {
    transform: scale(1) !important;
  }
  
  .pricing-card[style*="scale"]:hover {
    transform: translateY(-8px) !important;
  }
  
  /* Adjust badge position on mobile */
  .popular-badge {
    top: -10px !important;
    font-size: 11px !important;
    padding: 3px 12px !important;
  }
}

/* Navigation Dropdown Menu Animations */
.navbar1_dropdown-list,
.w-dropdown-list {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.w-dropdown.w--open .navbar1_dropdown-list,
.w-dropdown.w--open .w-dropdown-list {
  opacity: 1;
  transform: translateY(0);
}

/* Dropdown Link Hover - Left-to-Right Underline */
.navbar1_dropdown-link,
.w-dropdown-link {
  position: relative;
  transition: color 0.2s ease;
}

.navbar1_dropdown-link::after,
.w-dropdown-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.navbar1_dropdown-link:hover::after,
.w-dropdown-link:hover::after {
  width: 100%;
}

/* Active Link Indicator - Animated Underline */
.navbar1_link,
.navbar1_dropdown-link,
.w-nav-link,
.w-dropdown-link {
  position: relative;
  transition: color 0.2s ease;
}

.navbar1_link.w--current,
.navbar1_dropdown-link.w--current,
.w-nav-link.w--current,
.w-dropdown-link.w--current {
  position: relative;
}

.navbar1_link.w--current::after,
.navbar1_dropdown-link.w--current::after,
.w-nav-link.w--current::after,
.w-dropdown-link.w--current::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-secondary, #EF4424);
  animation: underlineGrow 0.4s ease forwards;
}

@keyframes underlineGrow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Main Nav Link Hover - Smooth Underline */
.navbar1_link:not(.w--current):hover::before,
.w-nav-link:not(.w--current):hover::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  opacity: 0.5;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.5;
  }
}

/* Membership Page Hero Section - Compact Layout */
.section_header1 .padding-section-large {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.section_header1 .header1_content {
  grid-column-gap: 3rem !important;
  grid-row-gap: 2.5rem !important;
}

.section_header1 .header1_image {
  aspect-ratio: 4/3 !important;
  max-height: 400px;
}

@media screen and (max-width: 991px) {
  .section_header1 .padding-section-large {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  .section_header1 .header1_content {
    grid-row-gap: 2rem !important;
  }
  
  .section_header1 .header1_image {
    max-height: 350px;
  }
}

@media screen and (max-width: 767px) {
  .section_header1 .padding-section-large {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .section_header1 .header1_content {
    grid-row-gap: 1.5rem !important;
  }
  
  .section_header1 .header1_image {
    max-height: 300px;
  }
}

/* Membership Pricing Buttons - Make them red by default for visibility */
.pricing32_plan .button.w-button,
.pricing5_plan .button.w-button {
  background-color: #EF4424 !important;
  color: white !important;
  border: none !important;
}

.pricing32_plan .button.w-button:hover,
.pricing5_plan .button.w-button:hover {
  background-color: #D93D1F !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 36, 0.3);
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
