/* Detalles visuales sutiles para que el sitio se sienta más cuidado.
   Los efectos en movimiento están adaptados de React Bits (ShinyText, BlurText,
   SpotlightCard y GlareHover), Copyright (c) 2026 David Haz, licencia MIT + Commons Clause:
   https://github.com/DavidHDev/react-bits/blob/main/LICENSE.md
   Se carga en todas las páginas después de style.css; el movimiento lo activa js/detalles.js
   y nada se mueve si la visitante pidió reducir el movimiento. */

/* ---------- Tipografía: renglones mejor repartidos ---------- */
h1,
h2,
h3,
.page-title,
.section-title {
    text-wrap: balance;
}

p,
li {
    text-wrap: pretty;
}

::selection {
    background: rgba(171, 133, 0, 0.2);
    color: #1F2620;
}

/* ---------- Header translúcido al hacer scroll ---------- */
body .site-header.is-sticky {
    background-color: rgba(255, 253, 248, 0.88);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    box-shadow: 0 1px 0 rgba(171, 133, 0, 0.14), 0 10px 30px rgba(31, 38, 32, 0.06);
}

/* ---------- Título principal: entra de desenfocado a nítido (BlurText, solo desenfoque) ---------- */
.page-header .page-title {
    animation: titulo-enfoque 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes titulo-enfoque {
    from {
        filter: blur(8px);
    }

    to {
        filter: none;
    }
}

/* ---------- Etiquetas doradas: un solo destello al aparecer (ShinyText) ---------- */
.brillo {
    --brillo-color: #E9CB6A;
    background-image: linear-gradient(120deg, currentColor 0 42%, var(--brillo-color) 50%, currentColor 58% 100%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    background-position: 0 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brillo.is-brillando {
    animation: brillo-barrido 2.2s cubic-bezier(0.37, 0, 0.63, 1) both;
}

@keyframes brillo-barrido {
    to {
        background-position: 100% 0;
    }
}

/* En la portada el lema va sobre el video: brillo champaña y medio segundo de espera */
.page-header .hero-tag.brillo {
    --brillo-color: #FFF6E0;
    display: inline-block !important;
}

.page-header .hero-tag.is-brillando {
    animation-delay: 0.5s;
}

/* ---------- Títulos de los llamados a agendar: palabra por palabra (BlurText) ---------- */
.blur-texto .blur-palabra {
    display: inline-block;
}

.blur-texto:not(.is-in) .blur-palabra {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-10px);
}

.blur-texto.is-in .blur-palabra {
    animation: blur-palabra 0.8s linear both;
    animation-delay: calc(var(--i) * 70ms);
}

@keyframes blur-palabra {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: translateY(-10px);
    }

    50% {
        opacity: 0.5;
        filter: blur(4px);
        transform: translateY(1px);
    }

    100% {
        opacity: 1;
        filter: none;
        transform: none;
    }
}

/* ---------- Tarjetas: luz dorada que sigue al cursor y borde que se ilumina (SpotlightCard) ---------- */
.luz {
    isolation: isolate;
    overflow: hidden;
}

.luz::before,
.luz::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.luz::before {
    z-index: -1;
    background: radial-gradient(circle 240px at var(--luz-x, 50%) var(--luz-y, 50%), rgba(171, 133, 0, 0.12), transparent);
}

.luz::after {
    z-index: 1;
    padding: 1px;
    background: radial-gradient(circle 144px at var(--luz-x, 50%) var(--luz-y, 50%), rgba(171, 133, 0, 0.5), transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.luz:hover::before,
.luz:hover::after,
.luz:focus-within::before,
.luz:focus-within::after {
    opacity: 1;
    transition-duration: 0.3s;
}

/* ---------- Botones dorados: un destello diagonal al pasar el cursor (GlareHover) ---------- */
.btn-gold,
.btn-primary {
    isolation: isolate;
}

.btn-gold::after,
.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(-45deg, transparent 32%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.2) 44%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0.2) 56%, rgba(255, 255, 255, 0.1) 60%, transparent 68%);
    mix-blend-mode: screen;
    transform: translateX(-100%);
    transition: transform 0.65s cubic-bezier(0.37, 0, 0.63, 1);
}

.btn-gold:focus-visible::after,
.btn-primary:focus-visible::after {
    transform: translateX(100%);
}

@media (hover: hover) {

    .btn-gold:hover::after,
    .btn-primary:hover::after {
        transform: translateX(100%);
    }
}

/* Un solo barrido: al quitar el cursor regresa sin animarse */
.btn-gold:not(:hover):not(:focus-visible)::after,
.btn-primary:not(:hover):not(:focus-visible)::after {
    transition: none;
}

/* ---------- Tarjetas con foto (home y ginecología estética): títulos más grandes ---------- */
body .service-photo-card .service-body h3 {
    font-size: clamp(1.75rem, 2.3vw, 2.15rem);
    line-height: 1.15;
}

body .service-photo-card .service-body .price {
    font-size: 13.5px;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

/* ---------- Doctoras frente a un arco con el consultorio de fondo ---------- */
.arco-equipo {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    aspect-ratio: 1 / 1.06;
}

.arco-equipo-fondo {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 3%;
    bottom: 14%;
    border-radius: 999px 999px 0 0;
    overflow: hidden;
    background: #F4ECE0;
    box-shadow: 0 30px 60px rgba(31, 38, 32, 0.12);
}

.arco-equipo-fondo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arco-equipo-fondo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0) 45%, rgba(255, 253, 248, 0.9) 100%);
}

.arco-equipo-doctoras {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}

.arco-equipo .exp-badge {
    position: absolute;
    top: 6%;
    left: 0;
    width: 124px;
    height: 124px;
    z-index: 2;
    background: #AB8500;
    color: #FFFDF8;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    text-align: center;
    line-height: 1.1;
    padding: 1rem;
    box-shadow: 0 16px 32px rgba(171, 133, 0, 0.25);
}

.arco-equipo .exp-badge strong {
    font-size: 2.2rem;
    display: block;
}

.arco-equipo .exp-badge span {
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ---------- Carruseles deslizables en celular (tarjetas, equipo) ---------- */
.desliza {
    display: none;
}

@media (max-width: 767.98px) {
    .row.carrusel-movil {
        justify-content: flex-start !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }

    .row.carrusel-movil::-webkit-scrollbar {
        display: none;
    }

    .row.carrusel-movil > * {
        flex: 0 0 82%;
        width: 82%;
        max-width: 82%;
        scroll-snap-align: start;
    }

    .desliza {
        display: block;
        text-align: center;
        font-size: 0.72rem;
        letter-spacing: 0.25em;
        text-transform: uppercase;
        color: #AB8500;
        margin: 1rem 0 0;
    }

    .desliza::after {
        content: "\2192";
        margin-left: 0.5em;
    }

    /* Galería de instalaciones a dos columnas */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .arco-equipo .exp-badge {
        width: 96px;
        height: 96px;
        padding: 0.75rem;
    }

    .arco-equipo .exp-badge strong {
        font-size: 1.7rem;
    }

    .arco-equipo .exp-badge span {
        font-size: 0.55rem;
    }

    /* El dibujo de fondo de "Servicios de Ginecología" se encimaba con el texto */
    body .nosotros-inicio {
        background-image: none;
    }
}

/* ---------- Celular: márgenes parejos y fondos que sí se ven ---------- */
@media screen and (max-width: 600px) {

    .container,
    .container-fluid,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        padding-left: calc(var(--bs-gutter-x) * 1) !important;
    }
}

/* Los fondos fijos no funcionan en celulares y el banner salía gris */
@media (max-width: 991.98px), (hover: none) {

    body .cta-banner,
    body .servicios-bg,
    body .bg-ginecologia,
    body .bg-galeria {
        background-attachment: scroll !important;
    }
}

/* Las animaciones laterales de AOS ensanchaban la pantalla en celular */
body > section {
    overflow-x: clip;
}

/* ---------- Footer: un velo suave para que el texto claro se lea sobre la foto rosa ---------- */
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 38, 32, 0.45), rgba(31, 38, 32, 0.62));
    pointer-events: none;
}

body .site-footer {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.site-footer > * {
    position: relative;
    z-index: 1;
}

body .site-footer,
body .site-footer a {
    color: rgba(255, 253, 248, 0.92);
}

/* ---------- Íconos SVG de la home, del mismo set de línea que las páginas de tratamiento ---------- */
/* Solo la sección de la home: en las páginas de tratamiento manda .pasos-servicio (servicios.css) */
.nosotros-inicio .feature-item .feature-icon .icono {
    width: 44px;
    height: 44px;
    color: #AB8500;
}

.service-card .service-icon .icono {
    width: 52px;
    height: 52px;
    color: #AB8500;
}

/* ---------- Etiquetas doradas: la rayita nunca se queda sola en otro renglón ---------- */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.section-tag::before,
.section-tag::after {
    margin: 0;
    flex: 0 0 30px;
}

/* ---------- Un solo dorado de marca en los botones ---------- */
body .btn-primary {
    background: #AB8500;
    border-color: #AB8500;
}

.testimonial .testimonial-role {
    color: #6F6F67;
}

/* ---------- Testimonios con comillas tipográficas ---------- */
.testimonial .quote-mark {
    font-size: 0;
    line-height: 0;
    margin-bottom: 1.75rem;
}

.testimonial .quote-mark::before {
    content: "\201C";
    display: block;
    font-size: 4.5rem;
    line-height: 0.9;
    height: 2.2rem;
}

/* ---------- Tarjetas con foto: zoom más lento y marco dorado al pasar el cursor ---------- */
.service-photo-card .service-img {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-photo-card:hover .service-img {
    transform: scale(1.04);
}

.service-photo-card::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(212, 181, 135, 0);
    transition: inset 0.6s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

@media (hover: hover) {
    .service-photo-card:hover::after {
        inset: 12px;
        border-color: rgba(212, 181, 135, 0.65);
    }
}

/* ---------- Cifras en tono arena, como el resto de la marca ---------- */
body .contador {
    background: #F4ECE0 !important;
}

/* ---------- Botón de volver arriba más discreto ---------- */
body .back-to-top {
    border-radius: 50%;
    background: rgba(31, 38, 32, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 24px rgba(31, 38, 32, 0.18);
}

body .back-to-top:hover {
    background: #AB8500;
}

/* ---------- Bloque "Visítanos" de contacto con los íconos alineados ---------- */
#contacto .footer-contact li {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

/* ---------- Celular: hero de la portada más legible y siluetas decorativas que no tapan el texto ---------- */
@media screen and (max-width: 600px) {
    body .hero-tag {
        font-size: 10px !important;
        letter-spacing: 0.25em !important;
    }

    body .page-header .container .text-cream {
        font-size: 14px !important;
    }

    .page-header .mt-4 {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .page-header .mt-4 .btn {
        width: min(100%, 360px);
        margin: 0 !important;
        padding-inline: 1.25rem;
        letter-spacing: 0.16em;
        line-height: 1.35;
    }
}

@media (max-width: 767.98px) {

    body .bg-ginecologia,
    body .bg-galeria,
    body .servicios-bg {
        background-size: 42% auto !important;
        background-position: right bottom !important;
    }

    /* El globo de WhatsApp tapaba un botón del hero en celular */
    .wa-tooltip {
        display: none;
    }
}

/* ---------- Carrusel de testimonios con los colores de la marca ---------- */
.testimonial-slider {
    --swiper-theme-color: #AB8500;
    --swiper-pagination-bullet-inactive-color: #AB8500;
    --swiper-pagination-bullet-inactive-opacity: 0.25;
}

@media (prefers-reduced-motion: reduce) {

    .page-header .page-title,
    .brillo.is-brillando {
        animation: none;
    }

    .btn-gold::after,
    .btn-primary::after {
        display: none;
    }
}

@media (forced-colors: active) {
    .brillo {
        background: none;
        -webkit-text-fill-color: currentColor;
    }
}

/* ---------- Home: "Nuestros servicios principales", lista de accesos dentro de cada tarjeta ---------- */
.servicios-principales .service-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.servicios-principales .service-card li {
    padding: 0.55rem 0;
    border-bottom: 1px solid #EDE4D6;
}

.servicios-principales .service-card li:last-child {
    border-bottom: 0;
}

.servicios-principales .service-card li a {
    color: #1F2620;
    font-size: 0.98rem;
    transition: color 0.3s ease;
}

.servicios-principales .service-card li a:hover,
.servicios-principales .service-card li a:focus-visible {
    color: #AB8500;
}

/* Tarjetas con lista o resumen de distinto largo: el enlace "Ver…" siempre al fondo, parejo entre tarjetas */
.servicios-principales .service-card,
#tratamientos .service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.servicios-principales .service-card .service-link,
#tratamientos .service-card .service-link {
    margin-top: auto;
    align-self: center;
}

/* ---------- Home: cuadro fijo del video de fondo (se ve mientras carga o si el teléfono no lo reproduce) ---------- */
.page-header.hero-video {
    background: #1F2620 url("/video/cover-alana.jpg") center / cover no-repeat;
}

@media (max-width: 600px) {
    .page-header.hero-video {
        background-image: url("/video/alana-cover-movil.jpg");
    }
}

/* ---------- Portada en franja (ginecología estética): contenido centrado bajo el header flotante ---------- */
/* (la página trae su propio .page-header.has-image en el <style> del head, por eso va con tres clases) */
.page-header.has-image.hero-franja {
    padding-top: 178px;
    padding-bottom: 102px;
}
