/* Variables de Colores */
:root {
    --color-primary: #007bff; /* Azul profesional, para botones y énfasis */
    --color-secondary: #28a745; /* Verde, para acción o destacado */
    --color-dark: #343a40; /* Negro/Gris oscuro para texto */
    --color-light: #f8f9fa; /* Gris claro para fondos */
    --color-white: #ffffff;
}

/* Base y Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-dark);
    line-height: 1.6;
    background-color: var(--color-white);
    scroll-behavior: smooth; /* Desplazamiento suave al hacer clic en enlaces internos */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* --- Elementos de Tipografía y Botones --- */
h1, h2, h3 {
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    font-size: 1.8em;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 30px;
}

p {
    margin-bottom: 15px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #218838;
}

/* --- 1. Encabezado (Header) y Menú Burger --- */
header {
    background-color: var(--color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 40px;
}

/* --- ESTILOS ESPECÍFICOS DEL MENÚ BURGER (MÓVIL/TABLET) --- */

/* Ocultar la navegación por defecto en móvil */
#main-nav {
    display: none;
    position: absolute;
    top: 60px; /* Debajo del header */
    left: 0;
    width: 100%;
    background-color: var(--color-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    text-align: center;
    padding-bottom: 20px;
}

/* Mostrar la navegación cuando tiene la clase 'active' */
#main-nav.active {
    display: flex;
}

#main-nav a {
    text-decoration: none;
    color: var(--color-white);
    padding: 15px 0;
    margin: 0;
    font-size: 1.1em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#main-nav a:hover {
    color: var(--color-secondary);
    background-color: #495057;
}


/* Estilos del Botón Toggle (Burger) */
.menu-toggle {
    display: flex; 
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-dark);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Animación del X */
.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* --- 2. Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('hero_background.jpg') no-repeat center center/cover;
    color: var(--color-white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* --- 3. Logos de Aseguradoras --- */
.logos-section {
    padding: 40px 0;
    text-align: center;
    background-color: var(--color-light);
}

.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

.logo-grid img {
    max-width: 100px;
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.logo-grid img:hover {
    opacity: 1;
}

/* --- 4. Quiénes Somos (About) --- */
.about-section {
    padding: 50px 0;
    text-align: center;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 15px auto;
}

/* --- 5. Servicios Ofrecidos --- */
.services-section {
    padding: 50px 0;
    background-color: var(--color-light);
}

.service-category {
    margin-bottom: 40px;
    text-align: center;
}

.service-category h3 {
    color: var(--color-dark);
    margin-top: 20px;
    font-size: 1.5em;
}

.service-cards {
    display: flex;
    flex-direction: column; /* Apilados en móvil */
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: var(--color-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.card h4 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

/* --- 6. Testimonios --- */
.testimonials-section {
    padding: 50px 0;
    background-color: var(--color-white);
    text-align: center;
}

.testimonial-card {
    background-color: var(--color-light);
    border-left: 5px solid var(--color-secondary);
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.testimonial-card span {
    display: block;
    font-weight: 700;
    color: var(--color-primary);
}

/* --- 7. Footer --- */
footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.contact-info h3, .useful-links h3 {
    color: var(--color-white);
    margin-bottom: 15px;
}

.contact-info a, .contact-info p {
    color: var(--color-light);
    text-decoration: none;
    margin-bottom: 5px;
    display: block;
}

.contact-info a:hover {
    color: var(--color-secondary);
}

.useful-links ul {
    list-style: none;
    padding: 0;
}

.useful-links a {
    color: var(--color-light);
    text-decoration: none;
    line-height: 2;
}

.useful-links a:hover {
    color: var(--color-secondary);
}

.copyright {
    text-align: center;
    padding: 15px 0;
    font-size: 0.8em;
    background-color: #212529;
}


/* ======================================= */
/* MEDIA QUERIES (Responsive Design) */
/* ======================================= */

/* Tablet y PC (Mínimo 768px de ancho) */
@media (min-width: 768px) {
    
    /* OCULTAR EL BOTÓN BURGER EN PC/TABLET */
    .menu-toggle {
        display: none;
    }
    
    /* MOSTRAR LA NAVEGACIÓN EN HORIZONTAL EN PC/TABLET */
    #main-nav {
        display: flex;
        position: static;
        flex-direction: row;
        width: auto;
        background-color: transparent;
        box-shadow: none;
        padding-bottom: 0;
    }

    #main-nav a {
        color: var(--color-dark);
        padding: 0;
        margin-left: 25px;
        border-top: none;
    }

    .hero-content h1 {
        font-size: 3.5em;
    }

    .logo-grid img {
        max-width: 120px;
    }
    
    .service-cards {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .card {
        flex: 1;
        max-width: calc(50% - 10px);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-around;
        text-align: left;
    }

    .contact-info p {
        /* Vuelve a ser block para organizar la lista */
        display: block; 
    }
    
    .contact-info p a {
        /* Vuelve a ser block para organizar la lista */
        display: block;
    }
    
}

/* PC (Mínimo 1024px de ancho) */
@media (min-width: 1024px) {
    
    .logo img {
        height: 50px;
    }
    
    .hero-section {
        padding: 120px 0;
    }
    
    .hero-content h1 {
        font-size: 4em;
    }

    .logo-grid img {
        max-width: 150px;
    }
}