/* =========================================================
   ONCOSAVI - STYLE.CSS LIMPIO
   ========================================================= */

:root {
    --onco-blue: #0A4D8C;
    --onco-blue-dark: #07355f;
    --onco-red: #fc2222;
    --onco-green: #148b49;
    --onco-whatsapp: #25D366;
    --onco-bg: #f7f9fc;
    --onco-section-bg: #f5f8fc;
    --onco-white: #ffffff;
    --onco-text: #555555;
    --onco-muted: #666666;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--onco-bg);
    font-family: 'Poppins', sans-serif;
}

.campo-obligatorio {
    color: #fc2222;
    font-weight: 700;
    margin-left: 2px;
}

#about,
#services,
#contact {
    scroll-margin-top: 100px;
}

.footer-map {
    width: 100%;
    max-width: 400px;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
}

.footer-map iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.logo-navbar {
    height: 45px;
    width: auto;
    margin-right: 10px;
    object-fit: contain;
}

.btn-nav-consulta,
.btn-nav-cotizacion {
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.btn-nav-consulta {
    background: var(--onco-red);
    border: 1px solid var(--onco-white);
    color: var(--onco-white);
}

.btn-nav-consulta:hover {
    background: var(--onco-red);
    border-color: var(--onco-green);
    color: var(--onco-white);
    transform: translateY(-2px);
}

.btn-nav-cotizacion {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: var(--onco-white);
}

.btn-nav-cotizacion:hover {
    background: var(--onco-white);
    border-color: var(--onco-white);
    color: var(--onco-blue);
    transform: translateY(-2px);
}

.nav-external {
    white-space: nowrap;
}

.nav-external i {
    font-size: 16px;
    color: var(--onco-white);
}

/* DIRECTORIO MÉDICO */
.directorio-menu {
    min-width: 280px;
    max-height: 520px;
    overflow-y: auto;
    padding: 10px 0;
}

.directorio-categoria {
    display: block;
    padding: 9px 18px 5px;
    color: var(--onco-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.directorio-especialidad {
    padding-left: 27px;
}

.directorio-especialidad:hover {
    background: #f2f6fb;
    color: var(--onco-red);
}

.directorio-divider {
    margin: 7px 14px;
}

.directorio-buscar {
    color: var(--onco-red);
    font-weight: 600;
}

.directorio-buscar:hover {
    background: rgba(252, 34, 34, 0.06);
    color: #d91c1c;
}

/* HERO CAROUSEL */
.hero-slide {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--onco-white);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(7, 45, 80, 0.88),
        rgba(7, 45, 80, 0.55),
        rgba(7, 45, 80, 0.25)
    );
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-slide-1 { background-image: url("../img/hero/hero1.1.jpeg"); }
.hero-slide-2 { background-image: url("../img/hero/hero2.jpg"); }
.hero-slide-3 { background-image: url("../img/hero/hero3.jpg"); }

.hero-slide h1 {
    margin-bottom: 20px;
    font-size: 60px;
    font-weight: 700;
    line-height: 1.15;
}

.hero-slide h1 span {
    color: var(--onco-red);
}

.hero-slide p {
    max-width: 650px;
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 1.8;
}

.carousel-fade .carousel-item {
    transition: opacity 0.8s ease;
}

.carousel-control-prev,
.carousel-control-next {
    width: 7%;
}

/* SECCIONES */
.section {
    padding: 90px 0;
}

.section-title {
    margin-bottom: 60px;
    text-align: center;
}

.section-title h2 {
    margin-bottom: 15px;
    color: var(--onco-blue);
    font-size: 42px;
    font-weight: 700;
}

.section-title p {
    color: var(--onco-muted);
    font-size: 18px;
}

.section-subtitle {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--onco-red);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

#about {
    background: var(--onco-white);
}

#about p {
    max-width: 850px;
    margin: auto;
    color: var(--onco-text);
    font-size: 18px;
    line-height: 1.9;
}

#services,
.services-section {
    background: var(--onco-section-bg);
}

/* TARJETAS DE SERVICIOS */
.service-card {
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--onco-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

.service-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--onco-white);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 30px;
}

.service-category {
    color: var(--onco-red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.service-content h3 {
    margin: 10px 0 15px;
    color: var(--onco-blue);
    font-size: 24px;
    font-weight: 600;
}

.service-content p {
    margin-bottom: 20px;
    color: var(--onco-muted);
    line-height: 1.7;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--onco-blue);
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
}

.service-link:hover {
    color: var(--onco-red);
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* BOTÓN */
.btn-success {
    background-color: var(--onco-red);
    border-color: var(--onco-blue);
    color: var(--onco-white);
}

.btn-success:hover {
    background-color: #073b6d;
    border-color: var(--onco-red);
    color: var(--onco-white);
}

/* LOADER */
#loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--onco-white);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

#loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loader-logo {
    width: 220px;
    max-width: 65vw;
    height: auto;
    object-fit: contain;
    animation: loaderPulse 1.4s ease-in-out infinite;
}

.loader-spinner {
    width: 42px;
    height: 42px;
    margin-top: 25px;
    border: 4px solid #e6e9ed;
    border-top-color: var(--onco-red);
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes loaderPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* WHATSAPP */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

.whatsapp-link i {
    color: var(--onco-whatsapp);
    font-size: 18px;
}

.whatsapp-link:hover {
    color: var(--onco-whatsapp);
}

/* FOOTER */
.footer {
    margin-top: 0;
    padding: 50px 0 0;
    background: var(--onco-blue-dark);
    color: var(--onco-white);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 35px;
}

.footer-brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
}

.footer-logo {
    width: 45px;
    height: 45px;
    max-width: 45px;
    max-height: 45px;
    display: block;
    object-fit: contain;
}

.footer-brand p {
    max-width: 300px;
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.7;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-section h5 {
    margin: 0 0 8px;
    color: var(--onco-white);
    font-size: 15px;
    font-weight: 600;
}

.footer-section a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-section a:hover {
    color: var(--onco-white);
    transform: translateX(3px);
}

.footer-section i {
    width: 18px;
    text-align: center;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--onco-white);
}

.footer-legal span {
    color: rgba(255, 255, 255, 0.3);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero-slide h1 {
        font-size: 48px;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .hero-slide h1 {
        font-size: 38px;
    }

    .hero-slide p {
        font-size: 16px;
    }

    .section {
        padding: 65px 0;
    }

    .section-title h2 {
        font-size: 34px;
    }

    .footer {
        padding-top: 35px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
