/* ==========================================================================
   1. VARIABLES GLOBALES Y RESET
   ========================================================================== */
:root {
    --primary-color: #0d9488;    /* Verde agua / Teal médico */
    --secondary-color: #0f172a;  /* Azul oscuro / Slate para textos y títulos */
    --accent-color: #38bdf8;     /* Azul claro para detalles y enlaces */
    --bg-light: #f8fafc;         /* Fondo gris muy claro */
    --white: #ffffff;
    --text-muted: #64748b;       /* Gris para textos secundarios */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--secondary-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   2. COMPONENTES COMUNES (BOTONES)
   ========================================================================== */
.btn-cta {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-cta:hover {
    background-color: #0f766e; /* Un tono más oscuro al pasar el mouse */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* ==========================================================================
   3. ESTRUCTURA: NAVBAR (HEADER)
   ========================================================================== */
.navbar {
    background-color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-login {
    background-color: #e0f2fe;
    color: #0369a1 !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-login:hover {
    background-color: #bae6fd;
}

/* Menú hamburguesa oculto por defecto en escritorio */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

/* ==========================================================================
   4. SECCIÓN HERO (LANDING)
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.60)), url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?q=80&w=2070') no-repeat center center/cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ==========================================================================
   5. SECCIÓN ACERCA DE (ABOUT-SUMMARY)
   ========================================================================== */
.about-summary {
    padding: 80px 8%;
    background-color: var(--white);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.about-features li {
    margin-bottom: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-features i {
    color: var(--primary-color);
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ==========================================================================
   6. SECCIÓN TARJETAS DE SERVICIOS
   ========================================================================== */
.services-summary {
    padding: 80px 8%;
    text-align: center;
}

.services-summary h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.services-more .btn-text {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.services-more .btn-text:hover {
    gap: 15px;
}

/* ==========================================================================
   7. BANNER DE LLAMADA A LA ACCIÓN (CTA BANNER)
   ========================================================================== */
.cta-banner {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 8%;
    text-align: center;
}

.cta-banner-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.cta-banner-content p {
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta-light {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-cta-light:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* ==========================================================================
   8. FOOTER (PIE DE PÁGINA)
   ========================================================================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 8% 20px 8%;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 40px;
}

.footer-info, .footer-contact, .footer-socials {
    flex: 1;
    min-width: 200px;
}

.footer h3, .footer h4 {
    margin-bottom: 20px;
}

.footer p {
    color: #94a3b8;
    margin-bottom: 10px;
}

.footer-contact i {
    color: var(--primary-color);
    margin-right: 8px;
}

.footer-socials a {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-right: 15px;
    transition: var(--transition);
}

.footer-socials a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: #64748b;
    font-size: 0.9rem;
}

/* ==========================================================================
   9. RESPONSIVE DESIGN (MÓVILES)
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 5%;
    }
    
    /* Nueva estructura para el menú desplegable en móviles */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        right: 0px;
        top: 70px;
        height: 90vh;
        background-color: var(--white);
        width: 70%;
        transform: translateX(100%); /* Lo esconde a la derecha */
        transition: var(--transition);
        box-shadow: -10px 10px 20px rgba(0,0,0,0.05);
        padding: 40px 20px;
        justify-content: flex-start;
        gap: 30px;
        z-index: 99;
    }

    /* Clase que activará JavaScript al hacer clic */
    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .menu-toggle {
        display: block;
    }

    /* Animación del botón hamburguesa a una "X" */
    .toggle-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .toggle-active .bar:nth-child(2) {
        opacity: 0;
    }
    .toggle-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .about-container {
        flex-direction: column;
    }
}