/* =========================================================
   PÁGINAS DE CADA TRATAMIENTO (neuromoduladores.html, etc.)
   Estilo inspirado en la cabecera "media animada":
   foto a la derecha que se funde con el fondo y se mueve
   despacio, y a la izquierda título, descripción y botones.
   ========================================================= */

/* ---------- Cabecera animada ---------- */
.trat-hero {
  position: relative;
  min-height: min(calc(100vh - 115px), 760px);
  padding: 0;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.trat-hero-media {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 60%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 32%);
          mask-image: linear-gradient(to right, transparent 0%, #000 32%);
  opacity: 0;
  animation: tratAparecer 1.4s ease .1s forwards;
}
.trat-hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: 60% 40%;
  animation: tratZoom 18s ease-in-out infinite alternate;
}
.trat-hero .container { position: relative; z-index: 2; padding: 90px 0 80px; }
.trat-hero-text { max-width: 560px; }
.trat-crumbs { font-size: .8rem; color: var(--gray); margin-bottom: 1.4rem; }
.trat-crumbs a:hover { color: var(--gold-dark); }
.trat-hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -.01em;
  color: var(--ink); margin: .5rem 0 1.2rem;
}
.trat-hero .lead-text { font-size: 1.02rem; line-height: 1.75; color: #444; max-width: 540px; margin-bottom: 2rem; text-shadow: 0 0 18px #fff, 0 0 2px #fff; }
.trat-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.trat-actions .btn { padding: 15px 28px; }
.trat-actions svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-outline-gold {
  border: 2px solid var(--gold); color: var(--ink); background: #fff;
}
.btn-outline-gold:hover { background: var(--gold-metal); color: var(--gold-ink); border-color: var(--gold); transform: translateY(-2px); }

/* Entrada escalonada del texto */
.trat-anim { opacity: 0; transform: translateY(26px); animation: tratSubir .9s cubic-bezier(.2,.7,.2,1) forwards; }
.trat-anim.d1 { animation-delay: .15s; }
.trat-anim.d2 { animation-delay: .3s; }
.trat-anim.d3 { animation-delay: .45s; }
.trat-anim.d4 { animation-delay: .6s; }

/* Indicador para bajar */
.trat-scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 3; width: 26px; height: 42px; border: 2px solid var(--gold); border-radius: 20px;
  display: block;
}
.trat-scroll::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--gold); animation: tratRueda 1.6s ease-in-out infinite;
}

@keyframes tratZoom { from { transform: scale(1); } to { transform: scale(1.1) translateX(-1.5%); } }
@keyframes tratAparecer { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes tratSubir { to { opacity: 1; transform: none; } }
@keyframes tratRueda { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Características + formulario ---------- */
.trat-caract { background: var(--bg-alt); scroll-margin-top: 90px; }
.trat-caract-grid { display: grid; grid-template-columns: 1fr 380px; gap: 3.5rem; align-items: start; }
.trat-caract h2.title { margin-bottom: 2.4rem; }
.caract-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem 2rem; }
.caract-card {
  position: relative; background: #fff; margin-left: 58px;
  border: 1px solid #e6dcc4; padding: 1.8rem 1.6rem 1.8rem 2.6rem; min-height: 170px;
  transition: box-shadow .3s, transform .3s;
}
.caract-card:hover { box-shadow: 0 14px 32px rgba(120, 90, 20, .12); transform: translateY(-3px); }
.caract-ic {
  position: absolute; left: -58px; bottom: 6px; width: 92px; height: 92px;
  display: grid; place-items: center;
}
.caract-ic .ic3d { width: 88px; height: 88px; }
.caract-ic .ic3d::before { opacity: .55; }
.caract-ic .ic3d img { filter: drop-shadow(0 8px 10px rgba(120, 90, 40, .22)); }
.caract-card h3 { font-size: 1.18rem; font-weight: 700; color: var(--ink); margin-bottom: .55rem; }
.caract-card h3::after { content: ""; display: block; width: 34px; height: 2px; margin-top: .5rem; background: var(--gold-metal); }
.caract-card p { color: #4a4a4a; font-size: .95rem; line-height: 1.6; }
.caract-nota { margin-top: 2rem; font-size: .82rem; color: var(--gray); font-style: italic; }

.info-form {
  position: sticky; top: 100px; background: #fff; border-radius: 18px; padding: 2.2rem 2rem;
  box-shadow: 0 18px 44px rgba(60, 45, 15, .1); overflow: hidden;
}
.info-form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--gold-metal); }
.info-form h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: .3rem; }
.info-form .sub { color: var(--gray); font-size: .85rem; margin-bottom: 1.4rem; }
.info-form .campo { margin-bottom: 1rem; }
.info-form input[type=text], .info-form input[type=tel], .info-form input[type=email], .info-form textarea {
  width: 100%; border: 0; border-bottom: 1.5px solid #e2d8bf; padding: 10px 2px; font: inherit; font-size: .95rem;
  background: transparent; color: var(--ink); resize: vertical;
}
.info-form input:focus, .info-form textarea:focus { outline: none; border-bottom-color: var(--gold); }
.info-form .fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-form .etq { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 1.2rem 0 .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 7px 12px; border: 1.5px solid #e2d8bf; border-radius: 30px; font-size: .8rem; transition: .2s; }
.chips input:checked + span { background: var(--gold-metal); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .8rem; color: var(--gray); margin: 1.2rem 0 1.4rem; }
.consent input { margin-top: 3px; accent-color: var(--gold-dark); }
.info-form .btn { width: 100%; justify-content: center; }
.info-form .aviso { display: none; margin-top: .9rem; font-size: .85rem; padding: .8rem 1rem; border-radius: 10px; background: var(--gold-soft); }
.info-form .aviso.ok { background: #eaf6ee; color: #1f5f37; }
.info-form .aviso.error { background: #fbecec; color: #8a2a2a; }
.info-form .aviso a { color: inherit; font-weight: 700; text-decoration: underline; }
.info-form .btn:disabled { opacity: .6; cursor: wait; }
.consent a { color: var(--gold-dark); text-decoration: underline; }
.campo-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Otros tratamientos ---------- */
.trat-otros-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.trat-otro { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; display: block; }
.trat-otro img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.trat-otro::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(25,20,12,.78), rgba(25,20,12,0) 60%); }
.trat-otro span { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; color: #fff; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.trat-otro:hover img { transform: scale(1.07); }
.trat-otros-mas { margin-top: 2rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: .7s ease; }
.reveal.show { opacity: 1; transform: none; }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .trat-hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .trat-hero-media {
    position: relative; width: 100%; height: 52vh; min-height: 300px;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  }
  .trat-hero .container { padding: 10px 0 60px; }
  .trat-scroll { display: none; }
  .trat-caract-grid { grid-template-columns: 1fr; gap: 3rem; }
  .info-form { position: static; }
  .trat-otros-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .caract-cards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .trat-actions .btn { flex: 1 1 100%; justify-content: center; }
  .info-form .fila { grid-template-columns: 1fr; gap: 0; }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .trat-hero-media, .trat-hero-media img, .trat-anim, .trat-scroll::after { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- Precio en la cabecera ---------- */
.trat-precio-pill {
  display: inline-block; margin: -0.6rem 0 1.8rem; padding: 9px 20px; border-radius: 40px;
  background: var(--gold-metal); color: var(--gold-ink); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(170, 128, 30, .25), inset 0 1px 0 rgba(255,255,255,.5);
}

/* ---------- Beneficios + precio ---------- */
.trat-precios, #resultados, #video { scroll-margin-top: 90px; }
.trat-precios-grid { display: grid; grid-template-columns: 1fr 400px; gap: 3.5rem; align-items: center; }
.trat-precios.solo .trat-precios-grid { grid-template-columns: minmax(0, 560px); justify-content: center; }
.beneficios { list-style: none; display: grid; gap: .9rem; margin-top: 1.6rem; }
.beneficios li { position: relative; padding: 1rem 1.2rem 1rem 3.2rem; background: var(--bg-alt); border-radius: 14px; line-height: 1.55; }
.beneficios li::before {
  content: "✓"; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-metal); color: var(--gold-ink); font-weight: 800; font-size: .85rem;
}
.precio-card {
  position: relative; background: #fff; border-radius: 20px; padding: 2.2rem 2rem 2rem;
  box-shadow: 0 18px 44px rgba(60, 45, 15, .12); border: 1px solid #efe5cc; overflow: hidden;
}
.precio-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--gold-metal); }
.precio-card h3 { font-size: 1.3rem; font-weight: 700; margin: .3rem 0 1.2rem; }
.precio-lista { list-style: none; margin-bottom: 1.6rem; }
.precio-lista li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .85rem 0; border-bottom: 1px dashed #e2d8bf; }
.precio-lista li:last-child { border-bottom: 0; }
.precio-lista span { color: #444; }
.precio-lista strong { font-size: 1.35rem; color: var(--gold-dark); white-space: nowrap; }
.precio-card .btn { width: 100%; justify-content: center; }
.precio-card .btn svg { width: 20px; height: 20px; }
.precio-nota { margin-top: .9rem; font-size: .8rem; color: var(--gray); text-align: center; }
.precio-consulta { color: #444; line-height: 1.6; margin-bottom: 1.4rem; }

/* ---------- Hueco de imagen pendiente ---------- */
.foto-hueco { display: none; }
.foto-pendiente .foto-hueco {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  background: repeating-linear-gradient(135deg, #fbf4dc 0 14px, #f6ecc9 14px 28px);
  color: var(--gold-dark); font-weight: 700; text-align: center; padding: 1rem;
}
.foto-pendiente .foto-hueco small { font-weight: 500; font-size: .8rem; opacity: .85; }
.trat-otro.foto-pendiente::after { background: linear-gradient(to top, rgba(25,20,12,.55), rgba(25,20,12,0) 45%); }

@media (max-width: 900px) {
  .trat-precios-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* ---------- Antes y después (comparador deslizante) ---------- */
.trat-ba { background: #fff; }
.ba-ayuda { color: var(--gray); font-size: .9rem; margin: -1rem 0 2rem; }
.ba-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.ba-fig { margin: 0; }
.ba-vertical { width: min(420px, 100%); }
.ba-horizontal { width: min(900px, 100%); }
.ba-fig figcaption { margin-top: .8rem; font-weight: 600; color: var(--gold-dark); }
.ba {
  --pos: 50%; position: relative; overflow: hidden; border-radius: 18px;
  box-shadow: 0 18px 44px rgba(60, 45, 15, .16); user-select: none; background: var(--gold-soft);
}
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-antes { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-linea {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; transform: translateX(-50%);
  background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.35); pointer-events: none;
}
.ba-tirador {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-metal); color: var(--gold-ink); font-weight: 800; font-size: 1.05rem; letter-spacing: -.05em;
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.ba-tag {
  position: absolute; top: 14px; padding: 6px 14px; border-radius: 30px; font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; background: rgba(25,20,12,.72); color: #fff; pointer-events: none;
}
.ba-tag-antes { left: 14px; }
.ba-tag-despues { right: 14px; background: var(--gold-metal); color: var(--gold-ink); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible ~ .ba-linea .ba-tirador, .ba:focus-within .ba-tirador { outline: 3px solid var(--gold-dark); outline-offset: 3px; }
.ba-nota { margin-top: 1.6rem; font-size: .8rem; color: var(--gray); font-style: italic; }
@media (max-width: 680px) {
  .ba-tirador { width: 44px; height: 44px; }
}

/* Dos comparadores horizontales uno al lado del otro */
.ba-n2 .ba-horizontal { width: min(560px, 100%); }

/* ---------- Vídeo del tratamiento ---------- */
.trat-video { background: var(--bg-alt); }
.trat-video-grid { display: grid; grid-template-columns: 1fr 380px; gap: 4rem; align-items: center; max-width: 1000px; }
.trat-video .lead { margin-bottom: 1.8rem; }
.video-marco { border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 24px 50px rgba(60,45,15,.22); border: 4px solid #fff; outline: 1px solid rgba(212,175,55,.5); }
.video-marco video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
@media (max-width: 900px) {
  .trat-video-grid { grid-template-columns: 1fr; gap: 2rem; }
  .video-marco { max-width: 340px; margin: 0 auto; }
}
