/* --- Variables y Reset --- */
:root {
    --primary-blue: #0A2A43; /* Azul oscuro industrial */
    --secondary-blue: #1A5276; /* Azul medio */
    --accent: #2980B9; /* Azul claro para botones */
    --wa-color: #25D366; /* Verde WhatsApp */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F4F6F7;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth; /* Scroll suave nativo */
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Utilidades --- */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-blue);
    margin: 15px auto;
}

.divider.text-left {
    margin: 15px 0;
}

.mt-4 { margin-top: 2rem; }
.w-100 { width: 100%; }

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-blue);
}

.btn-whatsapp {
    background-color: var(--wa-color);
    color: var(--white);
}

.btn-whatsapp:hover {
    background-color: #1DA851;
}

/* --- Navbar Fija --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: transparent;
    transition: var(--transition);
    z-index: 1000;
}

/* --- Comportamiento del Navbar al hacer scroll --- */
.navbar.scrolled {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

/* Forzar colores oscuros en el texto y logo */
#navbar.scrolled .logo,
#navbar.scrolled .nav-list a {
    color: var(--primary-blue) !important;
}

/* Mantener el botón de contacto con su estilo original */
#navbar.scrolled .nav-list a.btn-nav {
    color: var(--white) !important;
    background-color: var(--accent) !important;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio perfecto entre la imagen y el texto */
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.logo-img {
    height: 40px; /* Este es el alto estándar ideal para barras de navegación */
    width: auto;  /* Mantiene la proporción original de tu logo */
    object-fit: contain;
    transition: var(--transition);
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-list a {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--accent);
}

.btn-nav {
    background-color: var(--accent);
    padding: 8px 20px;
    border-radius: 4px;
    color: var(--white) !important;
}

.btn-nav:hover {
    background-color: var(--secondary-blue);
}

.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}
.navbar.scrolled .menu-toggle { color: var(--primary-blue); }

/* --- Hero Section --- */
.hero {
    height: 100vh;
    /* Aquí va la ruta de tu imagen de fondo */
    background-image: url('fondohead.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* ¡AQUÍ ESTÁ LA MAGIA DEL PARALLAX! */
    background-attachment: fixed; 
    
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Azul corporativo (10, 42, 67). 
       El último número (0.65) es la opacidad. 
       Antes estaba en 0.85. Puedes bajarlo a 0.5 si quieres que la foto se vea aún más. */
    background-color: rgba(10, 42, 67, 0.65); 
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1; /* Asegura que el texto y los botones queden por encima de la capa de color */
    color: var(--white);
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #E0E0E0;
}

    .hero-content p strong {
        font-weight: 700;     /* Asegura que la letra sea bien gruesa */
    }

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* --- Acordeón de Servicios --- */
.accordion {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #EAEAEA;
    transition: var(--transition);
}

.accordion-item:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-align: left;
    transition: var(--transition);
}

.accordion-header span {
    display: flex;
    align-items: center;
}

.accordion-header span i {
    color: var(--accent);
    margin-right: 15px;
    font-size: 1.3rem;
    width: 30px;
    text-align: center;
}

.accordion-header .icon-arrow {
    transition: transform 0.4s ease;
    color: var(--secondary-blue);
}

/* Estado activo del acordeón */
.accordion-header.active {
    background-color: #F8F9FA;
    color: var(--accent);
}

.accordion-header.active .icon-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: var(--white);
}

.accordion-content p {
    padding: 0 25px 25px 70px; /* Alineado con el texto del título */
    color: var(--text-light);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .accordion-content p {
        padding: 0 20px 20px 20px;
    }
}

/* --- Productos --- */
.productos-grid {
    display: grid;
    /* Bajamos el mínimo a 240px para que entren 4 columnas cómodamente */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    /* Achicamos apenitas el espacio entre tarjetas para darles más aire */
    gap: 20px; 
}

.producto-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #EAEAEA;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.producto-card h3 {
    padding: 20px 15px;
    font-size: 1.3rem;
    color: var(--primary-blue);
    background-color: #F8F9FA;
    border-bottom: 1px solid #EAEAEA;
    margin: 0;
}

/* Contenedor relativo para poder superponer la capa oscura */
.producto-img-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.producto-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

/* Capa azul oscura superpuesta (invisible por defecto) */
.producto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Azul corporativo al 90% de opacidad para que se intuya la foto atrás */
    background-color: rgba(10, 42, 67, 0.9); 
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Texto de la descripción (arranca un poco más abajo para el efecto de subida) */
.producto-overlay p {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    margin: 0;
}

/* --- Efectos al pasar el mouse o tocar en celular --- */
/* 1. La foto se agranda suavemente */
.producto-card:hover .producto-img-wrapper img {
    transform: scale(1.1);
}

/* 2. La capa oscura se vuelve visible */
.producto-card:hover .producto-overlay {
    opacity: 1;
}

/* 3. El texto sube a su posición original */
.producto-card:hover .producto-overlay p {
    transform: translateY(0);
}

/* --- Nosotros --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-list li {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-list i {
    color: var(--accent);
    font-size: 1.2rem;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Galería (Slider Carrusel Bucle Infinito) --- */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.slider-window {
    width: 100%;
    overflow: hidden; /* Oculta las fotos que quedan por fuera del marco */
    padding: 10px 0;
}

.slider-track {
    display: flex;
    gap: 20px;
    /* La transición la controlaremos desde JavaScript */
    transition: transform 0.4s ease-in-out;
}

.slider-track .gallery-item {
    flex: 0 0 calc(33.333% - 14px); /* En PC muestra 3 fotos */
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
}

.slider-track .gallery-item img,
.slider-track .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.slider-track .gallery-item:hover img,
.slider-track .gallery-item:hover video {
    transform: scale(1.05);
}

/* Estilo de las flechitas */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-btn:hover { background-color: var(--accent); }
.slider-btn.prev { left: -20px; }
.slider-btn.next { right: -20px; }

@media (max-width: 768px) {

    .logo-img {
        height: 32px; /* Lo achicamos apenitas para pantallas chicas */
    }
    
    .slider-track .gallery-item {
        flex: 0 0 100%; /* En celular muestra 1 sola foto */
    }
    .slider-btn.prev { left: 5px; width: 35px; height: 35px; font-size: 1rem;}
    .slider-btn.next { right: 5px; width: 35px; height: 35px; font-size: 1rem;}
    
}

.slider-track .gallery-item .video-ajustado {
    /* El primer valor es el eje horizontal (centro), el segundo es el vertical */
    object-position: center 65%; 
}

/* --- Contacto --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 5px;
}

.contact-item h4 {
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.contact-item p, .contact-item a {
    color: var(--text-light);
}

.contact-item a:hover {
    color: var(--accent);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 40px 0;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

footer p {
    color: #AAB7B8;
    font-size: 0.9rem;
}

/* --- WhatsApp Flotante --- */
.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--wa-color);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.float-wa:hover {
    transform: scale(1.1);
    background-color: #1DA851;
}

/* --- Animaciones suaves (Fade-in on scroll) --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .menu-toggle { 
        display: block; 
        position: relative; 
        z-index: 1001; 
    }
    
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--primary-blue);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        /* Le damos un z-index menor al del botón para que pase por debajo */
        z-index: 1000; 
    }
    
    .nav-list.active { right: 0; }
    
    /* ... (aquí mantienes el resto de tu código móvil como lo del slider y textos) ... */
}
    
    .navbar.scrolled .nav-list a { color: var(--white); }
    
    .hero-content h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
    
    .float-wa {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}
