/* =========================
   PÁGINA TERAPIAS
========================= */
.therapies-page {
  padding: 22px 0 46px;
}

.therapy-section {
  padding: 0 0 64px;
}

.therapy-section-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* =========================
   CARD PRINCIPAL
========================= */
.therapy-card {
  position: relative;
  width: 100%;
  perspective: 1400px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.therapy-face {
  width: 100%;
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 16px 18px 28px rgba(85, 92, 140, 0.20);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.therapy-front {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  min-height: 470px;
}

.therapy-back {
  display: none;
}

/* =========================
   MEDIA / IMAGEN
========================= */
.therapy-media {
  position: relative;
  min-height: 470px;
  background: #dfe9ff;
  overflow: hidden;
  isolation: isolate;
}

.therapy-main-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.therapy-title-overlay {
  position: absolute;
  top: 56px;
  left: 42px;
  z-index: 3;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* =========================
   BENEFICIOS DESKTOP
========================= */
.therapy-benefits {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 38px;
  background: rgba(255, 255, 255, 0.98);
}

.therapy-benefits-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.benefit-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  column-gap: 18px;
}

.benefit-icon-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon-circle img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.benefit-icon-circle.red {
  background: #ff4b4b;
}

.benefit-icon-circle.green {
  background: #73a834;
}

.benefit-icon-circle.blue-soft {
  background: #dfe8ff;
}

.benefit-text {
  margin: 0;
  color: #50545b;
  font-size: 1rem;
  line-height: 1.28;
  font-weight: 600;
}

/* =========================
   TARJETA IDEAL
========================= */
.ideal-card {
  width: min(100%, 930px);
  margin: 0 auto;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 16px 18px 28px rgba(85, 92, 140, 0.20);
}

.ideal-card-inner {
  padding: 30px 36px 34px;
}

.ideal-title {
  margin: 0 0 20px;
  text-align: center;
  color: var(--blue, #1f62e8);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
  font-weight: 800;
}

.ideal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 560px);
  margin: 0 auto;
}

.ideal-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  column-gap: 14px;
}

.ideal-check {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue, #1f62e8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(31, 98, 232, 0.20);
}

.ideal-item p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 600;
  color: #4f5258;
}

/* =========================
   REVERSO MÓVIL
========================= */
.therapy-back-inner {
  padding: 28px 24px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.therapy-back-title {
  margin: 0 0 20px;
  text-align: center;
  color: var(--blue, #1f62e8);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* =========================
   HINT MÓVIL
========================= */
.flip-hint {
  display: none;
}

@keyframes hintFloat {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
  100% { transform: translateX(-50%) translateY(0); }
}

/* =========================
   CARRUSEL
========================= */
.therapy-carousel {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5.1;
  border-radius: 30px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 12px 16px 24px rgba(61, 78, 143, 0.16);
  cursor: grab;
  user-select: none;
}

.carousel-track.dragging {
  cursor: grabbing;
}

.carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.carousel-image.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfd5ec;
  transition: transform 0.25s ease, background 0.25s ease;
}

.dot.active {
  background: #9ea9d8;
  transform: scale(1.08);
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
  .therapy-front {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    min-height: 400px;
  }

  .therapy-media {
    min-height: 400px;
  }

  .therapy-benefits {
    padding: 30px 26px;
  }

  .therapy-benefits-inner {
    gap: 20px;
  }

  .benefit-item {
    grid-template-columns: 62px 1fr;
    column-gap: 14px;
  }

  .benefit-icon-circle {
    width: 54px;
    height: 54px;
  }

  .benefit-icon-circle img {
    width: 28px;
    height: 28px;
  }

  .benefit-text {
    font-size: 0.96rem;
  }

  .ideal-card-inner {
    padding: 28px 26px 30px;
  }
}

/* =========================
   MÓVIL
========================= */
@media (max-width: 768px) {
  .therapies-page {
    padding: 8px 0 34px;
  }

  .therapy-section {
    padding-bottom: 46px;
  }

  .therapy-section-inner {
    gap: 20px;
  }

  .therapy-card {
    height: 420px;
    transform-style: preserve-3d;
    transition: transform 0.75s ease;
  }

  .therapy-card.is-flipped {
    transform: rotateY(180deg);
  }

  .therapy-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 28px;
  }

  .therapy-front {
    display: block;
    min-height: 420px;
    height: 420px;
  }

  .therapy-back {
    display: flex;
    transform: rotateY(180deg);
    min-height: 420px;
    height: 420px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
  }

  .desktop-benefits {
    display: none;
  }

  .therapy-media {
    min-height: 420px;
    height: 420px;
    border-radius: 28px;
  }

  .therapy-title-overlay {
    top: 46px;
    left: 24px;
    right: 24px;
    text-align: center;
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .flip-hint {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 4;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.20);
    animation: hintFloat 1.6s ease-in-out infinite;
    pointer-events: none;
  }

  .therapy-back-inner {
    width: 100%;
    padding: 28px 22px;
  }

  .therapy-back-title {
    font-size: 1.55rem;
    margin-bottom: 22px;
  }

  .therapy-benefits-inner {
    gap: 18px;
  }

  .benefit-item {
    grid-template-columns: 56px 1fr;
    column-gap: 14px;
    align-items: center;
  }

  .benefit-icon-circle {
    width: 48px;
    height: 48px;
  }

  .benefit-icon-circle img {
    width: 24px;
    height: 24px;
  }

  .benefit-text {
    font-size: 0.97rem;
    line-height: 1.28;
  }

  .ideal-card {
    width: 100%;
    border-radius: 28px;
  }

  .ideal-card-inner {
    padding: 24px 20px 26px;
  }

  .ideal-title {
    font-size: 1.25rem;
    margin-bottom: 18px;
  }

  .ideal-list {
    gap: 12px;
    width: 100%;
  }

  .ideal-item {
    grid-template-columns: 34px 1fr;
    column-gap: 12px;
  }

  .ideal-check {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .ideal-item p {
    font-size: 0.98rem;
    line-height: 1.26;
  }

  .therapy-carousel {
    max-width: 310px;
    gap: 12px;
  }

  .carousel-track {
    border-radius: 26px;
    aspect-ratio: 4 / 5.2;
  }
}

/* =========================
   EXTRA SMALL
========================= */
@media (max-width: 420px) {
  .therapy-card,
  .therapy-front,
  .therapy-back,
  .therapy-media {
    height: 390px;
    min-height: 390px;
  }

  .therapy-title-overlay {
    top: 40px;
    font-size: clamp(2.6rem, 15vw, 4.3rem);
  }

  .benefit-text {
    font-size: 0.93rem;
  }
}