:root {
    --primary-color: #1A365D;
    --accent-color: #2B6CB0;
    --text-dark: #2D3748;
    --text-light: #4A5568; /* Un gris un poco más oscuro para mejor lectura */
    --bg-light: #F7FAFC;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    /* TEXTOS MÁS GRANDES Y ESPACIOSOS */
    font-size: 1.125rem; /* 18px base */
    line-height: 1.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Placeholders para imágenes (Borra esto cuando pongas tus <img>) --- */
.image-placeholder {
    background-color: #E2E8F0;
    border: 2px dashed #A0AEC0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-weight: bold;
    text-align: center;
    padding: 2rem;
}

/* --- Navbar --- */
.navbar {
display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* AGREGA ESTA LÍNEA: Hace que el menú se oculte y aparezca suavemente */
    transition: top 0.3s ease-in-out; 
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.navbar a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.navbar a:hover {
    color: var(--accent-color);
}

.btn-contacto {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
}

/* --- Secciones Generales --- */
.hero, .services, .about, .faq {
    padding: 6rem 5%;
}

h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1.5rem;
}

/* --- Hero Section --- */
.hero {
    background-color: var(--bg-light);
    border-bottom: 1px solid #E2E8F0;
}

.hero-container {
    display: flex;
    align-items: center; /* Centra el texto y la imagen verticalmente */
    gap: 4rem; /* Mantiene la separación de 4rem entre texto e imagen */

}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
}



.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Obliga a que la foto se vea COMPLETA dentro de las medidas del contenedor */
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.btn-primary:hover, .btn-contacto:hover {
    background-color: var(--accent-color);
}

/* --- Servicios --- */
.services h2 {
    text-align: center;
    margin-bottom: 4rem;
}

.cards-container {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    border-top: 5px solid var(--accent-color);
    /* EFECTO HOVER AGREGADO AQUÍ */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 25px rgba(0,0,0,0.1);
}

.card-image {
    height: 180px;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* --- Quiénes Somos --- */
.about {
    background-color: var(--bg-light);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image-container {
    flex: 1;
    width: 100%;
    max-width: 700px;  /* Tamaño reducido para que no se vea tan gigante */
    height: 800px;     /* Mantiene una proporción cuadrada perfecta */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;  /* Evita desbordamientos */
}

/* La imagen se adapta al contenedor sin recortarse */
.about-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ¡Clave! Muestra la foto completa del asesor con su tablet */
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Le damos un poco más de peso al texto para que ocupe el espacio extra */
.about-text {
    flex: 1.5; /* Al ser 1.5 y la imagen 1, el texto tomará un poco más de espacio en pantalla */
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
}

/* --- FAQ --- */
.faq-container {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
}

.faq-text {
    flex: 1;
}

.faq-image-container {
    flex: 1;
    width: 100%;
    max-width: 500px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: sticky;
    top: 120px; 
}

.faq-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Muestra la imagen completa sin recortes */
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.faq-item {
    background: var(--white);
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.faq-item summary {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none; /* Oculta la flecha por defecto en algunos navegadores */
    position: relative;
    padding-right: 2rem;
}

/* Agrega una flecha personalizada al acordeón */
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item p {
    margin-top: 1.5rem;
    margin-bottom: 0;
    color: var(--text-light);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5rem 5% 2rem 5%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #CBD5E0;
    text-decoration: none;
    line-height: 2.5;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: var(--white);
}

.contact-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
}

.btn-whatsapp, .btn-email {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--white);
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.btn-whatsapp { background-color: #25D366; }
.btn-whatsapp:hover { background-color: #1EBE5D; }
.btn-email { background-color: #4A5568; }
.btn-email:hover { background-color: #2D3748; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid #4A5568;
    padding-top: 2rem;
    color: #A0AEC0;
}

/* --- Estilos para las Imágenes --- */
img.hero-image{

flex: 1; /* Le dice a la imagen que comparta el espacio 50/50 con el texto */
    width: 100%; /* Obliga a la imagen a no ser más ancha que su espacio asignado */
    max-width: 500px; /* Evita que se haga gigante si la pantalla es muy grande */
    height: 450px; /* Le damos una altura fija estética */
    object-fit: cover; /* ¡La clave! Corta y acomoda la foto para que no se vea aplastada o estirada */
    border-radius: 12px; /* Bordes suaves */
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); /* Una sombra ligera elegante */
}

img.about-image, 
img.faq-image {
    width: 100%;
    object-fit: cover; /* Hace que la foto llene el espacio sin aplastarse */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

img.card-image {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ==========================================================================
   MEDIA QUERIES: ESTILOS PARA CELULARES Y TABLETAS (Pantallas < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* 1. Ajustes de Cuerpo y Texto */
    body {
        font-size: 1rem; /* Reducimos ligeramente la letra base para pantallas chicas */
    }

    h2 {
        font-size: 2rem; /* Títulos más amigables para celular */
        text-align: center;
        margin-bottom: 2rem;
    }

    /* 2. Menu de Navegación */
    .navbar {
        flex-direction: column; /* El logo arriba, el menú abajo */
        gap: 1rem;
        padding: 1rem 5%;
    }

    .navbar ul {
        flex-wrap: wrap; /* Si no caben las categorías, se bajan solas */
        justify-content: center;
        gap: 1.2rem;
    }

    .navbar a {
        font-size: 1rem;
    }

    .btn-contacto {
        padding: 0.5rem 1rem;
    }

    /* 3. Secciones Generales (Cambiamos filas por columnas) */
    .hero, .services, .about, .faq {
        padding: 4rem 5%; /* Menos espacio muerto arriba y abajo */
    }

    .hero-container, 
    .about-container, 
    .faq-container {
        flex-direction: column; /* ¡La magia! Todo se acomoda hacia abajo */
        gap: 2.5rem;
        text-align: center; /* Centramos los textos para que se vea estético */
    }

    /* 4. Ajustes en Inicio (Hero) */
    .hero h1 {
        font-size: 2.2rem; /* El título gigante del inicio ahora se adapta */
    }

    /* 5. Contenedores de Imágenes (Se adaptan al ancho del celular) */
    .hero-image-container,
    .about-image-container,
    .faq-image-container {
        max-width: 100%; /* Ocupan todo el ancho disponible del cel */
        height: auto;    /* Que la altura se adapte libremente */
        max-height: 350px; /* Evitamos que la foto se vuelva kilométrica */
    }

    /* Desactivamos el efecto sticky en móvil para que no estorbe al hacer scroll */
    .faq-image-container {
        position: static; 
    }

    /* 6. Tarjetas de Servicios */
    .cards-container {
        gap: 2rem;
    }

    .card {
        max-width: 100%; /* Las tarjetas toman todo el ancho en lugar de apretarse */
    }

    /* 7. Footer y Botones de Contacto */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .contact-buttons {
        flex-direction: column; /* Un botón arriba del otro */
        align-items: center;
        width: 100%;
    }

    .btn-whatsapp, .btn-email {
        width: 100%; /* Botones grandes y fáciles de tocar con el pulgar */
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* ... todo tu código de móvil que ya tenías ... */

    /* AGREGA ESTO AL FINAL DE LA MEDIA QUERY: */
    .navbar.scroll-hidden {
        top: -120px; /* Desplaza el navbar hacia arriba, fuera de la pantalla */
    }
}