:root {
    --color-azul-oscuro: #152c45;
    --color-azul-medio: #1c456f;
    --color-azul-claro: #dff2fb;
    --color-turquesa: #36b1c9;
    --color-blanco: #ffffff;
    --color-acento: #25d366;
    --color-texto: #1f2533;
    --shadow-suave: 0 15px 35px rgba(0, 0, 0, 0.12);
    --header-offset: 96px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-texto);
    background-color: #f4f7fb;
    line-height: 1.6;
}

section[id] {
    scroll-margin-top: var(--header-offset);
}

body.menu-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3 {
    font-weight: 700;
    color: var(--color-azul-oscuro);
}

p {
    margin-bottom: 0.75rem;
}

/* HEADER */

.main-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(21, 44, 69, 0.96);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    border: 3px solid var(--color-blanco);
    object-fit: cover;
    background: var(--color-blanco);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-blanco);
    font-size: 1.4rem;
    cursor: pointer;
}

.nav-overlay {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.main-nav a {
    color: var(--color-blanco);
    text-decoration: none;
    font-size: 0.95rem;
}

.main-nav a:hover {
    opacity: 0.8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(120deg, var(--color-azul-oscuro), var(--color-azul-oscuro));
    color: var(--color-blanco);
    box-shadow: 0 14px 28px rgba(28, 120, 165, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 18px 32px rgba(28, 120, 165, 0.45);
}

.btn-secondary {
    background: var(--color-blanco);
    color: var(--color-azul-oscuro);
    border: 1px solid rgba(21, 44, 69, 0.25);
    box-shadow: 0 12px 28px rgba(21, 44, 69, 0.15);
}

.btn-nav {
    border: 1px solid var(--color-blanco);
    padding: 0.55rem 1.2rem;
}

.btn-full {
    width: 100%;
}

/* HERO */

.hero {
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(115deg, rgba(21, 44, 69, 0.95), rgba(54, 177, 201, 0.9)),
        url("https://vapzkuchmuztggvkxsoo.supabase.co/storage/v1/object/public/imagenes/portada-savis.jpg");
    background-position: center;
    background-size: cover;
    padding: 4.5rem 0 5.5rem;
    color: var(--color-blanco);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.15), transparent 55%);
    mix-blend-mode: screen;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero h1,
.hero h2,
.hero p,
.hero a {
    color: var(--color-blanco);
}

.hero .btn-secondary {
    color: var(--color-azul-oscuro);
    background: var(--color-blanco);
}

.hero .btn-secondary i {
    color: var(--color-azul-medio);
}

.hero-tag {
    display: inline-flex;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 0.6rem;
}

.typewriter {
    font-size: 1.3rem;
    min-height: 1.5em;
    margin-bottom: 1rem;
    display: inline-block;
    width: auto;
    white-space: nowrap;
}

#typewriter-text {
    display: inline-block;
}

.typewriter-cursor {
    width: 2px;
    height: 1.4em;
    background: var(--color-blanco);
    animation: blink 0.8s steps(2, start) infinite;
    display: inline-block;
    vertical-align: baseline;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.hero-schedule {
    font-weight: 500;
    opacity: 0.9;
}

.hero-media {
    position: relative;
}

.audio-toggle {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(3, 16, 31, 0.6);
    color: var(--color-blanco);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.audio-toggle:hover {
    transform: translateY(-1px);
}

.audio-toggle.active {
    background: rgba(37, 211, 102, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
}

.audio-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}

.audio-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    position: relative;
}

.audio-toggle i {
    font-size: 1rem;
}

.audio-mute-line {
    position: absolute;
    width: 24px;
    height: 2px;
    background: #ff4b4b;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    transform: rotate(35deg);
    border-radius: 999px;
    box-shadow: 0 0 6px rgba(255, 75, 75, 0.6);
    animation: mutePulse 1.2s ease-in-out infinite;
}

.audio-toggle.active .audio-mute-line {
    opacity: 0;
    animation: none;
}

.audio-wave {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: audioPulse 1.2s ease-in-out infinite;
}

.audio-wave.delay {
    animation-delay: 0.4s;
}

.audio-toggle.active .audio-wave {
    background: rgba(255, 255, 255, 0.95);
}

.hero-media .video-wrapper {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.3);
}

.hero-media iframe {
    width: 100%;
    min-height: 320px;
    border: none;
    display: block;
}

@keyframes audioPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
}

@keyframes mutePulse {
    0%,
    100% {
        transform: translate(-50%, -50%) rotate(35deg) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) rotate(35deg) scale(1.2);
    }
}

/* DOCTOR CARDS */

.doctor-highlight {
    margin-top: -3.5rem;
    padding-bottom: 3rem;
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.doctor-card {
    background: var(--color-blanco);
    border-radius: 22px;
    padding: 2rem;
    box-shadow: var(--shadow-suave);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.doctor-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doctor-info .btn {
    margin-top: auto;
    align-self: flex-start;
    white-space: nowrap;
}

.doctor-photo img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--color-blanco);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.doctor-tag {
    font-size: 0.9rem;
    color: var(--color-turquesa);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.doctor-description {
    margin-bottom: 1rem;
}

.doctor-list {
    list-style: none;
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.doctor-list i {
    color: var(--color-acento);
    margin-right: 0.4rem;
}

/* BENEFICIOS */

.beneficios {
    padding: 3.5rem 0;
    text-align: center;
}

.section-intro {
    max-width: 600px;
    margin: 0.5rem auto 2rem;
}

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.beneficio-card {
    background: var(--color-blanco);
    padding: 1.75rem 1.5rem;
    border-radius: 18px;
    box-shadow: var(--shadow-suave);
    text-align: left;
}

/* SERVICIOS */

.servicios {
    padding: 3.5rem 0;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.servicio-card {
    background: var(--color-blanco);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: var(--shadow-suave);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    height: 100%;
}

.servicio-precio {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-azul-oscuro);
}

.servicio-precio span {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5f6774;
}

.servicio-lista {
    list-style: none;
    display: grid;
    gap: 0.35rem;
    color: #4b5563;
}

.servicio-card .btn-full {
    margin-top: auto;
}

.horarios {
    background: var(--color-azul-claro);
    border-radius: 18px;
    padding: 1.75rem;
}

.servicio-imagen {
    border-radius: 14px;
    overflow: hidden;
    background: #f9fafb;
}

.servicio-imagen img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.horarios ul {
    margin-top: 1rem;
    list-style: disc;
    padding-left: 1.2rem;
}

/* SOBRE SAVIS */

.sobre {
    padding: 3.5rem 0;
}

.sobre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}

.sobre-imagen {
    display: flex;
    justify-content: center;
}

.sobre-imagen img {
    width: 320px;
    height: 320px;
    border-radius: 24px;
    border: 8px solid var(--color-blanco);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background: var(--color-blanco);
}

/* GALERIA */

.galeria {
    padding: 3.5rem 0;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    justify-content: center;
}

.galeria-card {
    background: var(--color-blanco);
    border-radius: 16px;
    box-shadow: var(--shadow-suave);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: min(340px, 100%);
    margin: 0 auto;
}

.galeria-imagen img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.galeria-info {
    padding: 1rem 1.25rem 1.25rem;
}

/* TESTIMONIOS */
.testimonios {
    padding: 3.5rem 0;
}
.testimonios-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.testimonio-card {
    background: var(--color-blanco);
    border-radius: 18px;
    padding: 1.4rem 1.3rem;
    box-shadow: var(--shadow-suave);
    border: 1px solid #e5e7eb;
}
.testimonio-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}
.testimonio-rol {
    color: #617081;
    font-size: 0.95rem;
}

/* CONTACTO */

.contacto {
    padding: 3.5rem 0;
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem;
}

.contacto-info,
.contacto-redes {
    margin-top: 1.75rem;
}

.contacto-info h3,
.contacto-redes h3 {
    margin-bottom: 0.75rem;
}

.link-mapa {
    color: var(--color-azul-oscuro);
    text-decoration: none;
    font-weight: 600;
}

.link-mapa i {
    margin-right: 0.35rem;
}

.contacto-redes ul {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.contacto-redes a {
    color: var(--color-azul-oscuro);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* FOOTER */

.footer {
    background: rgba(21, 44, 69, 0.96);
    color: #9ca3af;
    padding: 1.25rem 0;
    text-align: center;
}

/* WHATSAPP FLOAT */

.whatsapp-floating {
    position: fixed;
    bottom: 18px;
    right: 18px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--color-acento);
    color: var(--color-blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    z-index: 100;
    text-decoration: none;
}

.whatsapp-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* ANIMATIONS */

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

.reveal-up.in-view {
    animation: reveal 0.85s ease forwards;
    animation-delay: var(--delay, 0s);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
}

.reveal-right.in-view {
    animation: slideRight 0.75s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* RESPONSIVE */

@media (max-width: 900px) {
    :root {
        --header-offset: 76px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 33, 51, 0.95);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 55;
    }

    .nav-overlay.active {
        display: flex;
    }

    .main-nav {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
        font-size: 1.1rem;
    }

    .beneficios-grid,
    .servicios-grid,
    .sobre-grid,
    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .doctor-card {
        flex-direction: column;
        text-align: center;
    }

    .doctor-info .btn {
        align-self: stretch;
        width: 100%;
        white-space: normal;
    }

    .doctor-list {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 4rem 0 4.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-media iframe {
        min-height: 250px;
    }

    .beneficios-grid,
    .servicios-grid {
        gap: 1rem;
    }

    .doctor-photo img {
        width: 150px;
        height: 150px;
    }

    .typewriter {
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 1.15rem;
        min-height: auto;
    }

    #typewriter-text {
        display: inline;
    }
}
.stars {
    color: #f7c948;
    display: inline-flex;
    gap: 2px;
}
