/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --hdcm-blue-dark: #004489;
    --hdcm-blue-medium: #1c73e8;
    --hdcm-blue-light: #5EB3E6;
    --hdcm-green-soft: #4CAF50;
    --hdcm-bg-light: #f8f9fa;
    --hdcm-text-dark: #333;
}

/* =========================================================
   BASE
   ========================================================= */

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--hdcm-text-dark);
    background: #ffffff;
}

a {
    text-decoration: none;
}

/* =========================================================
   HEADER
   ========================================================= */

.main-header {
    background: linear-gradient(135deg, var(--hdcm-blue-dark), var(--hdcm-blue-medium));
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo Hospital (tarjeta blanca) */
.logo-box {
    width: 115px;
    height: 115px;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Textos */
.hospital-name {
    font-size: 1.32rem;
    font-weight: 600;
}

.hospital-subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Icono Google Maps */
.location-map-link .map-icon {
    width: 30px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.25));
    transition: transform .2s ease;
}

.location-map-link:hover .map-icon {
    transform: scale(1.15);
}

/* Logo Ministerio (tarjeta igual al Hospital) */
.ministry-link {
    display: flex;
    align-items: center;
}

.ministry-box {
    width: 115px;
    height: 115px;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.ministry-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* NAVBAR */

.header-nav {
    background: rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
}

.nav-menu .nav-link {
    color: #fff !important;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    margin: 0 0.25rem;
    font-weight: 500;
}

.nav-menu .nav-link:hover {
    background: rgba(255,255,255,0.27);
}

/* =========================================================
   HERO
   ========================================================= */

.hero-hdcm {
    background: linear-gradient(135deg, var(--hdcm-blue-medium), var(--hdcm-blue-light));
    color: white;
    text-align: center;
    padding: 4rem 1.5rem;
}

.hero-inner {
    max-width: 900px;
    margin: auto;
}

.hero-hdcm h1 {
    font-size: clamp(2rem, 3vw, 2.7rem);
    font-weight: 700;
}

.hero-hdcm p {
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* =========================================================
   TARJETAS PRINCIPALES
   ========================================================= */

.cards-grid {
    padding: 3.5rem 0;
}

.hdcm-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all .25s ease;
    border-top: 4px solid var(--hdcm-blue-dark);
}

.hdcm-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.15);
}

.hdcm-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--hdcm-blue-dark), var(--hdcm-blue-light));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

/* Botones */
.btn-hdcm {
    background-color: #1877F2; /* Azul oficial Facebook */
    color: #ffffff;
    border: none;
    font-weight: 600;
    border-radius: 50px;
    padding: 8px 18px;
    transition: all 0.3s ease;

    display: inline-flex;
    align-items: center;
    gap: 8px;
    
}

.btn-hdcm:hover {
    background-color: #0d6efd; /* Azul más oscuro */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.btn-hdcm-green {
    background: linear-gradient(135deg, var(--hdcm-green-soft), #57d66a);
    border: none;
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 1.6rem;
    font-weight: 600;
}
.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    border: none;

    background: linear-gradient(
        45deg,
        #405DE6,
        #5851DB,
        #833AB4,
        #C13584,
        #E1306C,
        #F56040,
        #FCAF45
    );

    transition: all 0.3s ease;
}

.btn-instagram i {
    font-size: 16px;
}

.btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}
/* =========================================================
   SERVICIOS
   ========================================================= */

.services-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

.services-section h2 {
    font-size: 2.2rem;
    color: var(--hdcm-blue-dark);
    margin-bottom: 2rem;
}

.service-item {
    background: #fff;
    border-radius: 14px;
    padding: 1.8rem 1.5rem;
    border-left: 4px solid var(--hdcm-blue-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
    transition: all .25s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

/* =========================================================
   CONTACTO
   ========================================================= */

.contact-section {
    background: linear-gradient(135deg, var(--hdcm-blue-dark), #00284f);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.contact-item {
    background: rgba(255,255,255,0.12);
    padding: 1.8rem;
    border-radius: 14px;
}

/* =========================================================
   COMUNIDAD
   ========================================================= */

#comunidad {
    background: #f4f7fb;
    padding: 2rem 0;
    text-align: center;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    background: #111;
    color: #eee;
    padding: 2rem 0;
    border-top: 4px solid var(--hdcm-blue-medium);
    text-align: center;
}

.site-footer a {
    color: var(--hdcm-blue-light);
}

.site-footer a:hover {
    color: #fff;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .logo-box,
    .ministry-box {
        width: 85px;
        height: 85px;
        padding: 6px;
    }

    .ministry-logo {
        max-height: 55px;
    }

    .hospital-name {
        font-size: 1.12rem;
    }
}
