/* =========================================
   HOJA DE ESTILOS - JJ EMPACK C.A. (FINAL V4.0)
   ========================================= */

/* --- 0. IMPORTACIÓN DE FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Roboto:wght@300;400;500&display=swap');

/* --- 1. VARIABLES --- */
:root {
    --primary-red: #da291c;
    --dark-charcoal: #1a1a1a;
    --slate-grey: #4a4a4a;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-soft: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 30px rgba(0,0,0,0.1);
}

/* --- 2. BASES (GLOBALES) --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--slate-grey);
    background-color: var(--white);
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-charcoal);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   DISEÑO MÓVIL (MOBILE FIRST - POR DEFECTO)
   ========================================= */

/* --- HEADER MÓVIL --- */
header {
    background-color: var(--white);
    height: 70px;
    padding: 0 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* Logo a la izq, Hamburguesa a la der */
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo a { display: flex; align-items: center; height: 100%; }
.logo-img { height: 40px; width: auto; object-fit: contain; }

/* Botón Hamburguesa (Solo visible en móvil) */
.menu-toggle {
    display: block; /* Visible por defecto */
    color: var(--dark-charcoal);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Menú Móvil (Cajón Oculto) */
.nav-menu {
    position: fixed;
    top: 70px;
    right: -100%; /* Escondido fuera de pantalla */
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column; /* Vertical en móvil */
    padding: 2rem;
    transition: right 0.3s ease; /* Solo animamos la propiedad right */
    border-top: 1px solid #eee;
    overflow-y: auto;
    display: flex; /* Flexbox para organizar verticalmente */
    gap: 0;
}

.nav-menu.active { right: 0; } /* JS activa esto para mostrarlo */

.nav-menu ul {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.nav-menu li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
}

.nav-menu a {
    color: var(--dark-charcoal);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    width: 100%;
    padding: 15px 0;
}

.nav-btn {
    background: var(--dark-charcoal);
    color: var(--white) !important;
    text-align: center;
    border-radius: 4px;
    margin-top: 20px;
    padding: 15px !important;
    border: none;
}

/* --- HERO MÓVIL (Y BASE PARA PARALLAX) --- */
.hero {
    position: relative; 
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px 20px;
    overflow: hidden; 
    z-index: 1; /* 1. Creamos un contexto de capa seguro */
}

/* El nuevo div que contiene la imagen */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; 
    z-index: 1; /* 2. Lo ponemos en la capa 1 (no negativo) */
    
    /* 3. OJO AQUÍ: Asegúrate de poner la ruta correcta de tu imagen.
       Si está en la carpeta assets, usa la ruta de abajo. */
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%), 
                url('assets/images/fondo.jpg'); /* <-- ACTUALIZA ESTE NOMBRE */
    
    background-size: cover;
    background-position: center;
    background-attachment: scroll; 
    will-change: transform;
}

.hero-content {
    position: relative; 
    z-index: 2; /* 4. El texto en la capa 2, SIEMPRE por encima del fondo */
    width: 90%;
    max-width: 500px;
    color: var(--white);
}

.hero h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
    word-wrap: normal;
}
.hero h1 span { color: var(--primary-red); display: block; }

.hero p {
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 300;
    color: #e0e0e0;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-red);
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 4px;
    width: 100%;
    max-width: 300px;
}

/* --- SECCIONES MÓVIL --- */
.section-padding { padding: 4rem 20px; }
.section-title { font-size: 1.8rem; margin-bottom: 2.5rem; text-align: center; position: relative; padding-bottom: 15px; }
.section-title::after { content:''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 4px; background: var(--primary-red); }

/* Grid a 1 columna en móvil */
.features-grid, .product-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 20px; }

/* Tarjetas */
.feature-card { padding: 2rem; background: var(--white); border: 1px solid #eee; text-align: center; border-radius: 8px; box-shadow: var(--shadow-soft); }
.feature-icon { font-size: 2rem; color: var(--primary-red); margin-bottom: 1rem; }
.product-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-soft); }
.product-img { height: 250px; background: var(--white); position: relative; display: flex; align-items: center; justify-content: center; padding: 10px; }
.product-img img { width: 100%; height: 100%; object-fit: contain; }
.product-info { padding: 20px; text-align: center; }
.btn-link { color: var(--primary-red); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; display: inline-block; border-bottom: 2px solid transparent; }

/* Contacto Móvil */
.contact { background-color: var(--dark-charcoal); color: var(--white); }
.contact .section-title { color: var(--white); }
.contact-container { display: flex; flex-direction: column; gap: 40px; }
.contact-list li { margin-bottom: 20px; display: flex; align-items: flex-start; gap: 15px; background: rgba(255,255,255,0.05); padding: 15px; border-radius: 4px; }
.contact-list i { color: var(--primary-red); margin-top: 5px; }
.form-group input, .form-group textarea { width: 100%; background: rgba(255,255,255,0.1); border: 1px solid transparent; padding: 15px; color: white; margin-top: 10px; border-radius: 4px; }
.btn-full { width: 100%; margin-top: 15px; cursor: pointer; border: none; }

/* Footer */
footer { background: #000; color: #666; text-align: center; padding: 2rem 20px; font-size: 0.8rem; border-top: 1px solid #222; }
/* --- CLIENTES (MÓVIL POR DEFECTO) --- */
.clients {
    background-color: var(--bg-light); /* Fondo un poco gris para separar del blanco */
    padding: 3rem 20px; /* Un padding un poco más ajustado que las otras secciones */
}

.clients .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.clients-grid {
    display: flex;
    flex-wrap: wrap; /* Permite que bajen de línea si no caben */
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.client-logo {
    width: 120px; /* Tamaño controlado para móvil */
    opacity: 0.6; /* Un poco transparentes para no robar protagonismo */
    filter: grayscale(100%); /* Efecto blanco y negro corporativo */
    transition: all 0.4s ease;
}

.client-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Efecto al tocar o pasar el mouse (Vuelve el color) */
.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05); /* Pequeño zoom */
}

/* --- BARRA DE ESTADÍSTICAS (MÓVIL FIX 2x2) --- */
.stats-bar {
    background-color: var(--dark-charcoal);
    color: var(--white);
    padding: 3rem 15px; /* Un poco menos de espacio arriba y abajo en móvil */
    border-bottom: 4px solid var(--primary-red);
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Crea exactamente 2 columnas iguales */
    gap: 30px 10px; /* Separación: 30px vertical, 10px horizontal */
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.stat-number-wrapper {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.3rem; /* Reducimos el tamaño para que quepan dos al lado */
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 8px;
    white-space: nowrap; /* Evita que el '+' o el '%' se separen del número */
}

.stat-number { font-size: inherit; font-family: inherit; }

.stat-label {
    font-size: 0.8rem; /* Letra un poco más pequeña para no amontonar */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cccccc;
    line-height: 1.3;
}
/* ==========================================================================
   MEDIA QUERIES - ESCRITORIO (WEB)
   (Sobrescribe los estilos móviles cuando la pantalla es ancha)
   ========================================================================== */
@media (min-width: 769px) {

    /* --- BARRA DE ESTADÍSTICAS WEB --- */
    .stats-bar {
        padding: 5rem 10%;
    }

    .stats-container {
        display: flex; /* Quitamos el grid del móvil y volvemos a flex horizontal */
        flex-direction: row; 
        justify-content: space-between; 
        gap: 20px;
    }

    .stat-number-wrapper {
        font-size: 4.5rem; /* Devolvemos el tamaño gigante en PC */
    }
    
    .stat-label {
        font-size: 1rem; /* Restauramos el tamaño de la etiqueta */
        letter-spacing: 1.5px;
    }

    /* --- HEADER WEB --- */
    header {
        height: 90px;
        padding: 0 5%;
    }
    
    .logo-img { height: 60px; }

    /* Ocultamos elementos móviles */
    .menu-toggle { display: none !important; } 

    /* MENÚ WEB RESTAURADO */
    .nav-menu {
        position: static; /* Ya no es fixed */
        width: auto;
        height: auto;
        background: transparent;
        display: flex !important; /* Forzamos flex */
        flex-direction: row; /* Horizontal */
        padding: 0;
        border: none;
        overflow: visible;
        gap: 0;
        right: auto;
        box-shadow: none;
    }

    /* Reseteo de estilos de lista para web */
    .nav-menu ul {
        flex-direction: row; /* Items en fila */
        gap: 35px; /* Espacio entre items */
        align-items: center;
    }
    
    .nav-menu li {
        width: auto;
        border: none; /* Sin borde inferior */
    }

    .nav-menu a {
        padding: 5px 0;
        font-size: 0.95rem;
        width: auto;
        display: inline-block;
        position: relative;
    }

    /* Efecto Hover Web */
    .nav-menu a::after {
        content: ''; position: absolute; width: 0; height: 3px;
        bottom: -5px; left: 0; background-color: var(--primary-red);
        transition: width 0.3s;
    }
    .nav-menu a:hover::after { width: 100%; }

    /* Botón Contacto Web */
    .nav-btn {
        margin-top: 0; /* Quitamos margen superior de móvil */
        margin-left: 0;
        padding: 12px 30px !important;
        width: auto;
        background: var(--dark-charcoal);
    }
    .nav-btn:hover { background: var(--primary-red); }

   /* --- HERO WEB --- */
    .hero {
        height: 100vh;
        min-height: 700px;
        padding: 0 10%;
        margin-top: 90px;
        justify-content: flex-start;
        text-align: left;
    }

    /* Degradado más oscuro en escritorio (como lo tenías antes) */
   /* Degradado más oscuro en escritorio */
    .parallax-bg {
        background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 100%), 
                    url('assets/images/fondo.jpg'); /* <-- ACTUALIZA ESTA RUTA TAMBIÉN */
        background-size: cover;
        background-position: center;
    }
    .hero-content { max-width: 800px; }
    .hero h1 { font-size: 4rem; line-height: 1.1; }
    .hero p {
        font-size: 1.3rem;
        padding-left: 25px;
        border-left: 5px solid var(--primary-red);
        max-width: 700px;
    }
    .btn { width: auto; font-size: 1rem; padding: 18px 45px; }

    /* --- SECCIONES WEB --- */
    .section-padding { padding: 7rem 10%; }
    .section-title {
        font-size: 2.8rem;
        margin-bottom: 5rem;
        text-align: left;
    }
    .section-title::after { left: 0; transform: none; width: 80px; }

    /* Grids Web */
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 50px; }
    .feature-card { text-align: left; padding: 3rem; transition: transform 0.3s; }
    .feature-card:hover { transform: translateY(-10px); }

    .product-grid { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 50px; margin-top: 50px; }
    .product-img { height: 350px; padding: 5px; }
    .product-info { text-align: left; padding: 50px; }
    .product-card { transition: transform 0.3s; }
    .product-card:hover { transform: translateY(-8px); }

    /* Contacto Web */
    .contact-container { flex-direction: row; gap: 80px; }
    .contact-info { flex: 1; text-align: left; }
    .contact-form-wrapper { flex: 1.5; }
    footer { padding: 3rem 10%; }
}

/* --- CLIENTES WEB --- */
    .clients {
        padding: 4rem 10%;
    }
    
    .clients .section-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .clients .section-title::after {
        left: 50%;
        transform: translateX(-50%); /* Forzamos el centrado de la línea roja aquí */
    }

    .clients-grid {
        gap: 60px; /* Más espacio entre logos en PC */
    }

    .client-logo {
        width: 160px; /* Logos más grandes en pantalla grande */
    }
/* --- BOTÓN WHATSAPP FLOTANTE --- */
.whatsapp-flotante {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366; /* Verde oficial de WhatsApp */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.3);
    z-index: 9999; /* Siempre por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background-color 0.3s;
}

.whatsapp-flotante:hover {
    background-color: #128C7E;
    transform: scale(1.1); /* Efecto de rebote al pasar el mouse */
}

