/* Restablecimiento básico y estilos generales */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Esto le dice al navegador: "deja 100px libres arriba cuando saltes a una sección" */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fafafa;
}

/* Estilos del Encabezado y Menú */
header {
    background-color: #ffffff;
    padding: 1.5rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 15px;
}

.logo-enlace {
    display: block; /* Asegura que el enlace se comporte como bloque */
}

.logo-img {
    max-height: 140px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: #1b4332;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s;
}

nav a:hover {
    color: #fca311;
}

/* Sección Principal (Hero) */
.hero {
    background-color: #d8f3dc;
    padding: 5rem 5%;
    text-align: center;
    border-bottom: 5px solid #fca311;
}

.hero h1 {
    color: #081c15;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
}

.btn-principal {
    background-color: #fca311;
    color: #14213d;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.btn-principal:hover {
    background-color: #e59800;
}

/* --- Sección Quiénes Somos --- */
.seccion-nosotros {
    padding: 5rem 5%;
    background-color: #ffffff;
    text-align: center;
}

.seccion-nosotros h2 {
    color: #1b4332;
    font-size: 2.2em;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.seccion-nosotros h2::after,
.seccion-novedades h2::after,
.seccion-proyectos h2::after,
.seccion-contacto h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: #fca311;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.contenedor {
    max-width: 900px;
    margin: 0 auto;
}

.seccion-nosotros p {
    font-size: 1.2em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

/* --- Sección Novedades y Catálogo --- */
.seccion-novedades {
    padding: 5rem 5%;
    background-color: #ffffff;
    text-align: center;
}

.seccion-novedades h2 {
    color: #1b4332;
    font-size: 2.2em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.grid-novedades {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.tarjeta-novedad {
    background-color: #f8f9fa;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    max-width: 320px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tarjeta-novedad:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.icono-producto {
    font-size: 3em;
    margin-bottom: 15px;
}

.tarjeta-novedad h3 {
    color: #1b4332;
    margin-top: 0;
    font-size: 1.3em;
}

.tarjeta-novedad p {
    color: #555;
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-whatsapp {
    display: inline-block;
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: auto;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* --- Sección Proyectos --- */
.seccion-proyectos {
    padding: 5rem 5%;
    background-color: #f4f9f4;
    text-align: center;
}

.seccion-proyectos h2 {
    color: #1b4332;
    font-size: 2.2em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.grid-proyectos {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.tarjeta-proyecto {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 400px;
    border-top: 4px solid #2E7D32;
    text-align: left;
    transition: transform 0.3s;
}

.tarjeta-proyecto:hover {
    transform: translateY(-5px);
}

.tarjeta-proyecto h3 {
    color: #2E7D32;
    margin-top: 0;
}

/* --- Sección Contacto --- */
.seccion-contacto {
    padding: 5rem 5%;
    background-color: #ffffff;
    text-align: center;
}

.seccion-contacto h2 {
    color: #1b4332;
    font-size: 2.2em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.info-contacto {
    background-color: #1b4332;
    color: white;
    padding: 40px 30px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-size: 1.1em;
    line-height: 1.8;
    border-bottom: 5px solid #fca311;
}

.info-contacto p {
    margin: 10px 0;
}

/* --- Formulario de Contacto --- */
.grid-contacto {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.formulario-web {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    text-align: left;
    border-top: 4px solid #1b4332;
}

.formulario-web h3 {
    color: #1b4332;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.formulario-web input,
.formulario-web textarea {
    width: 100%;
    display: block;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.formulario-web button {
    width: 100%;
    border: none;
    cursor: pointer;
    display: block;
}

/* --- Footer --- */
footer {
    background-color: #081c15;
    color: #888;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

/* --- ESTILOS DEL MENÚ HAMBURGUESA --- */

/* Por defecto, el botón está oculto en la computadora */
.menu-hamburguesa {
    display: none;
    background: none;
    border: none;
    font-size: 35px;
    color: #1b4332;
    cursor: pointer;
}

/* === REGLAS EXCLUSIVAS PARA CELULARES === */
@media (max-width: 768px) {
    header {
        display: flex;
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        width: 100%; 
        padding: 15px 20px;
        box-sizing: border-box; 
    }

    header .logo-img {
        max-width: 160px; 
        height: auto;
        margin: 0; 
    }

    .menu-hamburguesa {
        display: block;
        margin: 0;
    }
    
    nav#menu-principal {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        text-align: center;
        z-index: 1000;
    }

    nav#menu-principal.activo {
        display: flex;
    }

    nav#menu-principal a {
        padding: 15px;
        border-bottom: 1px solid #eeeeee;
        display: block;
        margin: 0;
    }
}