/* ========== RESET & VARIABLES ========== */
:root {
    --azul: #1D3557;
    --azul-hover: #142b47;
    --arena: #E2DCD5;
    --arena-dark: #DED7CD;
    --gris-perla: #D1D5DB;
    --gris-perla-light: #e8e8e8;
    --blanco: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', 'Helvetica Neue', sans-serif;
    --transition: 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow: 0 8px 30px rgba(29, 53, 87, 0.06);
    --shadow-hover: 0 20px 40px rgba(29, 53, 87, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--azul);
    background-color: var(--blanco);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 700;
    color: var(--azul);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-sub {
    font-size: 1.05rem;
    color: #5f6b7a;
    max-width: 650px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.section-tag {
    display: inline-block;
    background: rgba(29, 53, 87, 0.07);
    color: var(--azul);
    padding: 4px 16px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.text-center {
    text-align: center;
}

.btn-primary-custom {
    display: inline-block;
    background: var(--azul);
    color: var(--arena);
    padding: 14px 42px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(29, 53, 87, 0.2);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.btn-primary-custom:hover {
    background: var(--azul-hover);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(29, 53, 87, 0.3);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    border: 1.8px solid var(--azul);
    color: var(--azul);
    padding: 10px 26px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-outline:hover {
    background: var(--azul);
    color: var(--arena);
    border-color: var(--azul);
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(209, 213, 219, 0.3);
    padding: 10px 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo img {
    display: block;
    max-width: 100%;
    height: auto;
    transition: transform 0.3s;
}
.logo img:hover {
    transform: scale(1.02);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--azul);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
    padding: 6px 10px;
}

.nav-menu a:hover {
    color: var(--azul-hover);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    z-index: 1001;
}

.nav-menu li:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 24px;
    font-size: 0.85rem;
    color: var(--azul);
}

.dropdown-menu li a:hover {
    background: rgba(29, 53, 87, 0.04);
}

.btn-header-contact {
    background: var(--azul);
    color: var(--arena) !important;
    padding: 10px 20px !important;
    border-radius: 40px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

.btn-header-contact:hover {
    background: var(--azul-hover) !important;
    color: white !important;
}

.mobile-toggle {
    display: none;
    font-size: 1.4rem;
    color: var(--azul);
    cursor: pointer;
}

@media (max-width: 968px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        padding: 20px;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 12px 36px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%;
        left: 0;
    }
    .nav-menu.active {
        display: flex;
    }
    .mobile-toggle {
        display: block;
    }
}

/* ========== SEGMENTOS (imágenes refinadas) ========== */
.segmentos-section {
    padding: 100px 0;
    background: var(--arena) url('assets/img/fondoseccion.png') center/cover no-repeat;
    position: relative;
    z-index: 1;
}

.segmentos-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 53, 87, 0.06);
    z-index: 0;
}

.segmentos-section .container {
    position: relative;
    z-index: 1;
}

.segmentos-header {
    text-align: center;
    margin-bottom: 60px;
}

.segmentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.segmento-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s;
    border: 1px solid rgba(209, 213, 219, 0.2);
}

.segmento-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.segmento-img {
    position: relative;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.segmento-img img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.94) contrast(1.04) saturate(0.8);
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.5s ease;
    border-radius: inherit;
}

.segmento-img::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(209, 213, 219, 0.3);
    border-radius: inherit;
    pointer-events: none;
    transition: border-color 0.4s;
}

.segmento-card:hover .segmento-img img {
    transform: scale(1.04);
    filter: brightness(1.02) contrast(1.06) saturate(1);
}

.segmento-card:hover .segmento-img::after {
    border-color: var(--gris-perla);
}

.segmento-content {
    padding: 28px 24px 32px;
    text-align: center;
}

.segmento-icon {
    font-size: 2.5rem;
    color: var(--azul);
    margin-bottom: 16px;
    opacity: 0.9;
}

.segmento-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--azul);
    margin-bottom: 10px;
}

.segmento-content p {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ========== GALERÍA (slider de planta) ========== */
/* ========== GALERÍA STACK (NUEVA) ========== */
.mini-gallery {
    padding: 100px 0;
    background: var(--blanco);
}

.mini-gallery .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;                /* espacio entre imágenes cuando no están superpuestas */
    position: relative;
    padding: 40px 0 200px;    /* padding inferior extra para efecto */
}

.stack-item {
    width: 280px;            /* ancho fijo para tarjeta vertical */
    height: 380px;           /* alto fijo, formato vertical */
    position: sticky;
    top: 120px;              /* se pega debajo del header fijo (ajustá si el header mide más) */
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(29, 53, 87, 0.12);
    transition: box-shadow 0.4s ease, transform 0.3s ease;
    z-index: 1;
}

/* Cada elemento posterior se superpone ligeramente (efecto de profundidad) */
.stack-item:nth-child(1) { z-index: 3; }
.stack-item:nth-child(2) { z-index: 2; }
.stack-item:nth-child(3) { z-index: 1; }

.stack-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.96) saturate(0.9);
    transition: filter 0.5s ease, transform 0.5s ease;
}

/* Al hacer hover en una imagen fija, se levanta un poco */
.stack-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 50px rgba(29, 53, 87, 0.18);
}

.stack-item:hover img {
    filter: brightness(1.03) saturate(1.05);
}

/* Responsive: en pantallas pequeñas reducimos tamaño */
@media (max-width: 768px) {
    .stack-item {
        width: 220px;
        height: 300px;
        top: 100px;
    }
    .gallery-stack {
        padding-bottom: 150px;
    }
}
/* ========== FACTORY SECTION (CON FONDO DE IMAGEN) ========== */
.factory-section {
    padding: 100px 0;
    background: var(--arena) url('assets/img/fondoseccion.png') center/cover no-repeat;
    position: relative;
    z-index: 1;
}

.factory-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 53, 87, 0.06);  /* misma capa que en segmentos */
    z-index: 0;
}

.factory-section .container {
    position: relative;
    z-index: 1;
}

.factory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.factory-content h2 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--azul);
    margin-bottom: 20px;
    line-height: 1.3;
}

.factory-content p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 28px;
}

.factory-stats {
    display: flex;
    gap: 36px;
    margin-bottom: 28px;
}

.stat-box h3 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--azul);
}

.stat-box span {
    font-size: 0.85rem;
    color: #5f6b7a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.factory-video img {
    width: 100%;
    border-radius: 28px;
    box-shadow: var(--shadow-hover);
    transition: transform 0.5s ease, filter 0.4s;
    filter: brightness(0.98) saturate(0.9);
    border: 1px solid rgba(209, 213, 219, 0.4);
}

.factory-video img:hover {
    transform: scale(1.02);
    filter: brightness(1.03) saturate(1.05);
}

/* ========== STATS SECTION ========== */
/* ========== STATS SECTION (con imagen de fondo) ========== */
.stats-section {
    padding: 70px 0;
    background: var(--azul) url('assets/img/banner.png') center/cover no-repeat;
    position: relative;
    z-index: 1;
    color: var(--arena);
}

/* Overlay oscuro para mantener legibilidad */
.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 53, 87, 0.75); /* ajusta la opacidad si es necesario */
    z-index: 0;
}

.stats-section .container {
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--arena);
}

.stat-item p {
    font-size: 0.95rem;
    color: var(--gris-perla);
    letter-spacing: 0.3px;
}

/* ========== CATEGORÍAS (tarjetas con imagen) ========== */
.cat-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s;
    border: 1px solid rgba(209, 213, 219, 0.2);
}

.cat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.cat-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.94) contrast(1.04) saturate(0.8);
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.4s;
    border-radius: 24px 24px 0 0;
}

.cat-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.02) contrast(1.06) saturate(1);
}

.cat-card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--azul);
    margin: 24px 0 8px;
}

.cat-card p {
    font-size: 0.9rem;
    color: #4b5563;
    padding: 0 20px;
    margin-bottom: 20px;
}

.cat-card .btn-outline {
    margin-bottom: 28px;
}

/* ========== PRODUCT SLIDER (productos destacados) ========== */
.product-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s;
    margin: 0 10px;
    border: 1px solid rgba(209, 213, 219, 0.2);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-img {
    overflow: hidden;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.product-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.95) contrast(1.03) saturate(0.85);
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.4s;
}

.product-card:hover .product-img img {
    transform: scale(1.06);
    filter: brightness(1.03) contrast(1.08) saturate(1.05);
}

.product-info {
    padding: 24px 20px;
    text-align: center;
}

.product-info h4 {
    font-weight: 600;
    color: var(--azul);
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.product-info p {
    font-size: 0.85rem;
    color: #5f6b7a;
    margin-bottom: 16px;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--azul);
    color: var(--arena);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: white;
    letter-spacing: 0.5px;
}

.footer-col p {
    font-size: 0.9rem;
    color: var(--gris-perla);
    margin-bottom: 10px;
    line-height: 1.7;
}

.footer-col p i {
    margin-right: 8px;
    color: var(--gris-perla);
    width: 18px;
    text-align: center;
}

.btn-download-catalog {
    display: inline-block;
    background: var(--arena);
    color: var(--azul);
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-download-catalog:hover {
    background: white;
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    font-size: 0.8rem;
    color: var(--gris-perla);
}

/* ========== MODAL CONTACTO ========== */
.contact-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(29,53,87,0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    background: white;
    border-radius: 28px;
    max-width: 550px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem 2.2rem;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: 0.3s ease;
}

.contact-modal-overlay.active .contact-modal {
    transform: translateY(0);
}

.contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.contact-modal-close:hover {
    color: var(--azul);
}

.contact-modal h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--azul);
    margin-bottom: 8px;
}

.contact-modal p {
    color: #777;
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--azul);
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gris-perla);
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f9fafb;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(29,53,87,0.1);
    background: white;
}

.btn-submit-contact {
    width: 100%;
    padding: 14px;
    background: var(--azul);
    color: var(--arena);
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-submit-contact:hover {
    background: var(--azul-hover);
    transform: translateY(-2px);
}

/* ========== FLOATING ELEMENTS ========== */
.float-social {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.float-social a {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.float-social a:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.float-social .wa {
    background: #25D366;
}

.float-social .ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 42px;
    height: 42px;
    background: var(--azul);
    color: var(--arena);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(29,53,87,0.2);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

.experience-badge {
    position: fixed;
    bottom: 80px;
    left: 24px;
    background: var(--arena);
    color: var(--azul);
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 998;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

/* ========== RESPONSIVE ADICIONAL ========== */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    .segmentos-section {
        padding: 80px 0;
    }
    .segmento-img img {
        height: 200px;
    }
    .mini-slider img {
        height: 260px;
        border-radius: 24px;
    }
    .cat-card img {
        height: 200px;
    }
    .product-img img {
        height: 200px;
    }
    .factory-video img {
        border-radius: 20px;
    }
    .factory-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .factory-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    .stats-grid {
        gap: 30px;
    }
    .form-row {
        flex-direction: column;
    }
    .experience-badge {
        bottom: 70px;
        left: 12px;
    }
    .float-social {
        bottom: 16px;
        right: 16px;
    }
}

/* ===== GALERÍA PREMIUM (Grid Asimétrico) ===== */
.plant-section{
    padding:120px 0;
    background:#fff;
}

.plant-grid{
    display:grid;
    grid-template-columns:1.1fr 1fr;
    gap:90px;
    align-items:center;
}

.plant-images{
    display:flex;
    align-items:flex-end;
    gap:30px;
}

.image{
    overflow:hidden;
    border-radius:22px;
}

.image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:.7s;
}

.image:hover img{
    transform:scale(1.05);
}

.image-large{
    width:380px;
    height:560px;
}

.image-small{
    width:300px;
    height:430px;
    margin-bottom:-80px;
}

.plant-content h2{
    font-family:var(--font-serif);
    font-size:clamp(2.5rem,4vw,4rem);
    line-height:1.1;
    margin:20px 0;
    color:var(--azul);
}

.plant-content h2 strong{
    font-weight:700;
}

.plant-content .lead{
    font-size:1.3rem;
    color:#444;
    margin-bottom:30px;
    line-height:1.6;
}

.plant-content p{
    color:#707070;
    line-height:1.9;
    margin-bottom:22px;
}

.plant-data{
    display:flex;
    gap:60px;
    margin-top:40px;
}

.plant-data h3{
    font-size:2.4rem;
    color:var(--azul);
    margin-bottom:5px;
}

.plant-data span{
    color:#777;
}

@media(max-width:992px){

.plant-grid{
grid-template-columns:1fr;
gap:60px;
}

.plant-images{
justify-content:center;
}

.image-large{
width:60%;
height:450px;
}

.image-small{
width:45%;
height:330px;
margin-bottom:-40px;
}

}

@media(max-width:768px){

.plant-images{
flex-direction:column;
align-items:center;
}

.image-large,
.image-small{
width:100%;
height:320px;
margin:0;
}

.plant-data{
flex-direction:column;
gap:25px;
}

}