:root {
    --morado: #493480;
    --morado-oscuro: #2f2157;
    --beige: #ffffff;
    --beige-claro: #ffffff;
    --beige-card: #ffffff;
    --texto: #2b2440;
    --whatsapp: #25D366;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--beige);
    color: var(--texto);
}

/* BARRA SUPERIOR */
/* =========================================================
   CABECERA PRINCIPAL DEL INICIO
========================================================= */

.home-header {
    width: min(1500px, 94%);
    margin: 0 auto 25px;
    padding: 18px 28px;

    display: grid;
    grid-template-columns: 260px 1fr auto;
    align-items: center;
    gap: 30px;

    background: var(--beige);
    border-bottom: 2px solid rgba(73, 52, 128, .12);
}

/* LOGO */

.home-header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-header-logo img {
    width: 245px;
    height: auto;
    display: block;
}

/* BIENVENIDA */

.home-header-welcome {
    text-align: center;
}

.home-header-welcome span {
    display: block;

    color: var(--morado);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .18em;
}

.home-header-welcome h1 {
    margin: 4px 0 0;

    color: var(--morado);
    font-size: clamp(28px, 3vw, 46px);
    font-weight: 950;
    line-height: 1;
}

.home-header-welcome p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--texto);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.45;
}

/* CONTACTO */

.home-header-contact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.home-header-contact > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--morado);
    text-decoration: none;

    font-size: 13px;
    font-weight: 800;

    white-space: nowrap;
}

.home-header-contact > a i {
    font-size: 18px;
}

.home-header-contact > a:hover {
    color: var(--morado-oscuro);
}

.home-header-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-header-social a {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--morado);
    color: white;

    text-decoration: none;

    transition: .2s ease;
}

.home-header-social a:hover {
    transform: translateY(-2px);
    background: var(--morado-oscuro);
}

/* ZONA PRINCIPAL */
.main-zone {
    min-height: calc(100vh - 90px);
    background: var(--beige);
    padding: 25px 0 45px;
}

/* LAYOUT: BOTONES IZQ | VIDEO | BOTONES DER */
.video-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 120px auto 120px;
    gap: 28px;
    justify-content: center;
    align-items: center;
}

/* BOTONES LATERALES */
.side-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.quick-btn {
    width: 105px;
    min-height: 92px;
    background: var(--beige-card);
    color: var(--morado);
    border: 2px solid rgba(73,52,128,.14);
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    box-shadow: 0 8px 22px rgba(47,33,87,.16);
    transition: all .25s ease;
    text-align: center;
    padding: 8px;
    font-weight: 900;
    line-height: 1.05;
}

.quick-btn i {
    font-size: 34px;
    margin-bottom: 0;
    line-height: 1;
    transition: .25s ease;
}

.quick-btn-image,
.quick-btn-img {
    width: 75px;
    height: 75px;

    object-fit: contain;
    object-position: center;

    display: block;
    flex-shrink: 0;

    margin: 0 0 6px 0;
}

.quick-btn span {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.05;
}

.quick-btn:hover {
    background: var(--morado);
    color: var(--beige-claro);
    transform: translateY(-5px);
}

.quick-btn:hover i {
    color: var(--beige-claro);
    transform: scale(1.15);
}

/* Colores por botón */
.icon-purple i { color: #493480; }
.icon-orange i { color: #F2994A; }
.icon-pink i { color: #E84393; }
.icon-blue i { color: #2F80ED; }
.icon-green i { color: #27AE60; }
.icon-red i { color: #EB5757; }
.icon-cyan i { color: #00B8A9; }

/* VIDEO VERTICAL CENTRADO */
.video-box {
    position: relative;
    width: min(1100px, 92vw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--morado-oscuro);
    border-radius: 30px;
    overflow: hidden;
    border: 6px solid var(--beige-card);
    box-shadow: 0 18px 45px rgba(47, 33, 87, .28);
    /*width: fit-content;
    max-width: 90vw;
    margin: auto;
    background: var(--morado-oscuro);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(47,33,87,.30);
    border: 8px solid var(--beige-card);*/
}

.video-box video {
    
    display: block;

    width: auto;
    max-width: 100%;

    height: 72vh;
    max-height: 720px;

    object-fit: contain;

    margin: 0 auto;

    background: transparent;
}


/* =========================================================
   INICIO - BIENVENIDA, VIDEO Y ACCESOS RÁPIDOS
========================================================= */

/*.home-welcome {
    width: min(1100px, 94%);
    margin: 0 auto 28px;
    text-align: center;
}

.home-welcome-eyebrow,
.home-section-eyebrow {
    display: block;
    color: var(--morado);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.home-welcome h1 {
    margin: 5px 0 8px;
    color: var(--morado);
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 950;
    line-height: .98;
}

.home-welcome p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--texto);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.45;
}*/

.home-section-eyebrow {
    display: block;
    color: var(--morado);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.home-video-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.home-video-section .video-box {
    position: relative;
}

.video-cta-actions {
    position: absolute;
    left: auto;
    top: 18px;
    right: 18px;;
    bottom: auto;
    z-index: 20;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: none;
}

.video-cta-actions .video-mobile-btn {
    width: auto;
    min-width: 165px;
    min-height: 42px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 14px;
    background: rgba(73, 52, 128, .96);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    box-shadow:
        0 7px 18px rgba(47, 33, 87, .28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.video-cta-actions .video-mobile-btn i {
    font-size: 19px;
    line-height: 1;
    flex-shrink: 0;
}

.video-cta-actions .video-mobile-btn span {

    white-space: nowrap;
}

.video-cta-actions .video-mobile-btn:hover,
.video-cta-actions .video-mobile-btn:focus-visible {
    background: var(--morado-oscuro);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(47,33,87,.38);
}

.quick-access-section {
    width: min(1050px, 94%);
    margin: 42px auto 10px;
}

.quick-access-header {
    margin-bottom: 22px;
    text-align: center;
}

.quick-access-header h2 {
    margin: 3px 0 0;
    color: var(--morado);
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 950;
    line-height: 1;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 18px;
    justify-items: stretch;
}

.quick-access-grid .quick-btn {
    width: 100%;
    min-height: 120px;
    max-height: 140px;     /* Límite para que no se estire de más */
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.quick-access-grid .quick-btn-image {
    width: 75px;
    height: 75px;
    margin-bottom: 6px;
}

.quick-access-grid .quick-btn i {
    font-size: 42px;
}

.quick-access-grid .quick-btn span {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}

.icon-yellow i { color: #F2C94C; }

/* FOOTER */
footer {
    background: var(--morado-oscuro);
    color: var(--beige-claro);
    padding: 45px 0 20px;
}

footer a {
    color: var(--beige-claro);
    text-decoration: none;
}

.social-icons a {
    font-size: 27px;
    margin-right: 14px;
}

.mapa {
    width: 100%;
    height: 230px;
    border: 0;
    border-radius: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(245,240,232,.25);
    margin-top: 28px;
    padding-top: 18px;
    text-align: center;
    font-size: 14px;
}

/* BOTÓN WHATSAPP FLOTANTE */
.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.whatsapp-float img {
    width: 125px;
    height: auto;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,.35));
    transition: transform .25s ease;
}

.whatsapp-float span {
    background: var(--morado);
    color: var(--beige-claro);
    font-weight: 800;
    font-size: 14px;
    padding: 9px 14px;
    border-radius: 15px;
    border: 2px solid var(--beige-claro);
    margin-top: -5px;
    box-shadow: 0 6px 16px rgba(0,0,0,.28);
    text-align: center;
}

.whatsapp-float:hover img {
    transform: translateY(-5px) scale(1.03);
}

.whatsapp-float:hover span {
    background: var(--whatsapp);
}

/* RESPONSIVE TABLET */
@media (max-width: 992px) {
    .video-layout {
        grid-template-columns: 1fr;
    }

    .side-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .quick-btn {
        width: 135px;
        min-height: 78px;
    }

    .video-box video {
        height: 70vh;
        max-height: 680px;
    }
}

/* RESPONSIVE CELULAR */
@media (max-width: 768px) {
    .main-zone {
        padding: 28px 0;
    }

    .video-box {
        border-radius: 24px;
        border-width: 5px;
    }

    .video-box video {
        height: 65vh;
        max-height: 620px;
    }

    .whatsapp-float {
        right: 14px;
        bottom: 14px;
    }

    .whatsapp-float img {
        width: 92px;
    }

    .whatsapp-float span {
        font-size: 12px;
        max-width: 135px;
        padding: 8px 10px;
    }
}

/* =========================================================
   SELECTOR DE UBICACIONES
========================================================= */

.ubicaciones-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ubicacion {
    border: 2px solid rgba(245, 240, 232, .35);
    background: rgba(255, 250, 241, .10);
    color: var(--beige-claro);

    padding: 9px 14px;
    border-radius: 12px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;

    cursor: pointer;
    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}

.ubicacion:hover {
    background: var(--beige-claro);
    color: var(--morado);
    border-color: var(--beige-claro);

    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(0, 0, 0, .18);
}

.ubicacion.active {
    background: var(--beige-claro);
    color: var(--morado);
    border-color: var(--beige-claro);

    box-shadow: 0 7px 18px rgba(0, 0, 0, .22);
}

.ubicacion:focus-visible {
    outline: 3px solid rgba(255, 243, 109, .75);
    outline-offset: 2px;
}

/* MAPA */
.mapa {
    width: 100%;
    height: 230px;
    display: block;

    border: 3px solid rgba(245, 240, 232, .65);
    border-radius: 18px;

    background: var(--beige-claro);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .20);
}



/* =========================================================
   PROPUESTA 2 - HOME
   Bienvenida con fotografías cambiantes + video horizontal
========================================================= */

.home-topbar-v2 {
    width: min(1380px, 94%);
    min-height: 92px;

    margin: 0 auto 18px;
    padding: 16px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: var(--beige-card);

    border: 1px solid rgba(73, 52, 128, .08);
    border-radius: 24px;

    box-shadow: 0 8px 24px rgba(47, 33, 87, .08);
}

.home-topbar-v2-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.home-topbar-v2-logo img {
    display: block;

    width: 250px;
    height: 58px;

    object-fit: contain;
    object-position: left center;
}

.home-menu-v2-btn {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 15px;

    background: transparent;
    color: var(--morado);

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.home-menu-v2-btn i {
    font-size: 42px;
    line-height: 1;
}

.home-menu-v2-btn:hover,
.home-menu-v2-btn:focus-visible {
    background: rgba(73, 52, 128, .08);
    transform: translateY(-1px);
}


/* OFFCANVAS */

.home-offcanvas-v2 {
    --bs-offcanvas-width: 340px;

    color: var(--texto);
    background: var(--beige-claro);
}

.home-offcanvas-v2 .offcanvas-header {
    padding: 28px 24px 18px;

    border-bottom: 1px solid rgba(73, 52, 128, .12);
}

.home-offcanvas-v2-eyebrow {
    display: block;

    color: var(--morado);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .15em;
}

.home-offcanvas-v2 h5 {
    margin: 2px 0 0;

    color: var(--morado-oscuro);
    font-size: 28px;
    font-weight: 950;
}

.home-offcanvas-v2 .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 18px;
}

.home-offcanvas-v2 .offcanvas-body > a {
    min-height: 52px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 14px;

    border-radius: 14px;

    color: var(--morado-oscuro);
    text-decoration: none;

    font-size: 14px;
    font-weight: 850;

    transition:
        background .2s ease,
        color .2s ease;
}

.home-offcanvas-v2 .offcanvas-body > a i {
    width: 24px;

    color: var(--morado);
    font-size: 20px;

    text-align: center;
}

.home-offcanvas-v2 .offcanvas-body > a:hover {
    background: var(--morado);
    color: #fff;
}

.home-offcanvas-v2 .offcanvas-body > a:hover i {
    color: #fff;
}


/* =========================================================
   HERO
========================================================= */

.home-hero-v2 {
    position: relative;

    width: min(1380px, 94%);
    min-height: clamp(390px, 50vw, 620px);

    margin: 0 auto 42px;

    overflow: hidden;

    border-radius: 30px;

    background: var(--beige-card);

    box-shadow:
        0 18px 45px rgba(47, 33, 87, .15);
}

.home-hero-v2-slides,
.home-hero-v2-slide,
.home-hero-v2-overlay {
    position: absolute;
    inset: 0;
}

.home-hero-v2-slide {
    opacity: 0;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    animation: homeHeroV2 18s infinite;
}

/*
   FOTOGRAFÍAS DEL HERO.
   Sustituye las rutas cuando recibas las fotografías definitivas.
*/
.hero-v2-slide-1 {
    background-image:
        url("../images/urgencias-1.jpg");

    animation-delay: 0s;
}

.hero-v2-slide-2 {
    background-image:
        url("../images/tomografia/tomografia-5.jpg");

    animation-delay: 6s;
}

.hero-v2-slide-3 {
    background-image:
        url("../images/hospitalizacion/habitacion-suite-2.webp");

    animation-delay: 12s;
}

@keyframes homeHeroV2 {
    0% {
        opacity: 0;
        transform: scale(1.025);
    }

    6% {
        opacity: 1;
    }

    28% {
        opacity: 1;
    }

    36% {
        opacity: 0;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.home-hero-v2-overlay {
    z-index: 2;

    background:
        linear-gradient(
            90deg,
            rgba(250, 247, 241, .99) 0%,
            rgba(250, 247, 241, .96) 31%,
            rgba(250, 247, 241, .76) 48%,
            rgba(250, 247, 241, .28) 70%,
            rgba(250, 247, 241, .06) 100%
        );
}

.home-hero-v2-content {
    position: relative;
    z-index: 3;

    width: min(620px, 54%);
    min-height: inherit;

    padding: clamp(45px, 6vw, 82px);

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.home-hero-v2-eyebrow {
    display: block;

    margin-bottom: 6px;

    color: var(--texto);

    font-size: clamp(18px, 2vw, 26px);
    font-weight: 500;
    line-height: 1.15;
}

.home-hero-v2 h1 {
    margin: 0;

    color: var(--morado);

    font-size: clamp(52px, 6vw, 88px);
    font-weight: 950;
    line-height: .86;
    letter-spacing: -.045em;
}

.home-hero-v2 p {
    max-width: 430px;

    margin: 18px 0 20px;

    color: var(--texto);

    font-size: clamp(16px, 1.45vw, 21px);
    line-height: 1.3;
}

.home-hero-v2-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.home-hero-v2-btn {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 17px;

    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;

    background: var(--morado);
    color: #fff;

    text-decoration: none;

    font-size: 13px;
    font-weight: 900;

    box-shadow: 0 8px 18px rgba(47,33,87,.20);

    transition:
        transform .2s ease,
        background .2s ease;
}

.home-hero-v2-btn i {
    font-size: 17px;
}

.home-hero-v2-btn:hover,
.home-hero-v2-btn:focus-visible {
    background: var(--morado-oscuro);
    color: #fff;
    transform: translateY(-2px);
}


/* =========================================================
   VIDEO HORIZONTAL DEBAJO DEL HERO
========================================================= */

.home-video-v2 {
    width: min(1180px, 90%);

    margin: 0 auto 46px;
}

.home-video-v2-heading {
    margin-bottom: 14px;

    text-align: center;
}

.home-video-v2-heading > span {
    display: block;

    color: var(--morado);

    font-size: 11px;
    font-weight: 950;
    letter-spacing: .17em;
}

.home-video-v2-heading h2 {
    margin: 2px 0 0;

    color: var(--morado);

    font-size: clamp(28px, 3vw, 42px);
    font-weight: 950;
}

.home-video-v2-frame {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 6px solid var(--beige-card);
    border-radius: 30px;

    background:
        radial-gradient(
            circle at 50% 50%,
            #5a4691 0%,
            var(--morado-oscuro) 72%
        );

    box-shadow:
        0 18px 45px rgba(47, 33, 87, .22);
}

.home-video-v2-frame video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    background: transparent;
}


/* ESPACIADO DE ACCESOS RÁPIDOS DESPUÉS DEL NUEVO HERO */

.quick-access-section {
    margin-top: 28px;
}

html {
    scroll-behavior: smooth;
}

/* Ajustes de proporción solicitados por diseño */
@media(min-width:1100px){.home-topbar-v2,.home-hero-v2{width:min(1540px,96%)}.home-hero-v2{min-height:620px}.home-hero-v2-content{width:min(700px,52%)}.home-video-v2{width:min(1380px,94%)}.quick-access-section{width:min(1420px,94%);margin-left:auto;margin-right:auto}.quick-access-grid{grid-template-columns:repeat(4,minmax(150px,1fr));gap:28px}.quick-access-grid .quick-btn{width:100%;min-height:180px}.quick-access-grid .quick-btn-image{width:92px;max-height:92px}.quick-access-grid .quick-btn span{font-size:17px}}

/* Pantallas TV / ultra-wide: conserva proporciones y legibilidad. */
@media (min-width: 1800px) {
    .main-zone > .container-fluid { max-width: 1760px; margin-inline: auto; }
}
@media (min-width: 2560px) {
    .main-zone > .container-fluid { max-width: 2100px; }
    .home-topbar-v2, .home-hero-v2 { width: min(1900px, 94%); }
    .home-video-v2, .quick-access-section { width: min(1800px, 92%); }
}
