/* css/main.css */
/* Importa las variables de color */
@import url('palette.css');

/* --- Reseteo y Estilos Globales --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Ajusta para el header fijo */
}

body {
    font-family: 'Encode Sans Semi Expanded', sans-serif;
    background-color: var(--color-white);
    color: var(--color-text-primary);
    line-height: 1.6;
    font-weight: 400;
}

h1, h2, h3 {
    font-family: 'Encode Sans Semi Expanded', sans-serif;
    color: var(--color-dark-gray);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-green-hover);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--color-primary-green);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-green-hover);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* --- Header y Navegación --- */
.header {
    background-color: var(--color-white);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 50px;
    display: block;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--color-dark-gray);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle svg { /* Selector para el SVG del menú */
    width: 32px;
    height: 32px;
    stroke: var(--color-dark-gray); /* Color del icono */
    transition: stroke 0.3s ease;
}

.nav-toggle:hover svg {
    stroke: var(--color-primary-green);
}


/* --- Sección Hero --- */
.hero {
    background-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('../img/bg_inicio_maxisacos.webp'); /* Capa blanca semi-transparente + imagen */
    background-size: cover;
    background-position: center;
    padding: 180px 0 100px; /* Más padding superior por la imagen */
    text-align: center;
    position: relative;
    overflow: hidden; /* Asegura que el blur no se salga */
}

/* Pseudo-elemento para el blur de la imagen de fondo */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/bg_inicio_maxisacos.webp');
    background-size: cover;
    background-position: center;
    filter: blur(5px); /* Ajusta el valor del blur según tu preferencia */
    z-index: -1; /* Para que esté detrás del contenido */
}

.hero-content {
    position: relative; /* Asegura que el contenido esté por encima del pseudo-elemento */
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem; /* Un poco más grande para el impacto */
    margin-bottom: 1rem;
    color: var(--color-dark-gray); /* Asegura contraste con el fondo claro */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1); /* Sombra sutil para legibilidad */
}

.hero-content p {
    font-size: 1.3rem; /* Más grande para legibilidad */
    color: var(--color-text-primary); /* Asegura contraste */
    max-width: 700px;
    margin: 0 auto 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}


/* --- Sección Nosotros --- */
.about-us-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

/* --- Sección Productos --- */
.products {
    background-color: var(--color-background-light);
}

.product-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
    background: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid var(--color-border);
}

.product-intro-icon {
    width: 60px;
    height: 60px;
    /* Estilo para SVG importado, heredará el color del texto si se usa currentColor */
    fill: currentColor; /* Esto hará que el SVG tome el color de su elemento padre */
    color: var(--color-primary-green); /* O el color que desees para el icono */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.product-card h3 {
    color: var(--color-primary-green);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* --- Sección Sostenibilidad --- */
.sustainability {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Sección Contacto --- */
.contact {
    background-color: var(--color-background-light);
}

.contact h2, .contact .section-subtitle {
    text-align: center;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary); /* Color base para los textos de contacto */
}

.contact-item svg { /* Estilo para SVG importado directamente */
    width: 32px;
    height: 32px;
    stroke: var(--color-primary-green); /* Color para el contorno del icono */
    fill: none; /* Asegura que el icono no tenga relleno si es un contorno */
    stroke-width: 2; /* Grosor del contorno */
    flex-shrink: 0; /* Evita que el SVG se encoja */
}

.contact-item a {
    color: var(--color-text-primary); /* Color del texto del enlace de contacto */
}

.contact-item a:hover {
    color: var(--color-primary-green);
}

/* --- Footer --- */
.footer {
    background-color: var(--color-dark-gray);
    color: var(--color-white);
    padding: 40px 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-white);
}

.footer-links a:hover {
    color: var(--color-primary-green);
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Responsividad para Móviles --- */
@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    .hero-content h1 { font-size: 2.5rem; } /* Ajuste para móviles */
    .hero-content p { font-size: 1rem; }
    
    .nav-list {
        position: fixed;
        top: 80px; /* Altura del header */
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        width: 100%;
        height: calc(100vh - 80px);
        align-items: center;
        padding-top: 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999; /* Asegura que esté por encima de otros elementos */
    }

    .nav-list.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
    }

    .contact-details {
        flex-direction: column;
        gap: 30px;
    }
}