/* ======================================= */
/* === 1. VARIABLES Y ESTILOS BASE === */
/* ======================================= */

:root {
    /* Colores basados en el logo UTL EDIFICACIONES (Gris/Negro) */
    --primary-color: #333333;   /* Gris oscuro/Negro principal */
    --secondary-color: #666666;  /* Gris medio para detalles y hover */
    --text-color: #333;
    --bg-color: #f8f8f8;     /* Fondo de la página */
    --white-color: #ffffff;  /* Blanco puro */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* ======================================= */
/* === 2. ENCABEZADO Y NAVEGACIÓN (Desktop Centrado) === */
/* ======================================= */

.site-header {
    background-color: var(--white-color);
    padding: 1rem 0; 
    /* Flexbox para centrar y apilar verticalmente (Logo arriba, Nav abajo) */
    display: flex;
    flex-direction: column; 
    align-items: center; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: 2px solid var(--secondary-color);
}

.site-header .site-logo {
    max-height: 80px; /* Tamaño del logo en desktop */
    width: auto;
    margin-bottom: 1rem; /* Espacio entre el logo y el menú */
}

/* Ocultar el botón de hamburguesa en desktop */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Navegación principal - Centrada */
.main-nav {
    width: 100%; 
    text-align: center;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; 
    justify-content: center; /* CLAVE: Centra los enlaces */
    flex-wrap: wrap; 
}

.main-nav a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1.5rem; 
    display: block;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.main-nav a:hover {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}


/* ======================================= */
/* === 3. CONTENIDO PRINCIPAL Y BOTONES === */
/* ======================================= */

.content-section {
    padding: 2rem;
    max-width: 800px; /* Limita el ancho del contenido */
    margin: 0 auto; /* Centra el contenido */
    
    background-color: var(--white-color);
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    margin-top: 2rem; 
    margin-bottom: 2rem; 
    border-radius: 8px;
    min-height: 40vh; 
}

.content-section button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.content-section button:hover {
    background-color: var(--secondary-color);
}

/* ======================================= */
/* === 4. PIE DE PÁGINA (FOOTER) === */
/* ======================================= */

.site-footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 1.5rem;
}

.site-footer a {
    color: var(--white-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--secondary-color);
}


/* ======================================= */
/* === 5. MEDIA QUERIES (RESPONSIVIDAD) === */
/* ======================================= */

@media (max-width: 768px) {
    
    /* Header compacto para móvil */
    .site-header {
        flex-direction: row; /* Logo a la izquierda, botón a la derecha */
        justify-content: space-between; 
        padding: 0.5rem 1rem;
    }

    .site-header .site-logo {
        max-height: 50px; /* Logo más pequeño en móvil */
        margin-bottom: 0;
    }
    
    /* El botón de hamburguesa se hace visible */
    .menu-toggle {
        display: block; 
    }

    /* Navegación (Menú de hamburguesa) */
    .main-nav {
        display: none; /* Oculto por defecto */
        position: absolute;
        top: 65px; /* Colócalo justo debajo del header */
        left: 0;
        width: 100%;
        background-color: var(--primary-color); 
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    .main-nav.active {
        display: flex; /* Se muestra al hacer clic */
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--white-color); /* Enlaces blancos en el menú desplegado */
    }

    .main-nav a:hover {
        border-bottom: none;
        background-color: var(--secondary-color);
    }
    
    /* Animación del icono de hamburguesa a "X" */
    .menu-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .hamburger:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .hamburger:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
/* ======================================= */
/* === ESTILOS PARA LA SECCIÓN HOME (IMPACTANTE) === */
/* ======================================= */

.home-section.hero-section {
    position: relative;
    height: 70vh; /* Altura de la sección (70% del viewport height) */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white-color); /* Color de texto blanco por defecto para esta sección */
    text-align: center;
    overflow: hidden; /* Asegura que la imagen de fondo no se desborde */

    /* Quitar estilos previos de content-section para la home */
    padding: 0;
    max-width: none;
    margin: 0;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;

    /* Aquí va la imagen de fondo - ¡DEFINE LA TUYA! */
    background-image: url('../img/home-hero-bg.jpeg'); /* RUTA DE TU IMAGEN */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Capa oscura semitransparente */
    z-index: 1; /* Asegura que esté sobre la imagen pero debajo del contenido */
}

.hero-content {
    position: relative;
    z-index: 2; /* Asegura que el contenido esté sobre la capa oscura */
    max-width: 900px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5em; /* Título grande */
    margin-bottom: 0.5em;
    color: var(--white-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* Sombra para mejor legibilidad */
}

.hero-subtitle {
    font-size: 1.5em;
    margin-bottom: 2em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-buttons button {
    /* Estilos base de botón, sobreescritos para la home */
    padding: 1rem 2rem;
    font-size: 1.1em;
    margin: 0 10px;
    border: 2px solid var(--white-color); /* Borde blanco para contraste */
    background-color: rgba(255, 255, 255, 0.1); /* Fondo semitransparente */
    color: var(--white-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hero-buttons button:hover {
    background-color: var(--secondary-color); /* Hover a gris medio */
    border-color: var(--secondary-color);
}

/* Estilo para el botón secundario */
.hero-buttons .btn-secondary {
    background-color: var(--primary-color); /* Fondo oscuro */
    border-color: var(--primary-color);
    color: var(--white-color);
}

.hero-buttons .btn-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Responsividad para la hero-section */
@media (max-width: 768px) {
    .home-section.hero-section {
        height: 60vh; /* Menos altura en móviles */
    }

    .hero-content h1 {
        font-size: 2.2em; /* Título más pequeño */
    }

    .hero-subtitle {
        font-size: 1.1em;
    }

    .hero-buttons button {
        display: block; /* Botones apilados en móvil */
        width: 80%;
        margin: 10px auto; /* Centrados y con espacio */
        font-size: 1em;
        padding: 0.8rem 1.5rem;
    }
}
/* ======================================= */
/* === ESTILOS PARA LA SECCIÓN DE CONTACTO === */
/* ======================================= */

.contact-section {
    text-align: center;
}

.contact-intro {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.contact-grid {
    display: flex;
    gap: 30px;
    text-align: left;
    margin-bottom: 3rem;
}

.contact-form-container,
.contact-info-container {
    padding: 20px;
    border-radius: 8px;
    background-color: var(--white-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.contact-form-container {
    flex: 2; /* El formulario ocupa más espacio */
}

.contact-info-container {
    flex: 1; /* La información ocupa menos espacio */
}

.contact-info-container h3,
.contact-form-container h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    color: var(--primary-color);
}

/* Estilos del Formulario */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.contact-form button[type="submit"] {
    /* Reutilizar el estilo de botón principal */
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

/* Estilos de la Info y Mapa */
.info-block {
    margin-bottom: 25px;
}

.map-container {
    text-align: center;
}

.map-container iframe {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .contact-grid {
        flex-direction: column; /* Apila el formulario y la info en móvil */
        gap: 20px;
    }
}