/* =========================================================
   SCIATICA TREATMENT REDESIGN - 3 SECTIONS
   ========================================================= */

/* =========================================================
   SECTION 1: COMMON CAUSES OF SCIATICA - CAUSE CARDS
   ========================================================= */

.cause-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cause-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(13, 76, 136, 0.1);
  box-shadow: 0 22px 62px rgba(14, 34, 56, 0.1);
  background: rgba(255, 255, 255, 0.82);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  backdrop-filter: blur(4px);
}

/* Alternating card backgrounds - Blue/Green */
.cause-card:nth-child(odd) {
  background: linear-gradient(135deg, rgba(13, 76, 136, 0.08) 0%, rgba(255, 255, 255, 0.88) 100%),
              radial-gradient(circle at right bottom, rgba(183, 216, 20, 0.12), transparent 50%);
}

.cause-card:nth-child(even) {
  background: linear-gradient(135deg, rgba(115, 201, 69, 0.08) 0%, rgba(255, 255, 255, 0.88) 100%),
              radial-gradient(circle at left top, rgba(13, 76, 136, 0.12), transparent 50%);
}

.cause-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 38px 90px rgba(13, 76, 136, 0.18);
  border-color: rgba(13, 76, 136, 0.2);
}

/* Staggered animation delays */
.cause-card:nth-child(1) {
  animation-delay: 0ms;
}

.cause-card:nth-child(2) {
  animation-delay: 80ms;
}

.cause-card:nth-child(3) {
  animation-delay: 160ms;
}

.cause-card:nth-child(4) {
  animation-delay: 240ms;
}

.cause-card:nth-child(5) {
  animation-delay: 320ms;
}

.cause-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.cause-card__icon {
  font-size: 2.8rem;
  line-height: 1;
  display: block;
  animation: gentle-bounce 4.2s ease-in-out infinite;
}

.cause-card:nth-child(2) .cause-card__icon {
  animation-delay: 0.15s;
}

.cause-card:nth-child(3) .cause-card__icon {
  animation-delay: 0.3s;
}

.cause-card:nth-child(4) .cause-card__icon {
  animation-delay: 0.45s;
}

.cause-card:nth-child(5) .cause-card__icon {
  animation-delay: 0.6s;
}

.cause-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--navy-950);
  font-weight: 800;
  line-height: 1.2;
}

.cause-card__description {
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--slate-700);
  line-height: 1.6;
}

/* =========================================================
   SECTION 2: RECOVERY PHASES - 4 PHASE CARDS
   ========================================================= */

.recovery-phases-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  position: relative;
}

/* Subtle progression bar connecting all phases */
.recovery-phases-grid::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 60px;
  height: 3px;
  background: linear-gradient(90deg,
    var(--brand-blue-900) 0%,
    var(--brand-blue-900) 24%,
    var(--brand-lime-700) 25%,
    var(--brand-lime-700) 49%,
    var(--brand-blue-900) 50%,
    var(--brand-blue-900) 74%,
    var(--brand-lime-700) 75%,
    var(--brand-lime-700) 100%);
  border-radius: 999px;
  z-index: 0;
}

.recovery-phase {
  position: relative;
  z-index: 1;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid rgba(13, 76, 136, 0.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 54px rgba(14, 34, 56, 0.08);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Alternating blue/green gradients for recovery phase cards */
.recovery-phase:nth-child(odd) {
  background: linear-gradient(135deg, rgba(13, 76, 136, 0.22), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(13, 76, 136, 0.3);
}

.recovery-phase:nth-child(even) {
  background: linear-gradient(135deg, rgba(115, 201, 69, 0.22), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(115, 201, 69, 0.3);
}

/* Alternating badge colors - Blue/Green */
.recovery-phase:nth-child(odd) .recovery-phase__badge {
  background: linear-gradient(135deg, var(--brand-blue-900), var(--brand-blue-700));
  color: var(--white);
}

.recovery-phase:nth-child(even) .recovery-phase__badge {
  background: linear-gradient(135deg, #73c945, #88d96a);
  color: var(--white);
}

.recovery-phase:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 80px rgba(13, 76, 136, 0.15);
  border-color: rgba(13, 76, 136, 0.2);
}

/* Staggered animation delays */
.recovery-phase:nth-child(1) {
  animation-delay: 0ms;
}

.recovery-phase:nth-child(2) {
  animation-delay: 80ms;
}

.recovery-phase:nth-child(3) {
  animation-delay: 160ms;
}

.recovery-phase:nth-child(4) {
  animation-delay: 240ms;
}

.recovery-phase__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 12px;
  box-shadow: 0 12px 32px rgba(13, 76, 136, 0.2);
}

.recovery-phase__icon {
  font-size: 2.4rem;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
  animation: gentle-bounce 4s ease-in-out infinite;
}

.recovery-phase:nth-child(2) .recovery-phase__icon {
  animation-delay: 0.2s;
}

.recovery-phase:nth-child(3) .recovery-phase__icon {
  animation-delay: 0.4s;
}

.recovery-phase:nth-child(4) .recovery-phase__icon {
  animation-delay: 0.6s;
}

.recovery-phase__content h3 {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--navy-950);
  font-weight: 800;
  line-height: 1.2;
}

.recovery-phase__content p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--slate-700);
  line-height: 1.5;
}

/* Subtle progress fill animation */
.recovery-phase__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--brand-blue-900), var(--brand-lime-700));
  transform-origin: left;
  transform: scaleX(0);
  animation: phase-progress 6s ease-in-out infinite;
}

.recovery-phase:nth-child(2) .recovery-phase__progress {
  animation-delay: 1.5s;
}

.recovery-phase:nth-child(3) .recovery-phase__progress {
  animation-delay: 3s;
}

.recovery-phase:nth-child(4) .recovery-phase__progress {
  animation-delay: 4.5s;
}

@keyframes phase-progress {
  0%, 100% {
    transform: scaleX(0);
  }
  50% {
    transform: scaleX(1);
  }
}

/* =========================================================
   SECTION 3: FAQ CARDS - EXPANDABLE FAQ ITEMS
   ========================================================= */

.faq-cards-list {
  display: grid;
  gap: 14px;
}

.faq-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(13, 76, 136, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(14, 34, 56, 0.08);
  transition: all 0.3s ease;
}

/* Alternating blue/green gradients for FAQ cards */
.faq-card:nth-child(odd) {
  background: linear-gradient(135deg, rgba(13, 76, 136, 0.22), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(13, 76, 136, 0.3);
}

.faq-card:nth-child(even) {
  background: linear-gradient(135deg, rgba(115, 201, 69, 0.22), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(115, 201, 69, 0.3);
}

.faq-card__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  color: var(--navy-950);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-card:hover .faq-card__trigger {
  background: rgba(13, 76, 136, 0.02);
}

.faq-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.faq-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(13, 76, 136, 0.15);
}

/* Alternating badge colors - Blue/Green/Blue/Green pattern */
.faq-card:nth-child(1) .faq-card__badge,
.faq-card:nth-child(3) .faq-card__badge,
.faq-card:nth-child(5) .faq-card__badge,
.faq-card:nth-child(7) .faq-card__badge {
  background: linear-gradient(135deg, var(--brand-blue-900), var(--brand-blue-700));
}

.faq-card:nth-child(2) .faq-card__badge,
.faq-card:nth-child(4) .faq-card__badge,
.faq-card:nth-child(6) .faq-card__badge {
  background: linear-gradient(135deg, #73c945, #88d96a);
}

.faq-card__header h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--navy-950);
  font-weight: 800;
  line-height: 1.3;
}

.faq-card__icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  display: block;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  animation: gentle-bounce 4.2s ease-in-out infinite;
}

.faq-card:nth-child(2) .faq-card__icon {
  animation-delay: 0.2s;
}

.faq-card:nth-child(3) .faq-card__icon {
  animation-delay: 0.4s;
}

.faq-card:nth-child(4) .faq-card__icon {
  animation-delay: 0.6s;
}

.faq-card:nth-child(5) .faq-card__icon {
  animation-delay: 0.8s;
}

.faq-card:nth-child(6) .faq-card__icon {
  animation-delay: 1s;
}

.faq-card:nth-child(7) .faq-card__icon {
  animation-delay: 1.2s;
}

.faq-card.is-open .faq-card__icon {
  transform: rotate(45deg);
}

.faq-card__answer {
  max-height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(243, 248, 251, 0.92), rgba(255, 255, 255, 0.96));
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.faq-card.is-open .faq-card__answer {
  max-height: 600px;
}

.faq-card__answer p {
  margin: 0;
  padding: 24px;
  font-size: 0.92rem;
  color: var(--slate-700);
  line-height: 1.7;
}

/* Staggered animation delays for FAQ cards */
.faq-card:nth-child(1) {
  animation-delay: 0ms;
}

.faq-card:nth-child(2) {
  animation-delay: 80ms;
}

.faq-card:nth-child(3) {
  animation-delay: 160ms;
}

.faq-card:nth-child(4) {
  animation-delay: 240ms;
}

.faq-card:nth-child(5) {
  animation-delay: 320ms;
}

.faq-card:nth-child(6) {
  animation-delay: 400ms;
}

.faq-card:nth-child(7) {
  animation-delay: 480ms;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

/* Tablet (768px and below) */
@media (max-width: 980px) {
  .cause-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recovery-phases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recovery-phases-grid::before {
    display: none;
  }
}

/* Mobile (480px and below) */
@media (max-width: 720px) {
  .cause-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cause-card {
    padding: 22px;
  }

  .cause-card:hover {
    transform: translateY(-8px);
  }

  .cause-card__icon {
    font-size: 2.2rem;
  }

  .recovery-phases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .recovery-phase {
    padding: 22px;
  }

  .recovery-phase:hover {
    transform: translateY(-8px);
  }

  .recovery-phase__badge {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .recovery-phase__icon {
    font-size: 2rem;
  }

  .faq-card__trigger {
    padding: 18px 20px;
  }

  .faq-card__header {
    gap: 12px;
  }

  .faq-card__badge {
    min-width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .faq-card__icon {
    font-size: 1.6rem;
  }

  .faq-card__answer p {
    padding: 20px;
    font-size: 0.88rem;
  }

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

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes gentle-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Ensure reveal-up animations work properly with staggered delays */
.cause-card.reveal-up,
.recovery-phase.reveal-up,
.faq-card.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.cause-card.reveal-up.is-visible,
.recovery-phase.reveal-up.is-visible,
.faq-card.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation stagger adjustment for proper reveal timing */
.cause-card.reveal-up:nth-child(2).is-visible {
  transition-delay: 0.08s;
}

.cause-card.reveal-up:nth-child(3).is-visible {
  transition-delay: 0.16s;
}

.cause-card.reveal-up:nth-child(4).is-visible {
  transition-delay: 0.24s;
}

.cause-card.reveal-up:nth-child(5).is-visible {
  transition-delay: 0.32s;
}

.recovery-phase.reveal-up:nth-child(2).is-visible {
  transition-delay: 0.08s;
}

.recovery-phase.reveal-up:nth-child(3).is-visible {
  transition-delay: 0.16s;
}

.recovery-phase.reveal-up:nth-child(4).is-visible {
  transition-delay: 0.24s;
}

.faq-card.reveal-up:nth-child(2).is-visible {
  transition-delay: 0.08s;
}

.faq-card.reveal-up:nth-child(3).is-visible {
  transition-delay: 0.16s;
}

.faq-card.reveal-up:nth-child(4).is-visible {
  transition-delay: 0.24s;
}

.faq-card.reveal-up:nth-child(5).is-visible {
  transition-delay: 0.32s;
}

.faq-card.reveal-up:nth-child(6).is-visible {
  transition-delay: 0.40s;
}

.faq-card.reveal-up:nth-child(7).is-visible {
  transition-delay: 0.48s;
}

/* =========================================================
   WHY CHOOSE DR. ZOPE - CHOICE CARDS GRID
   ========================================================= */

.choice-intro {
  margin: 24px 0 48px 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--navy-950);
  max-width: 760px;
}

.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 48px 0;
}

.why-choose-card {
  position: relative;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(13, 76, 136, 0.08);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(28px);
  animation: reveal-up-choice-card 0.7s ease forwards;
  animation-delay: calc(var(--card-index, 0) * 80ms);
  overflow: hidden;
}

@keyframes reveal-up-choice-card {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.why-choose-card:nth-child(1),
.why-choose-card:nth-child(3),
.why-choose-card:nth-child(5) {
  background: linear-gradient(
    135deg,
    rgba(13, 76, 136, 0.08) 0%,
    rgba(13, 76, 136, 0.04) 100%
  );
}

.why-choose-card:nth-child(2),
.why-choose-card:nth-child(4),
.why-choose-card:nth-child(6) {
  background: linear-gradient(
    135deg,
    rgba(183, 216, 20, 0.12) 0%,
    rgba(183, 216, 20, 0.05) 100%
  );
}

.why-choose-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 32px 90px rgba(13, 76, 136, 0.18);
}

.why-choose-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin-bottom: 16px;
  line-height: 1;
}

.why-choose-card h3 {
  font-size: 1.35rem;
  font-family: var(--font-serif);
  color: var(--brand-blue-900);
  margin: 0 0 12px 0;
  font-weight: 700;
  line-height: 1.3;
}

.why-choose-card p {
  font-size: 0.95rem;
  color: var(--slate-700);
  line-height: 1.6;
  margin: 0;
}

.why-choose-card:nth-child(2)::before,
.why-choose-card:nth-child(4)::before,
.why-choose-card:nth-child(6)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-lime-700);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.choice-highlight {
  margin-top: 48px;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(183, 216, 20, 0.16) 0%,
    rgba(13, 76, 136, 0.08) 100%
  );
  border: 1px solid rgba(183, 216, 20, 0.3);
  box-shadow: 0 16px 48px rgba(183, 216, 20, 0.08);
  opacity: 0;
  transform: translateY(28px);
  animation: reveal-up-choice-card 0.7s ease forwards;
  animation-delay: 480ms;
}

.choice-highlight__content {
  max-width: 760px;
}

.choice-highlight h3 {
  font-size: 1.45rem;
  font-family: var(--font-serif);
  color: var(--brand-blue-900);
  margin: 0 0 12px 0;
  font-weight: 700;
}

.choice-highlight p {
  font-size: 1rem;
  color: var(--slate-700);
  line-height: 1.7;
  margin: 0;
}

/* =========================================================
   RESPONSIVE - WHY CHOOSE SECTION
   ========================================================= */

@media (max-width: 1199px) {
  .why-choose-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .why-choose-card {
    padding: 28px 22px;
  }

  .why-choose-card h3 {
    font-size: 1.25rem;
  }

  .why-choose-card__icon {
    font-size: 2.4rem;
  }
}

@media (max-width: 767px) {
  .why-choose-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 36px 0;
  }

  .choice-intro {
    margin: 18px 0 36px 0;
    font-size: 1rem;
  }

  .why-choose-card {
    padding: 24px 20px;
  }

  .why-choose-card h3 {
    font-size: 1.1rem;
  }

  .why-choose-card p {
    font-size: 0.9rem;
  }

  .why-choose-card__icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
  }

  .choice-highlight {
    margin-top: 32px;
    padding: 24px 20px;
  }

  .choice-highlight h3 {
    font-size: 1.25rem;
  }

  .choice-highlight p {
    font-size: 0.95rem;
  }
}

@media (max-width: 479px) {
  .why-choose-grid {
    gap: 16px;
    margin: 28px 0;
  }

  .choice-intro {
    margin: 16px 0 28px 0;
    font-size: 0.95rem;
  }

  .why-choose-card {
    padding: 20px 18px;
  }

  .why-choose-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .why-choose-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .why-choose-card__icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .choice-highlight {
    margin-top: 24px;
    padding: 20px 18px;
  }

  .choice-highlight h3 {
    font-size: 1.1rem;
  }

  .choice-highlight p {
    font-size: 0.9rem;
  }
}
