/* --- Variables y Reset --- */
:root {
    --primary-color: #0056b3; /* Azul Médico */
    --primary-dark: #003d80;
    --accent-color: #00c4cc;  /* Cian/Verde Salud */
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; color: var(--primary-dark); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Utilidades --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-block; padding: 12px 25px; border-radius: 50px; font-weight: 600; text-align: center; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--primary-color); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline-white { border-color: var(--white); color: var(--white); }
.btn-outline-white:hover { background: var(--white); color: var(--primary-color); }
.btn-white { background: var(--white); color: var(--primary-color); }
.text-center { text-align: center; }

/* --- Top Bar --- */
.top-bar { background: var(--primary-dark); color: var(--white); font-size: 0.9rem; padding: 10px 0; }
.top-bar-content { display: flex; justify-content: space-between; align-items: center; }
.contact-info a { margin-right: 20px; color: #ddd; }
.contact-info a:hover { color: var(--accent-color); }
.portal-link a { color: var(--accent-color); font-weight: 600; }

/* --- Header & Nav --- */
.main-header { background: var(--white); padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.navbar-content { display: flex; justify-content: space-between; align-items: center; }
.nav-menu ul { display: flex; gap: 30px; }
.nav-link { font-weight: 600; font-size: 1rem; color: var(--text-dark); }
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.mobile-only, .close-menu, .hamburger { display: none; }

/* --- Hero Section --- */
.hero { 
    background: url('https://images.unsplash.com/photo-1505751172876-fa1923c5c528?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 50, 100, 0.7); }
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; color: var(--white); line-height: 1.2; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.badge { background: var(--accent-color); color: var(--primary-dark); padding: 5px 15px; border-radius: 4px; font-weight: bold; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 15px; display: inline-block; }
.hero-buttons { display: flex; gap: 15px; }

/* --- Quick Access (Tarjetas Flotantes) --- */
.quick-access { margin-top: -50px; position: relative; z-index: 10; padding-bottom: 50px;}
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quick-card { background: var(--white); padding: 30px; border-radius: 8px; box-shadow: var(--shadow); text-align: center; transition: var(--transition); }
.quick-card i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }
.quick-card:hover { transform: translateY(-5px); }
.quick-card.highlight { background: var(--accent-color); color: var(--primary-dark); }
.quick-card.highlight i { color: var(--primary-dark); }

/* --- Servicios --- */
.section { padding: 80px 0; }
.section-header { margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.bg-light { background: var(--light-bg); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-item { background: var(--white); padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border-bottom: 3px solid transparent; transition: var(--transition); }
.service-item:hover { border-bottom-color: var(--primary-color); transform: translateY(-5px); }
.icon-box { width: 60px; height: 60px; background: rgba(0, 86, 179, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-size: 1.5rem; margin-bottom: 20px; }

/* --- Nosotros (Grid 2 col) --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-image img { border-radius: 10px; box-shadow: var(--shadow); }
.accordion-item { background: var(--white); padding: 20px; margin-bottom: 15px; border-radius: 8px; border-left: 4px solid var(--accent-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.accordion-item h4 { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

/* --- CTA Section --- */
.cta-section { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); color: var(--white); padding: 80px 0; text-align: center; }
.cta-content h2 { color: var(--white); margin-bottom: 15px; }
.cta-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }

/* --- Footer --- */
.main-footer { background: #222; color: #bbb; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-info h3 { color: var(--white); margin-bottom: 15px; }
.social-icons a { color: var(--white); background: rgba(255,255,255,0.1); width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; margin-right: 10px; transition: var(--transition); }
.social-icons a:hover { background: var(--primary-color); }
.footer-links ul li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--primary-color); }
.copyright { text-align: center; border-top: 1px solid #333; padding-top: 20px; font-size: 0.9rem; }

/* --- WhatsApp Float --- */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background: #25d366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 999; transition: var(--transition); }
.whatsapp-float:hover { transform: scale(1.1); }

/* --- Responsive Design (Mobile First Approach) --- */
@media (max-width: 991px) {
    .hero h1 { font-size: 2.5rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .top-bar { display: none; } /* Ocultar barra superior en móvil */
    
    .hamburger { display: block; font-size: 1.5rem; cursor: pointer; color: var(--primary-color); margin-left: 15px; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        padding: 80px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s ease;
        display: flex;
        flex-direction: column;
    }
    
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; gap: 20px; }
    .close-menu { display: block; position: absolute; top: 20px; right: 30px; font-size: 1.8rem; cursor: pointer; }
    .mobile-only { display: block; margin-top: 20px; }
    
    .hero { height: auto; padding: 100px 0 60px; text-align: center; }
    .hero-content { margin: 0 auto; }
    .hero-buttons { flex-direction: column; }
    
    .quick-grid { grid-template-columns: 1fr; }
    .quick-access { margin-top: 0; padding-top: 50px; }
    
    .cta-buttons { flex-direction: column; }
    
    /* Ocultar botón CTA del header en móvil para evitar saturación, ya está en el menú */
    .btn-cta { display: none; }
}

/* --- Ajuste del Logo en el Header --- */
.logo img {
    /* Cambia este valor si lo quieres más grande o más pequeño */
    max-width: 300px; 
    
    /* Esto asegura que no se deforme */
    height: auto; 
    display: block;
}

/* Opcional: Ajuste para celulares si aún se ve muy grande */
@media (max-width: 768px) {
    .logo img {
         max-width: 150px;
    }
}