/* =====================================================
   BIBLIOTECA INSTITUCIONAL
   E.S.E. HOSPITAL REGIONAL CENTRO
   IDENTIDAD INSTITUCIONAL
   Azul: #001178
   Rojo: #C8102E
===================================================== */


/* ---------- CONFIGURACIÓN GENERAL ---------- */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f8fa;
    color: #263238;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ---------- COLORES INSTITUCIONALES ---------- */

:root {
    --azul: #001178;
    --azul-oscuro: #000A4D;
    --azul-medio: #16258F;
    --azul-claro: #EEF1FF;

    --rojo: #C8102E;
    --rojo-oscuro: #A30D26;
    --rojo-claro: #FCEBED;

    --blanco: #FFFFFF;

    --texto: #263238;
    --texto-suave: #66727C;

    --borde: #E2E5ED;
}


/* ---------- ENCABEZADO ---------- */

.header {
    width: 100%;
    min-height: 82px;
    padding: 16px 6%;

    background: #ffffff;

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

    gap: 30px;

    border-bottom: 4px solid var(--rojo);

    position: sticky;
    top: 0;
    z-index: 1000;

    box-shadow: 0 5px 20px rgba(0, 17, 120, 0.10);
}


/* ---------- LOGO ---------- */

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-placeholder {
    width: 58px;
    height: 58px;

    border: 3px solid var(--rojo);

    border-radius: 12px;

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

    color: var(--azul);

    background: #ffffff;

    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.12);

    overflow: hidden;
}

/* IMAGEN DEL LOGO */
.logo-placeholder img {
    width: 38px;
    height: 38px;

    object-fit: contain;

    display: block;
}

.institution {
    display: block;

    font-size: 11px;
    font-weight: bold;

    letter-spacing: 1.2px;

    color: var(--rojo);

    margin-bottom: 2px;
}

.logo-area h1 {
    font-size: 21px;
    font-weight: 700;

    color: var(--azul);
}


/* ---------- MENÚ ---------- */

.menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.menu a {
    font-size: 14px;

    color: #4F5963;

    font-weight: 600;

    transition: 0.3s;
}

.menu a:hover {
    color: var(--rojo);
}

.menu a:last-child {
    background: var(--rojo);

    color: #ffffff;

    padding: 10px 17px;

    border-radius: 7px;

    box-shadow: 0 6px 15px rgba(200, 16, 46, 0.20);
}

.menu a:last-child:hover {
    background: var(--rojo-oscuro);

    color: #ffffff;

    transform: translateY(-2px);
}


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

.hero {
    min-height: 570px;

    padding: 90px 8%;

    display: flex;
    align-items: center;

    position: relative;

    overflow: hidden;

    background:

        radial-gradient(
            circle at 90% 15%,
            rgba(0, 17, 120, 0.14),
            transparent 25%
        ),

        radial-gradient(
            circle at 8% 90%,
            rgba(200, 16, 46, 0.12),
            transparent 25%
        ),

        linear-gradient(
            135deg,
            #EEF1FF 0%,
            #FFFFFF 55%,
            #FCEBED 100%
        );
}


/* ---------- ELEMENTOS MÉDICOS DECORATIVOS ---------- */

.hero::before {
    content: "+";

    position: absolute;

    right: 8%;
    top: 60px;

    font-size: 170px;

    font-weight: bold;

    color: var(--rojo);

    opacity: 0.07;

    line-height: 1;
}

.hero::after {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    border: 2px solid rgba(0, 17, 120, 0.10);

    right: -150px;
    bottom: -200px;
}


/* ---------- LÍNEA DE PULSO ---------- */

.hero-content::before {
    content: "";

    position: absolute;

    width: 260px;
    height: 2px;

    right: -40px;
    top: 20px;

    background: var(--rojo);

    opacity: 0.35;
}


/* ---------- CONTENIDO ---------- */

.hero-content {
    max-width: 760px;

    position: relative;

    z-index: 2;
}


/* ---------- ETIQUETA ---------- */

.tag {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 8px 15px;

    border-radius: 50px;

    background: var(--rojo-claro);

    color: var(--rojo);

    border-left: 4px solid var(--rojo);

    font-size: 11px;

    font-weight: bold;

    letter-spacing: 1.5px;

    margin-bottom: 22px;
}

.tag::before {
    content: "+";

    width: 18px;
    height: 18px;

    display: flex;

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

    background: var(--rojo);

    color: #ffffff;

    border-radius: 50%;

    font-size: 13px;

    font-weight: bold;
}


/* ---------- TÍTULO ---------- */

.hero h2 {
    font-size: clamp(40px, 5vw, 68px);

    line-height: 1.08;

    color: var(--azul);

    margin-bottom: 20px;

    font-weight: 700;
}

.hero h2 strong {
    display: block;

    color: var(--rojo);
}


/* ---------- LÍNEA DECORATIVA ---------- */

.hero h2::after {
    content: "";

    display: block;

    width: 70px;
    height: 6px;

    margin-top: 20px;

    background: var(--rojo);

    border-radius: 10px;
}


/* ---------- TEXTO ---------- */

.hero p {
    max-width: 680px;

    font-size: 18px;

    color: #5e6b73;

    margin-bottom: 35px;
}


/* ---------- BOTÓN PRINCIPAL ---------- */

.main-button {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    padding: 14px 25px;

    border-radius: 8px;

    background: var(--rojo);

    color: #ffffff;

    font-weight: bold;

    font-size: 14px;

    transition: 0.3s;

    box-shadow:
        0 8px 20px rgba(200, 16, 46, 0.25);
}

.main-button::after {
    content: "→";

    font-size: 18px;
}

.main-button:hover {
    transform: translateY(-3px);

    background: var(--rojo-oscuro);

    box-shadow:
        0 12px 25px rgba(200, 16, 46, 0.30);
}


/* =====================================================
   DETALLES MÉDICOS EN HERO
===================================================== */

.hero::marker {
    color: var(--rojo);
}


/* =====================================================
   SECCIÓN CATEGORÍAS
===================================================== */

.categories {
    padding: 90px 7%;

    background: #ffffff;

    position: relative;
}


/* Línea decorativa superior */

.categories::before {
    content: "";

    display: block;

    width: 80px;
    height: 5px;

    background: var(--rojo);

    border-radius: 10px;

    margin: 0 auto 30px;
}


/* ---------- TÍTULO ---------- */

.section-title {
    text-align: center;

    max-width: 750px;

    margin: 0 auto 50px;
}

.section-title span {
    font-size: 11px;

    letter-spacing: 1.5px;

    font-weight: bold;

    color: var(--rojo);
}

.section-title h2 {
    margin: 10px 0 12px;

    font-size: 35px;

    line-height: 1.2;

    color: var(--azul);
}

.section-title h2::after {
    content: "";

    display: block;

    width: 45px;
    height: 4px;

    background: var(--rojo);

    border-radius: 10px;

    margin: 15px auto 0;
}

.section-title p {
    color: #69767d;

    font-size: 16px;
}


/* =====================================================
   TARJETAS
===================================================== */

.cards {
    max-width: 1150px;

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 25px;
}

.card {
    position: relative;

    padding: 35px;

    min-height: 280px;

    border: 1px solid #e5eaed;

    border-top: 5px solid var(--azul);

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 8px 30px rgba(0, 17, 120, 0.07);

    transition: 0.3s ease;

    overflow: hidden;
}


/* Cruz médica decorativa */

.card::before {
    content: "+";

    position: absolute;

    right: 22px;
    bottom: -25px;

    font-size: 120px;

    font-weight: bold;

    color: var(--rojo);

    opacity: 0.055;

    line-height: 1;
}

.card:hover {
    transform: translateY(-7px);

    box-shadow:
        0 18px 40px rgba(0, 17, 120, 0.14);

    border-color: #CBD2EA;

    border-top-color: var(--rojo);
}


/* ---------- ÍCONOS ---------- */

.card-icon {
    width: 58px;
    height: 58px;

    border-radius: 14px;

    background: var(--azul-claro);

    color: var(--azul);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 27px;

    margin-bottom: 20px;

    border: 1px solid #D9DEEF;

    transition: 0.3s;
}

.card:hover .card-icon {
    background: var(--rojo);

    color: #ffffff;

    border-color: var(--rojo);

    transform: scale(1.05);
}


/* ---------- NÚMEROS ---------- */

.number {
    position: absolute;

    top: 28px;
    right: 30px;

    font-size: 38px;

    font-weight: bold;

    color: #E9ECF7;
}


/* ---------- TÍTULOS ---------- */

.card h3 {
    position: relative;

    font-size: 22px;

    color: var(--azul);

    margin-bottom: 12px;
}


/* ---------- TEXTO ---------- */

.card p {
    max-width: 470px;

    color: #6b777e;

    font-size: 15px;

    margin-bottom: 22px;
}


/* ---------- ENLACE ---------- */

.card-link {
    position: relative;

    color: var(--rojo);

    font-size: 13px;

    font-weight: bold;

    transition: 0.3s;
}

.card-link::after {
    content: " →";

    transition: 0.3s;
}

.card:hover .card-link::after {
    margin-left: 5px;
}


/* =====================================================
   OBJETIVO
===================================================== */

.objective {
    padding: 85px 7%;

    background:

        linear-gradient(
            135deg,
            #EEF1FF,
            #F8F9FC
        );

    position: relative;

    overflow: hidden;
}

.objective::after {
    content: "+";

    position: absolute;

    right: 5%;
    top: 20px;

    font-size: 220px;

    font-weight: bold;

    color: var(--rojo);

    opacity: 0.05;
}

.objective-box {
    max-width: 900px;

    margin: auto;

    text-align: center;

    position: relative;

    z-index: 2;
}

.objective-box > span {
    font-size: 11px;

    letter-spacing: 1.5px;

    font-weight: bold;

    color: var(--rojo);
}

.objective-box h2 {
    margin: 13px 0 18px;

    color: var(--azul);

    font-size: 35px;
}

.objective-box h2::after {
    content: "";

    display: block;

    width: 55px;
    height: 5px;

    background: var(--rojo);

    margin: 18px auto;

    border-radius: 10px;
}

.objective-box p {
    color: #617078;

    font-size: 17px;
}


/* =====================================================
   GUÍA
===================================================== */

.guide {
    max-width: 1100px;

    margin: 70px auto;

    padding: 50px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            var(--azul) 0%,
            var(--azul-oscuro) 100%
        );

    color: #ffffff;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 35px;

    position: relative;

    overflow: hidden;

    box-shadow:
        0 18px 40px rgba(0, 17, 120, 0.18);
}


/* Cruz médica grande */

.guide::after {
    content: "+";

    position: absolute;

    right: 20px;
    bottom: -75px;

    font-size: 250px;

    font-weight: bold;

    color: var(--rojo);

    opacity: 0.13;

    line-height: 1;
}

.guide span {
    font-size: 11px;

    letter-spacing: 1.5px;

    font-weight: bold;

    color: #FFB8C2;
}

.guide h2 {
    margin: 10px 0;

    font-size: 31px;

    position: relative;

    z-index: 2;
}

.guide p {
    max-width: 650px;

    color: #d8e4e7;

    position: relative;

    z-index: 2;
}


/* ---------- BOTÓN GUÍA ---------- */

.outline-button {
    flex-shrink: 0;

    padding: 13px 21px;

    border: 2px solid #ffffff;

    border-radius: 8px;

    color: #ffffff;

    font-weight: bold;

    font-size: 13px;

    transition: 0.3s;

    position: relative;

    z-index: 3;
}

.outline-button:hover {
    background: var(--rojo);

    border-color: var(--rojo);

    color: #ffffff;
}


/* =====================================================
   PIE DE PÁGINA
===================================================== */

footer {
    background: #000A4D;

    color: #ffffff;

    padding: 45px 7% 25px;

    border-top: 5px solid var(--rojo);
}

.footer-content {
    max-width: 1150px;

    margin: auto;

    display: flex;

    justify-content: space-between;

    gap: 30px;

    padding-bottom: 30px;
}

.footer-content h3 {
    font-size: 18px;

    margin-bottom: 6px;
}

.footer-content p {
    color: #b8c8cd;

    font-size: 14px;
}

.footer-info {
    display: flex;

    align-items: center;

    gap: 12px;

    color: #b8c8cd;

    font-size: 13px;
}

.footer-info::before {
    content: "+";

    width: 30px;
    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: var(--rojo);

    color: #ffffff;

    border-radius: 7px;

    font-weight: bold;

    font-size: 18px;
}

.copyright {
    max-width: 1150px;

    margin: auto;

    padding-top: 20px;

    border-top:
        1px solid rgba(255,255,255,0.12);

    color: #91a5ac;

    font-size: 12px;
}


/* =====================================================
   DETALLES DE SALUD
===================================================== */

/* Punto rojo decorativo */

.categories .section-title::before {
    content: "";

    display: inline-block;

    width: 8px;
    height: 8px;

    background: var(--rojo);

    border-radius: 50%;

    margin-right: 6px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 850px) {

    .header {
        flex-direction: column;

        align-items: flex-start;
    }

    .menu {
        width: 100%;

        overflow-x: auto;

        padding-bottom: 5px;
    }

    .hero {
        min-height: 500px;

        padding: 70px 7%;
    }

    .hero h2 {
        font-size: 43px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .guide {
        margin: 50px 5%;

        padding: 35px;

        flex-direction: column;

        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-info {
        flex-wrap: wrap;
    }
}


/* =====================================================
   CELULARES
===================================================== */

@media (max-width: 520px) {

    .header {
        padding: 15px 5%;
    }

    .logo-area h1 {
        font-size: 18px;
    }

    .institution {
        font-size: 9px;
    }

    .logo-placeholder {
        width: 48px;
        height: 48px;
    }

    .menu {
        gap: 18px;
    }

    .menu a {
        font-size: 12px;
    }

    .hero {
        padding: 60px 6%;
    }

    .hero h2 {
        font-size: 37px;
    }

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

    .main-button {
        width: 100%;

        justify-content: center;
    }

    .categories {
        padding: 65px 6%;
    }

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

    .card {
        padding: 27px;
    }

    .objective {
        padding: 65px 7%;
    }

    .objective-box h2 {
        font-size: 28px;
    }

    .guide {
        margin: 35px 5%;

        padding: 28px;
    }

    .outline-button {
        width: 100%;

        text-align: center;
    }
}
