/* --- 1. FUENTES Y VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Commissioner:wght@100..900&family=Roboto:wght@300;400;700;900&display=swap');

:root {
    --color-texto: #383838; 
    --color-verde-boton: #a8ff4d; 
    --color-verde-oscuro: #2b3d28; 
    --color-plomo: #2F302F; 
    --color-verde-texto: #4a6c2f;
    --fuente-titulos: 'Anton', sans-serif; 
    --fuente-cuerpo: 'Roboto', sans-serif; 
    --fuente-commissioner: 'Commissioner', sans-serif;
}

/* --- 2. ESTILOS GENERALES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: transparent; 
    background-image: url('images/fondo-patron.png'); 
    background-size: 1000px auto; 
    background-repeat: repeat;
    background-position: top left;
    background-attachment: fixed;
    font-family: var(--fuente-cuerpo);
    color: var(--color-texto);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; 
    overflow: visible; 
}

/* --- 3. HEADER & NAV --- */
header {
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; 
}

.logo img {
    max-height: 80px;
    display: block;
}

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

nav a {
    text-decoration: none;
    color: var(--color-texto);
    font-family: var(--fuente-commissioner);
    font-weight: 800; 
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--color-verde-texto);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 102; 
}

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

/* --- 4. HERO SECTION --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 0;
    flex-wrap: wrap;
    gap: 40px;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    position: relative;
    z-index: 2; 
}

.hero-text h1 {
    font-family: var(--fuente-commissioner);
    font-weight: 900; 
    font-size: 5rem;
    line-height: 0.9; 
    margin-bottom: 5px; 
    letter-spacing: -2.5px;
}

.hero-text p {
    font-family: var(--fuente-commissioner);
    font-weight: 800;
    font-size: 2.2rem;   
    line-height: 1.1; 
    margin-bottom: 35px;
    max-width: 600px;    
}

.btn {
    background-color: var(--color-verde-boton); 
    color: var(--color-texto); 
    padding: 8px 40px;
    text-decoration: none;
    font-family: var(--fuente-commissioner);
    font-weight: 800; 
    border-radius: 50px; 
    display: inline-block;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s, background-color 0.3s, color 0.3s;
    font-size: 1.425rem;
    border: 2px solid transparent; 
}

.btn:hover {
    transform: translateY(-3px);
    background-color: var(--color-texto); 
    color: var(--color-verde-boton);
}

.hero-img {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 300px;
    margin-top: -7.2rem; 
}

.hero-img img {
    width: 100%;
    max-width: 550px;
    mix-blend-mode: multiply;
}

/* --- 5. SECCIÓN CALIDAD --- */
.calidad-wrapper {
    margin: 115px 0 180px 0; 
    position: relative;
}

.calidad-box {
    background-color: var(--color-plomo); 
    color: white; 
    padding: 55px 50px 250px 50px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.img-rama-superpuesta {
    position: absolute;
    width: 567px; 
    bottom: -115px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 5; 
    pointer-events: none;
}

.calidad-content {
    position: relative;
    z-index: 10; 
}

.calidad-content h2 {
    font-family: var(--fuente-commissioner);
    font-weight: 900; 
    font-size: 4rem;
    margin-bottom: 25px;
    line-height: 1;
}

.calidad-content p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    font-weight: 700;
}

/* --- 6. PRODUCTOS --- */
.productos {
    padding: 60px 0;
}

.grid-productos {
    display: grid;    
    grid-template-columns: 1fr 1fr; 
    gap: 25px;
    margin-bottom: 80px; 
}

.producto-item {
    border: 2px solid var(--color-texto);
    border-radius: 15px;
    padding: 20px 30px; 
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start; 
    min-height: 250px; 
}

.producto-item:hover {
    transform: translateY(-5px);
    background-color: #a8ff4d;
    border-color: #a8ff4d; 
}

.producto-item h3 {
    font-family: var(--fuente-commissioner);
    font-weight: 900; 
    font-size: 2.85rem; 
    margin-bottom: 15px;
    line-height: 1;
    text-align: left; 
}

.producto-item p {
    font-family: var(--fuente-commissioner);
    font-weight: 600; 
    font-size: 1.23rem;
    line-height: 1.4;
    text-align: left; 
}

.boton-centrado-container {
    text-align: center;
    margin-top: 40px;
}

.productos .titulo-centrado {
    margin-bottom: 80px;
}


/* --- 7. DETRÁS DE CADA AGUACATE --- */
.detras-aguacate {
    margin: 100px 0 60px 0;
    text-align: center;
}

.titulo-centrado {
    font-family: var(--fuente-commissioner);
    font-weight: 900; 
    font-size: 2.85rem; 
    margin-bottom: 40px;
    line-height: 0.9;
    text-align: center; 
    width: 100%;       
    display: block;    
}

.columnas-info {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap; 
}

.columna {
    flex: 1; 
    min-width: 280px; 
    text-align: left; 
}

.columna p {
    font-family: var(--fuente-commissioner);
    font-weight: 600; 
    font-size: 1.23rem;
}

.imagen-palto-container {
    margin-top: 60px;
}

.imagen-palto-container img {
    width: 75%;
    max-width: 100%;
    max-height: 500px;
    margin-top: -50px;
}

/* --- 8. INSTALACIONES Y REGIONES DE CULTIVO --- */
.instalaciones {
    padding: 60px 0;
    text-align: center;
    position: relative; 
    margin-bottom: 100px; 
}

.instalaciones-grid {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    flex-wrap: wrap;
    text-align: left;
}

.inst-col {
    flex: 1;
    min-width: 320px;
}

.lista-instalaciones {
    list-style: none;
}

.lista-instalaciones li {
    margin-bottom: 25px;
    position: relative;
    padding-left: 35px;
    font-family: var(--fuente-commissioner);
    font-weight: 600;
    font-size: 1.23rem;
    color: var(--color-texto);
    line-height: 1.4;
}

.lista-instalaciones li::before {
    content: "•";
    color: var(--color-texto); 
    font-weight: bold;
    font-size: 2.2rem;
    position: absolute;
    left: 0;
    top: -12px;
}

.img-rama-palto {
    position: absolute;
    right: -100px; 
    top: calc(90% - 150px); 
    width: 600px; 
    z-index: 5;
    pointer-events: none; 
    height: auto;
}

/* --- 9. SECCIÓN: GALERÍA / CARRUSEL (Actualizada a 4 columnas) --- */
.galeria {   
    padding: 90px 0 40px 0;
    margin-bottom: 80px;
}

.carrusel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carrusel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columnas */
    grid-template-rows: repeat(2, 150px); /* Altura reducida estable */
    gap: 20px;
}

.carrusel-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    border: 2px solid var(--color-texto);
}

.carrusel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la imagen se estire */
    transition: transform 0.5s ease;
    display: block;
}

.carrusel-item:hover img {
    transform: scale(1.1);
}

/* Ajuste para que en tablets se vea en 2 columnas y en móviles mantenga la altura reducida */
@media (max-width: 992px) {
    .carrusel-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 225px);
    }
}

@media (max-width: 768px) {
    .carrusel-grid {
        display: flex; /* Carrusel deslizable en móvil */
        grid-template-columns: none;
        grid-template-rows: none;
        height: 225px; 
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
    }
    .carrusel-item {
        flex: 0 0 80%;
        scroll-snap-align: center;
    }
}

/* --- 10. CERTIFICACIONES --- */
.certificaciones {
    padding: 60px 0;
    margin-bottom: 80px;
    text-align: center;
}

.certificaciones-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.logos-cert {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    align-items: center;
    justify-items: center;
    border: 2px solid #383838;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.cert-item {
    height: auto;
    width: 100%;
    max-width: 150px; 
    mix-blend-mode: multiply;
}

.f1-c1 { grid-column: 1; grid-row: 1; }
.f1-c2 { grid-column: 2; grid-row: 1; }
.f1-c3 { grid-column: 3; grid-row: 1; }
.f1-c4 { grid-column: 4; grid-row: 1; }
.f2-c1 { grid-column: 1; grid-row: 2; }
.f2-c2 { grid-column: 2; grid-row: 2; }
.f2-c3 { grid-column: 3; grid-row: 2; }

.img-matriz-superpuesta {
    position: absolute;
    right: 20px; 
    bottom: -50px; 
    width: 340px; 
    z-index: 10; 
    pointer-events: none;
}

.separador-footer {
    border: none;
    border-top: 2px solid var(--color-texto);
    margin: 0;
}

/* --- 11. FOOTER / CONTACTO --- */
footer {
    padding-bottom: 100px;
    padding-top: 60px;
}

.contacto-container {
    display: flex;
    flex-direction: column;
}

.contacto-header {
    width: 100%;
    margin-bottom: 15px; 
}

.contacto-header h2 {
    font-family: var(--fuente-commissioner);
    font-weight: 900; 
    font-size: 2.85rem;
    line-height: 0.95; 
    margin-bottom: 15px;
}

.desc-contacto {
    font-family: var(--fuente-commissioner);
    font-weight: 600;
    font-size: 1.23rem;
}

.contacto-body {
    display: flex;
    gap: 60px; 
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start; 
}

.contacto-form {
    flex: 1;
    min-width: 300px;
}

.contacto-datos {
    flex: 1;
    min-width: 300px;
}

.contacto-item {
    margin-bottom: 30px;
}

.contacto-item strong {
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 700; 
    letter-spacing: 1px;
}

.contacto-item a {
    color: var(--color-texto);
    text-decoration: none;
    font-family: var(--fuente-commissioner);
    font-weight: 600; 
    font-size: 1.23rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: transparent; 
    border: 2px solid var(--color-texto); 
    font-family: var(--fuente-commissioner);
    font-weight: 600;
    font-size: 1.1rem;
    outline: none;
    border-radius: 12px;
    color: var(--color-texto);
}

.form-group textarea {
    height: 160px; 
    resize: none;  
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-texto);
    opacity: 1; 
}

.btn-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    background-color: var(--color-verde-boton);
    padding: 18px;
    font-weight: 700;
    border-radius: 12px; 
    color: var(--color-texto);
}



/* --- RESPONSIVE / MEDIA QUERIES --- */

/* Tablet y Móviles (Menos de 992px) */
@media (max-width: 992px) {
    .carrusel-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 225px);
    }
    
    .grid-productos {
        grid-template-columns: 1fr; /* Una sola columna para productos */
        gap: 40px;
    }
}

/* Móviles (Menos de 768px) */
@media (max-width: 768px) {
    
    /* --- 1. MENÚ HAMBURGUESA --- */
    .hamburger { display: block; z-index: 1000; position: relative; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed; left: -100%; top: 0; flex-direction: column;
        background-color: #f4f4f4; width: 100%; height: 100vh;
        text-align: center; transition: 0.3s; z-index: 999;
        justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 20px 0; }
    .nav-links li a { font-size: 1.5rem; color: var(--color-texto); }

    /* --- 2. AJUSTES GENERALES --- */
    .hero-text h1 { font-size: 3rem; }
    .hero-text p { font-size: 1.2rem; }
    .hero-img { margin-top: 20px; max-width: 100%; }
    .hero-img img { max-width: 280px; }

    /* --- 3. SECCIÓN SOMOS ORIGEN --- */
    .calidad-wrapper { margin: 60px 0 100px 0; }
    .calidad-box { padding: 40px 20px 100px 20px; }
    .calidad-content h2 { font-size: 2rem; line-height: 1.2; }
    .img-rama-superpuesta {
        display: block; width: 220px; bottom: -60px;
        left: 50%; transform: translateX(-50%);
    }

    /* --- 4. CERTIFICACIONES --- */
    .logos-cert { 
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 20px; 
        padding: 15px; 
        height: auto;
    }
    .cert-item {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100%;
        max-width: 120px; 
        margin: 0 auto;   
    }
    .img-matriz-superpuesta {
        display: block; width: 150px; right: -10px; bottom: -40px; opacity: 1;
    }

    /* --- 5. INSTALACIONES Y RAMA PALTO --- */
    .instalaciones-grid { 
        flex-direction: column; 
        gap: 30px; 
        overflow: hidden; 
        padding-bottom: 20px; 
    }
    .instalaciones-text { padding-right: 0; z-index: 2; }
    .img-rama-palto {
        display: block; position: relative; width: 280px;
        margin: 20px auto 0 auto; right: auto; top: auto; opacity: 1;
    }

    /* --- 6. CARRUSEL --- */
    .carrusel-grid {
        display: flex; height: 250px; overflow-x: auto;
        scroll-snap-type: x mandatory; gap: 15px; padding-bottom: 10px;
    }
    .carrusel-item { flex: 0 0 85%; scroll-snap-align: center; }

    /* --- 7. CONTACTO (EMAIL MÁXIMO TAMAÑO) --- */
    .contacto-body { flex-direction: column; gap: 40px; }
    .contacto-header h2 { font-size: 2rem; }
    
    /* CAMBIO: Tamaño AUMENTADO al límite */
    .contacto-item a {
        font-size: 5.5vw;    /* Mucho más grande */
        word-break: normal;
        white-space: nowrap; 
        display: block;
        letter-spacing: -1px; /* Juntamos letras para ganar espacio */
        font-weight: 700;     /* Un poco más grueso para legibilidad */
    }
}