/* =============================================================================
   CALENDLY BOOKING SECTION
   ============================================================================= */

/* Section Container - Contains aurora effect */
.booking-section {
  position: relative;
  padding: 3rem 0;
  overflow: hidden;
  /* CRITICAL: Prevents aurora blur bleeding */
}

/* Aurora Gradient Background - Animated color waves */
.booking-aurora-bg {
  position: absolute;
  inset: -20%;
  /* Extend beyond container for blur edge safety */
  /* 2025 Enhanced: Added violet layer */
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(58, 183, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(19, 222, 165, 0.12), transparent),
    radial-gradient(ellipse 50% 50% at 50% 30%, rgba(167, 139, 250, 0.08), transparent);
  filter: blur(60px);
  animation: aurora-shift 10s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes aurora-shift {
  0% {
    transform: translateX(-15%) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: translateX(5%) scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: translateX(15%) scale(1);
    opacity: 0.6;
  }
}

/* Glassmorphism Container + Floating Effect */
.booking-container {
  position: relative;
  z-index: 1;
  max-width: 750px;
  margin: 0 auto;
  padding: 1.5rem;
  background: rgba(26, 31, 39, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-muted);
  border-radius: 1.5rem;

  /* FLOATING EFFECT - Multi-layer depth shadows */
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.5),
    0 30px 60px -15px rgba(0, 0, 0, 0.4),
    0 10px 20px -5px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 80px -20px rgba(58, 183, 255, 0.15);

  /* Smooth transition for hover lift */
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;

  /* Initial state for animation */
  will-change: transform, box-shadow;
}

/* HOVER LIFT - Card rises on hover */
.booking-container:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 60px 120px -20px rgba(0, 0, 0, 0.55),
    0 40px 80px -15px rgba(0, 0, 0, 0.45),
    0 15px 30px -5px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 100px -20px rgba(58, 183, 255, 0.25);
}

/* Glow Pulse Border Effect */
.booking-glow {
  position: absolute;
  inset: -2px;
  border-radius: 1.6rem;
  /* 2025 Enhanced: Added violet to glow gradient */
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-tertiary),
      var(--accent-secondary),
      var(--accent-primary));
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0.3;
  animation: glow-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.3;
    background-position: 0% 50%;
  }

  50% {
    opacity: 0.5;
    background-position: 100% 50%;
  }
}

/* 
 * SCROLL ENTRANCE - Override default [data-animate] for booking container
 * Uses higher specificity to override generic animation while 
 * still leveraging existing setupReveal() observer
 */
.booking-container[data-animate] {
  filter: none;
  /* Override default blur */
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-container[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header Styling */
.booking-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-muted);
}

.booking-header h2 {
  margin: 0.5rem 0;
}

/* Calendly Wrapper - Contains the widget with rounded corners */
.calendly-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--bg-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) inset;
}

/* Ensure Calendly widget fits properly */
.calendly-inline-widget {
  width: 100%;
  border: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .booking-container {
    max-width: 100%;
    padding: 1rem;
    margin: 0 1rem;
  }

  .booking-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .calendly-inline-widget {
    height: 550px !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .booking-aurora-bg {
    animation: none;
    opacity: 0.5;
  }

  .booking-glow {
    animation: none;
    opacity: 0.3;
  }

  .booking-container[data-animate] {
    opacity: 1;
    transform: none;
  }
}