:root {
    --primary-blue: #1a3a5a;    /* Azul corporativo Loira */
    --medical-green: #27ae60;   /* Verde para acentos médicos */
    --text-gray: #444;          /* Color de texto principal */
    --light-bg: #f4f7f6;        /* Fondo gris muy claro */
    --white: #ffffff;
    --naranja: #e6631c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--text-gray);
    overflow-x: hidden;
}

/* --- HEADER Y NAVEGACIÓN --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    background: var(--primary-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px; 
}

.nav-logo {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Menú de Navegación Desktop */
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    padding: 10px 20px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav ul li a:hover { color: var(--naranja); }

/* BOTÓN HAMBURGUESA - CORREGIDO */
.menu-toggle {
    display: none; /* OCULTO POR DEFECTO EN DESKTOP */
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    color: #ffffff !important;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    width: 45px;
    height: 45px;
    padding: 0;
    /* Quitamos el display: flex de aquí para que el 'none' funcione */
}

/* --- SECCIONES --- */
.hero {
    height: 500px;
    background: url('../imagenes/FondoIndex.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.quick-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 60px 10%;
    background: var(--light-bg);
}

.service-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.service-card i {
    font-size: 2.5rem;
    color: var(--medical-green);
    margin-bottom: 15px;
}

.welcome {
    display: flex;
    flex-wrap: wrap;
    padding: 80px 10%;
    gap: 50px;
    align-items: center;
}

.welcome-text { flex: 1; min-width: 300px; }
.welcome-video { flex: 1; min-width: 300px; }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.directory {
    padding: 80px 10%;
    background: url('../imagenes/fondo directorio medico.svg') center center / cover no-repeat;
    background-color: var(--primary-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.directory h2 {
    margin: 0 0 20px 0;
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: bold;
}

.directory p {
    color: var(--white);
    max-width: 850px;
    margin-bottom: 40px;
}

.btn-more {
    padding: 12px 30px;
    background-color: var(--naranja);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.directory .btn-more {
    background-color: #f17a28;
    border-radius: 50px;
}

/* --- FOOTER --- */
footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 60px 10% 30px 10%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

/* --- MEDIA QUERIES (Móvil) --- */
@media (max-width: 768px) {
    header {
        padding: 0 5%;
        justify-content: space-between; 
    }

    .menu-toggle {
        display: flex; /* SÓLO SE ACTIVA EN MÓVIL */
        align-items: center;
        justify-content: center;
    }

    .nav-logo {
        height: 50px; 
    }

    nav {
        position: absolute;
        top: 80px; 
        left: 0;
        width: 100%;
        background: var(--primary-blue);
        flex-direction: column;
        max-height: 0; 
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 15px rgba(0,0,0,0.3);
    }

    nav.active {
        max-height: 600px; 
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }

    nav ul li a {
        padding: 18px;
        display: block;
        text-align: center;
    }

    .hero { height: 280px; }
    .directory h2 { font-size: 2.2rem; }
}