/* ============================================
   SPINAL DISC SURGERY - UNIQUE CARD REDESIGN
   Creative, perspective-changing card designs
   ============================================ */

/* Scroll Reveal Base */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ============================================
   HEXAGONAL FLOATING TIMELINE CARDS
   ============================================ */

.timeline__item {
  position: relative;
  perspective: 1000px;
}

.timeline__item div[style*="min-height"] {
  will-change: transform, box-shadow;
}

.timeline__item:hover div[style*="min-height"] {
  transform: translateY(-12px) rotateX(2deg);
  box-shadow: -12px 32px 64px rgba(22, 130, 202, 0.25),
              0 12px 24px rgba(13, 76, 136, 0.18) !important;
}

.timeline__item:hover .week-badge {
  transform: translateX(-50%) scale(1.12) rotateZ(-8deg);
  box-shadow: 0 16px 42px rgba(0, 116, 190, 0.4) !important;
}

.timeline__item:hover div[style*="font-size: 48px"] {
  transform: scale(1.15) rotate(-12deg);
  animation: icon-bounce 0.6s ease infinite;
}

@keyframes icon-bounce {
  0%, 100% { transform: scale(1.15) rotate(-12deg) translateY(0); }
  50% { transform: scale(1.15) rotate(-12deg) translateY(-8px); }
}

/* Gradient border animation */
.timeline__item div[style*="clip-path"]:hover {
  filter: drop-shadow(0 0 12px rgba(22, 130, 202, 0.3));
}

/* ============================================
   ASYMMETRICAL PROCEDURE CARDS
   ============================================ */

.procedure-card {
  position: relative;
  overflow: visible;
  will-change: transform, filter;
}

.procedure-card:hover {
  transform: translateY(-16px);
  filter: drop-shadow(0 28px 56px rgba(13, 76, 136, 0.25));
}

.procedure-card:hover div[style*="width: 72px"],
.procedure-card:hover div[style*="width: 64px"] {
  transform: scale(1.2) rotate(12deg);
  animation: float-icon 0.8s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% { transform: scale(1.2) rotate(12deg) translateY(0); }
  50% { transform: scale(1.2) rotate(12deg) translateY(-12px); }
}

.procedure-card:hover {
  background: linear-gradient(135deg, rgba(22, 130, 202, 0.18), rgba(255, 255, 255, 0.6)) !important;
  border-color: rgba(22, 130, 202, 0.4) !important;
}

.procedure-card:nth-child(2):hover,
.procedure-card:nth-child(4):hover {
  background: linear-gradient(135deg, rgba(115, 201, 69, 0.18), rgba(255, 255, 255, 0.6)) !important;
  border-color: rgba(115, 201, 69, 0.4) !important;
}

/* ============================================
   PATH DECISION CARDS
   ============================================ */

.path-card {
  position: relative;
  will-change: transform, filter, background;
}

.path-card:hover {
  transform: translateY(-14px) rotateX(3deg);
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.15));
  background: linear-gradient(135deg, rgba(117, 201, 69, 0.24), rgba(255, 255, 255, 0.7)) !important;
}

.path-card:nth-child(2):hover {
  background: linear-gradient(135deg, rgba(22, 130, 202, 0.24), rgba(255, 255, 255, 0.7)) !important;
}

.path-card:nth-child(3):hover {
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.18), rgba(255, 255, 255, 0.7)) !important;
}

.path-card:hover div[style*="width: 56px"] {
  transform: scale(1.25) rotate(-15deg);
  animation: bounce-icon 0.7s ease-in-out infinite;
}

@keyframes bounce-icon {
  0%, 100% { transform: scale(1.25) rotate(-15deg) translateY(0); }
  50% { transform: scale(1.25) rotate(-15deg) translateY(-10px); }
}

.path-card:hover div[style*="border-bottom"] {
  border-bottom-color: rgba(22, 130, 202, 0.35) !important;
}

/* ============================================
   STAGGERED ANIMATION DELAYS
   ============================================ */

.procedure-card:nth-child(1) { animation-delay: 0ms; }
.procedure-card:nth-child(2) { animation-delay: 80ms; }
.procedure-card:nth-child(3) { animation-delay: 160ms; }
.procedure-card:nth-child(4) { animation-delay: 240ms; }

.path-card:nth-child(1) { animation-delay: 0ms; }
.path-card:nth-child(2) { animation-delay: 80ms; }
.path-card:nth-child(3) { animation-delay: 160ms; }

.timeline__item:nth-child(1) { animation-delay: 0ms; }
.timeline__item:nth-child(2) { animation-delay: 80ms; }
.timeline__item:nth-child(3) { animation-delay: 160ms; }
.timeline__item:nth-child(4) { animation-delay: 240ms; }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1200px) {
  .procedure-card:nth-child(1) { grid-row: auto; }
  .procedure-card:nth-child(4) { grid-column: auto; grid-row: auto; }

  .procedure-card {
    padding: 36px 28px;
  }

  .timeline__item:hover div[style*="min-height"] {
    transform: translateY(-8px) rotateX(1deg);
  }
}

@media (max-width: 768px) {
  .reveal-up {
    animation-delay: 0ms !important;
  }

  .procedure-card {
    grid-column: span 1 !important;
    padding: 32px 24px;
  }

  .path-card {
    padding: 32px 24px;
  }

  .timeline__item {
    grid-template-columns: 1fr !important;
  }

  .procedure-card:hover,
  .path-card:hover,
  .timeline__item:hover div[style*="min-height"] {
    transform: translateY(-6px);
  }

  .timeline__item:hover .week-badge {
    transform: translateX(-50%) scale(1.08);
  }

  div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .procedure-card {
    padding: 28px 20px;
  }

  .path-card {
    padding: 28px 20px;
  }

  div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  .procedure-card div[style*="width: 72px"],
  .procedure-card div[style*="width: 64px"] {
    width: 56px !important;
    height: 56px !important;
    font-size: 28px !important;
  }

  .procedure-card h3,
  .path-card h3 {
    font-size: 20px !important;
  }
}

/* ============================================
   UNIQUE FAQ CARD DESIGNS
   ============================================ */

.faq-card {
  position: relative;
  will-change: transform, box-shadow, background;
}

.faq-card__trigger {
  position: relative;
  will-change: transform;
}

.faq-card__trigger:hover {
  transform: translateX(8px);
}

.faq-card__trigger:hover div[style*="width: 48px"] {
  transform: scale(1.2) rotate(12deg);
}

.faq-card__icon {
  will-change: transform;
}

/* Opened FAQ Cards */
.faq-card.is-open {
  background: linear-gradient(135deg, rgba(22, 130, 202, 0.22), rgba(255, 255, 255, 0.7)) !important;
  border-color: rgba(22, 130, 202, 0.4) !important;
  box-shadow: 0 20px 48px rgba(22, 130, 202, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.faq-card:nth-child(2).is-open,
.faq-card:nth-child(4).is-open,
.faq-card:nth-child(6).is-open {
  background: linear-gradient(135deg, rgba(115, 201, 69, 0.22), rgba(255, 255, 255, 0.7)) !important;
  border-color: rgba(115, 201, 69, 0.4) !important;
  box-shadow: 0 20px 48px rgba(115, 201, 69, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.faq-card.is-open .faq-card__icon {
  transform: rotate(45deg);
  background: rgba(13, 76, 136, 0.2) !important;
}

.faq-card:nth-child(2).is-open .faq-card__icon,
.faq-card:nth-child(4).is-open .faq-card__icon,
.faq-card:nth-child(6).is-open .faq-card__icon {
  background: rgba(115, 201, 69, 0.2) !important;
}

.faq-card__answer {
  will-change: max-height;
  overflow: hidden;
}

.faq-card.is-open .faq-card__answer {
  max-height: 500px;
  opacity: 1;
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .reveal-up {
    opacity: 1;
    transform: translateY(0);
  }

  .procedure-card:hover,
  .path-card:hover,
  .timeline__item:hover div[style*="min-height"],
  .faq-card__trigger:hover {
    transform: none;
  }
}
