/* ======== CONFIGURACIÓN GENERAL ======== */
:root {
    --primary-blue: #0056b3; /* Azul principal del logo */
    --dark-blue: #002349;    /* Azul oscuro para footer */
    --accent-green: #28a745; /* Verde del logo */
    --light-gray: #f8f9fa;   /* Fondo claro para secciones */
    --text-dark: #333;
    --text-light: #fff;
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== HEADER ======== */
.main-header {
    background: var(--text-light);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.logo img { height: 40px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav ul li a { padding: 10px 15px; text-decoration: none; color: var(--text-dark); font-weight: bold; }
.cta-button { background-color: var(--accent-green); color: var(--text-light); padding: 10px 20px; border-radius: 5px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; }
.cta-button:hover { background-color: #218838; }

/* ======== HERO SECTION ======== */
.hero-section {
    background: url('../images/hero-background.jpg') no-repeat center center/cover;
    background-color: var(--primary-blue);
    color: var(--text-light);
    text-align: center;
    padding: 120px 0;
}
.hero-content h1 { font-family: var(--font-headings); font-size: 48px; margin-bottom: 20px; }
.hero-content p { font-size: 20px; max-width: 700px; margin: 0 auto 30px; }
.cta-button.primary { padding: 15px 35px; font-size: 18px; }

/* ======== VALUE PROPOSITION ======== */
.value-section { padding: 80px 0; text-align: center; }
.value-section h2 { font-family: var(--font-headings); font-size: 36px; margin-bottom: 50px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.value-item h3 { font-family: var(--font-headings); color: var(--primary-blue); }

/* ======== SERVICES ======== */
.services-section { padding: 80px 0; background-color: var(--light-gray); text-align: center; }
.services-section h2 { font-family: var(--font-headings); font-size: 36px; margin-bottom: 50px; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); text-align: left; overflow: hidden; transition: transform 0.3s ease; }
.service-card:hover { transform: translateY(-10px); }
.service-card img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h3 { font-family: var(--font-headings); margin-top: 0; }
.card-content a { color: var(--primary-blue); text-decoration: none; font-weight: bold; }

/* ======== FOOTER ======== */
.main-footer { background-color: var(--dark-blue); color: #ccc; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 40px; }
.footer-logo { height: 40px; margin-bottom: 20px; }
.footer-item h4 { font-family: var(--font-headings); color: var(--text-light); font-size: 18px; }
.footer-item ul { list-style: none; padding: 0; }
.footer-item ul li a { color: #ccc; text-decoration: none; line-height: 2; }
.footer-bottom { text-align: center; padding: 20px 0; margin-top: 40px; border-top: 1px solid #3f5c7a; }


/* ======== MEDIA QUERIES PARA DISEÑO ADAPTABLE ======== */

/* --- Para Tablets y Móviles Grandes (hasta 992px) --- */
@media (max-width: 992px) {
    .value-grid, .services-grid, .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Para Móviles (hasta 768px) --- */
@media (max-width: 768px) {
    /* --- Ajustes Generales --- */
    .container {
        padding: 0 15px;
    }

    /* --- Header y Navegación (versión inicial apilada) --- */
    /* Estas reglas ya no son necesarias gracias al menú hamburguesa,
       pero no estorban. Las nuevas reglas de abajo las sobreescriben. */
    .main-header .container {
        flex-direction: row; /* Lo devolvemos a su estado original para alinear logo y hamburguesa */
        padding: 10px 15px;
    }

    /* --- Hero Section --- */
    .hero-content h1 {
        font-size: 36px;
    }
    .hero-content p {
        font-size: 16px;
    }

    /* --- Grids (Value & Services & Footer) --- */
    .value-grid, .services-grid, .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-grid {
        text-align: center;
    }
    .footer-item ul {
        padding: 0;
    }

    /* --- Títulos de Sección --- */
    .value-section h2, .services-section h2 {
        font-size: 28px;
    }
}

/* ======== ESTILOS PARA EL MENÚ HAMBURGUESA ======== */

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--dark-blue);
    transition: all 0.2s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--dark-blue);
    transition: all 0.2s ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* --- Ajustes en las Media Queries para el menú --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 60%;
        background: var(--dark-blue);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .main-nav.active {
        transform: translateX(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .main-nav ul li a {
        color: var(--text-light);
        font-size: 18px;
        padding: 20px;
        border: none;
    }
    
    .main-header .cta-button {
        display: none;
    }
}