@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
    --primary: #1A1A1A; 
    --accent: #2E7D32; 
    --bg-light: #F9F9F9; 
    --gray-light: #EBEBEB;
    --text-muted: #666666;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0; padding: 0;
    max-width: 100%;
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: var(--primary);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 40px; 
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    width: 90%; max-width: 1100px; margin: 0 auto;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: fixed; top: 25px; left: 50%; transform: translateX(-50%);
    z-index: 1000;
}

.logo-dj { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 800; color: rgb(160, 6, 6); letter-spacing: -1.5px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.logo-dj span { font-weight: 600; color: var(--accent); letter-spacing: -1px; }

nav ul { list-style: none; display: flex; gap: 30px; align-items: center; margin: 0; padding: 0;}
nav a { text-decoration: none; color: var(--primary); font-weight: 600; font-size: 0.9rem; }
nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.cart-btn-header { background: var(--primary); color: white; border: none; padding: 8px 16px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
.cart-btn-header:hover { background-color: var(--accent); }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: var(--primary);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.menu-toggle:hover { color: var(--accent); }
.menu-toggle i { pointer-events: none; }
/* PANEL LATERAL DEL CARRITO */
.carrito-lateral {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    /* Transición suave usando transform en vez de right */
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estado cerrado: se desplaza exactamente el 100% de su tamaño */
.carrito-lateral.oculto {
    transform: translateX(105%); /* 105% para esconder también la sombra */
    box-shadow: none; /* Evita que la sombra proyecte una línea en el borde */
}
.carrito-header { display: flex; justify-content: space-between; padding: 20px; background: var(--bg-light); border-bottom: 1px solid var(--gray-light); }
.cerrar-carrito { background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.carrito-items { flex: 1; padding: 20px; overflow-y: auto; }
.item-carrito { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--gray-light); }
.carrito-footer { padding: 20px; background: var(--bg-light); text-align: center; }
.btn-whatsapp { background-color: var(--primary); color: white; width: 100%; border: none; padding: 15px; border-radius: 30px; font-weight: 700; cursor: pointer; margin-top: 10px; }

.hero-section {
    display: flex; align-items: center; justify-content: space-between;
    padding: 120px 5%; gap: 50px;
    background: linear-gradient(rgba(26, 26, 26, 0.8), rgba(46, 125, 50, 0.8)), url('logo.jpeg') center/contain; background-repeat: no-repeat;
    background-position: center;
    width: 100%; height: 100vh; margin: 0; border-radius: 0; box-sizing: border-box;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.hero-scrolled { width: 90%; height: 75vh; margin: 40px auto; border-radius: 30px; padding: 60px 5%; }
.hero-text { flex: 1; color: white; }
.hero-text h1 { font-size: 3.5rem; line-height: 1.1; letter-spacing: -2px; margin-bottom: 20px; color: white; }
.hero-text p { font-size: 1.2rem; line-height: 1.6; margin-bottom: 30px; color: white; }
.hero-subtext { font-size: 0.9rem; margin-top: 15px; color: white; }
.hero-media { flex: 1; width: 100%; height: 500px; position: relative; border-radius: 20px; overflow: hidden; }

.carrusel-contenedor { width: 100%; height: 100%; position: relative; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s; background-size: contain; background-position: center; background-repeat: no-repeat; background-color: #FFFFFF; }
.slide.activa { opacity: 1; }
.video-carrusel { width: 100%; height: 100%; object-fit: cover; }

.trust-badges { text-align: center; padding: 40px 5%; border-bottom: 1px solid var(--gray-light); }
.trust-badges p { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.badges-logos { display: flex; justify-content: center; gap: 40px; margin-top: 20px; font-weight: 700; color: #999; font-size: 1.2rem; }

.metrics-section { display: flex; justify-content: space-around; padding: 80px 5%; text-align: left; }
.metric { max-width: 300px; }
.metric h2 { font-size: 4rem; color: var(--accent); margin: 0 0 10px 0; line-height: 1; letter-spacing: -2px; }
.metric p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.5; }

.section-title { text-align: center; font-size: 2.5rem; letter-spacing: -1px; margin-bottom: 50px; }
.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    margin-top: -35px; /* Sube el texto para acercarlo al título principal */
    margin-bottom: 50px; /* Empuja las tarjetas de productos hacia abajo */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: #1A1A1A;
}
.btn { padding: 15px 35px; background-color: var(--primary); color: white; text-decoration: none; border: none; border-radius: 30px; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 1rem; display: inline-block; }
.btn:hover { background-color: var(--accent); }

.how-it-works { padding: 80px 5%; background: linear-gradient(rgba(26, 26, 26, 0.8), rgba(46, 125, 50, 0.8));}
/* Cambia el color del título solo en la sección "Por qué nos eligen" */
.how-it-works .section-title {
    color: white; /* Reemplaza este código por el color que desees */
}
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.info-card { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
.info-card h3 { font-size: 1.5rem; margin-bottom: 15px; }

.products-section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.cards { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.card { background: white; padding: 40px; border-radius: 20px; border: 1px solid var(--gray-light); width: 300px; transition: 0.3s; }
.card:hover { border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.precio { font-size: 1.5rem; font-weight: 700; margin: 20px 0; }

.faq-section { padding: 80px 5%; max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-light); padding: 20px 0; }
.faq-item h4 { font-size: 1.2rem; margin-bottom: 10px; }
.faq-item p { color: var(--text-muted); line-height: 1.6; margin: 5px 0 0 0; }

footer { background: var(--primary); color: white; padding: 60px 5%; }
.footer-content { display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.footer-col p { color: #aaa; margin: 5px 0; font-size: 0.9rem; }

.modal-oculto { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 3000; justify-content: center; align-items: center; }
.modal-contenido { background: white; padding: 40px; border-radius: 20px; width: 90%; max-width: 400px; text-align: center; }
.modal-contenido input { width: 100%; padding: 15px; margin: 10px 0; border: 1px solid var(--gray-light); border-radius: 10px; box-sizing: border-box; font-family: 'Inter', sans-serif; font-size: 1rem; }
.modal-botones { display: flex; gap: 10px; margin-top: 20px; }
.modal-botones .btn { flex: 1; padding: 15px; }
.btn-cancelar { background-color: var(--gray-light); color: var(--primary); }

/* CARRUSEL DE PRODUCTOS (Estilo E-commerce) */
.producto-carrusel {
    position: relative;
    width: 100%;
    height: 220px; /* Altura fija para que la tarjeta no cambie de tamaño */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.producto-imagenes {
    width: 100%; height: 100%; position: relative;
}

.producto-imagenes img {
    width: 100%; height: 100%;
    object-fit: contain; /* Cambia a 'contain' si prefieres que no se recorte nada */
    position: absolute; top: 0; left: 0;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.producto-imagenes img.img-activa {
    opacity: 1; z-index: 1;
}

/* Flechas de navegación */
.btn-producto {
    position: absolute; top: 50%; transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary); border: none;
    width: 32px; height: 32px; border-radius: 50%;
    font-size: 14px; cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    opacity: 0; /* Ocultas por defecto */
    transition: opacity 0.2s, background-color 0.2s;
}

/* Las flechas aparecen solo al pasar el cursor sobre la foto */
.producto-carrusel:hover .btn-producto { opacity: 1; }
.btn-producto:hover { background-color: white; transform: translateY(-50%) scale(1.1); }

.prev-prod { left: 10px; }
.next-prod { right: 10px; }

/* Indicador de clic en la tarjeta y trabajos realizados */
.producto-imagenes img,
.trabajos-realizados .card img {
    cursor: pointer; 
}

.trabajos-realizados .card > img {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trabajos-realizados .card > img:hover {
    transform: scale(1.02);
}

/* VISOR A PANTALLA COMPLETA (Lightbox) */
#lightbox-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 4000; justify-content: center; align-items: center;
}

#imagen-lightbox {
    max-width: 90%; max-height: 85vh; object-fit: contain; border-radius: 12px;
}

.cerrar-lightbox {
    position: absolute; top: 25px; right: 40px; color: white; font-size: 35px; 
    cursor: pointer; transition: 0.2s;
}
.cerrar-lightbox:hover { color: var(--accent); }

.btn-lightbox {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1); color: white; border: none;
    width: 60px; height: 60px; border-radius: 50%; font-size: 24px; cursor: pointer;
    transition: 0.3s; display: flex; align-items: center; justify-content: center;
}
.btn-lightbox:hover { background: rgba(255, 255, 255, 0.3); }

.prev-lightbox { left: 30px; }
.next-lightbox { right: 30px; }

/* REDES SOCIALES FOOTER */
.redes-sociales {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espaciado entre cada red social */
}

.social-link {
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.social-link i {
    font-size: 1.3rem; /* Tamaño del icono */
    transition: color 0.3s ease;
}

/* Efecto de color para el correo */
.social-link:hover .fa-envelope { 
    color: #EA4335; 
}

/* Efectos de color al pasar el cursor */
.social-link:hover { color: white; }
.social-link:hover .fa-whatsapp { color: #25D366; }
.social-link:hover .fa-instagram { color: #E1306C; }
.social-link:hover .fa-facebook-f { color: #1877F2; }

.video-carrusel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: -1; 
}

/* ==========================================
   OPTIMIZACIÓN COMPLETA PARA CELULARES (MOBILE)
   ========================================== */
@media (max-width: 768px) {
    /* HEADER Y NAVEGACIÓN MÓVIL */
    header {
        width: 94%;
        padding: 12px 18px;
        top: 10px;
        border-radius: 20px;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        flex-wrap: wrap;
        transition: border-radius 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    }

    .logo-dj {
        font-size: 19px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .cart-btn-header {
        padding: 7px 14px;
        font-size: 0.85rem;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        padding: 6px 8px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Menú desplegable animado */
    nav {
        width: 100%;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        order: 3;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.25s ease;
    }

    header.menu-abierto {
        border-radius: 24px;
        box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    }

    header.menu-abierto nav {
        max-height: 400px;
        opacity: 1;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--gray-light);
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        overflow-x: visible;
        white-space: normal;
        padding: 0;
    }

    nav li {
        width: 100%;
    }

    nav a {
        display: block;
        padding: 11px 14px;
        font-size: 0.95rem;
        border-radius: 10px;
        transition: background-color 0.2s, color 0.2s;
    }

    nav a:hover, nav a:active {
        background-color: var(--bg-light);
        color: var(--accent);
    }

    /* SECCIÓN HERO EN MÓVIL: 100vh INICIAL Y ANIMACIÓN AL SCROLLEAR */
    .hero-section {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        text-align: center;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
        padding: 85px 4% 18px 4%;
        gap: 10px;
        box-sizing: border-box;
        overflow: hidden;
        transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    }

    /* Animación idéntica a PC al hacer scroll */
    .hero-scrolled {
        width: 92%;
        height: 82vh;
        height: 82dvh;
        margin: 20px auto 30px auto;
        border-radius: 28px;
        padding: 75px 4% 16px 4%;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }

    .hero-text {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 460px;
    }

    .hero-text h1 {
        font-size: clamp(1.4rem, 4.4vw, 1.85rem);
        line-height: 1.16;
        letter-spacing: -0.5px;
        margin: 0 0 6px 0;
    }

    .hero-text p {
        font-size: clamp(0.8rem, 2.7vw, 0.92rem);
        line-height: 1.32;
        margin: 0 0 10px 0;
        color: rgba(255, 255, 255, 0.9);
        max-width: 94%;
    }

    .hero-text .btn {
        padding: 9px 24px;
        font-size: 0.9rem;
        border-radius: 25px;
        width: auto;
        min-width: 170px;
        max-width: 250px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    }

    .hero-subtext {
        font-size: 0.72rem;
        margin-top: 4px;
        margin-bottom: 0;
        opacity: 0.85;
    }

    /* Carrusel del Hero en móvil */
    .hero-media {
        flex: 1 1 auto;
        width: 100%;
        max-width: 380px;
        height: auto;
        max-height: 250px;
        min-height: 160px;
        margin: 6px auto 0 auto;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        background-color: #ffffff;
        position: relative;
    }

    /* BADGES Y MÉTRICAS */
    .trust-badges {
        padding: 30px 15px;
    }

    .badges-logos {
        flex-wrap: wrap;
        gap: 15px 25px;
        font-size: 1rem;
    }

    .metrics-section {
        flex-direction: column;
        gap: 30px;
        padding: 45px 15px;
        text-align: center;
        align-items: center;
    }

    .metric {
        max-width: 100%;
    }

    .metric h2 {
        font-size: 3rem;
        margin-bottom: 5px;
    }

    .metric p {
        font-size: 1rem;
    }

    /* SECCIONES GENERALES */
    .products-section,
    .trabajos-realizados,
    .how-it-works,
    .faq-section {
        padding: 50px 16px;
    }

    .section-title {
        font-size: 1.85rem;
        letter-spacing: -0.5px;
        margin-bottom: 25px;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-top: -15px;
        margin-bottom: 35px;
        padding: 0 10px;
    }

    /* TARJETAS EN MÓVIL */
    .cards {
        gap: 20px;
        width: 100%;
    }

    .card {
        width: 100%;
        max-width: 380px;
        padding: 24px 18px;
        border-radius: 16px;
        margin: 0 auto;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .card .precio {
        font-size: 1.35rem;
        margin: 15px 0;
    }

    .card .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .info-card {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .info-card h3 {
        font-size: 1.3rem;
    }

    .info-card p {
        font-size: 0.95rem;
    }

    /* CARRUSELES EN MÓVIL */
    .producto-carrusel {
        height: 220px;
    }

    .producto-carrusel .btn-producto {
        opacity: 0.92;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    /* PANEL LATERAL DEL CARRITO EN MÓVIL */
    .carrito-lateral {
        width: 100%;
        max-width: 100%;
    }

    /* MODALES EN MÓVIL */
    .modal-contenido {
        width: 92%;
        max-width: 380px;
        padding: 25px 18px;
        border-radius: 18px;
    }

    .modal-contenido input {
        font-size: 16px; /* Evita zoom automático en iOS Safari */
        padding: 12px;
    }

    .modal-botones {
        flex-direction: column-reverse;
        gap: 10px;
    }

    /* LIGHTBOX EN MÓVIL */
    #imagen-lightbox {
        max-width: 95%;
        max-height: 75vh;
        border-radius: 8px;
    }

    .cerrar-lightbox {
        top: 15px;
        right: 18px;
        font-size: 32px;
    }

    .btn-lightbox {
        width: 44px;
        height: 44px;
        font-size: 18px;
        background: rgba(0, 0, 0, 0.45);
    }

    .prev-lightbox { left: 10px; }
    .next-lightbox { right: 10px; }

    /* FOOTER EN MÓVIL */
    footer {
        padding: 45px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-col {
        align-items: center;
    }

    .redes-sociales {
        align-items: center;
        gap: 12px;
    }

    .social-link {
        justify-content: center;
    }
}

/* PANTALLAS EXTRA PEQUEÑAS (iPhone SE, Galaxy Fold cerrado, < 380px) */
@media (max-width: 380px) {
    header {
        padding: 10px 14px;
    }

    .logo-dj {
        font-size: 17px;
    }

    .cart-btn-header {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .hero-section {
        padding: 72px 3% 14px 3%;
    }

    .hero-scrolled {
        height: 84vh;
        height: 84dvh;
        padding: 65px 3% 14px 3%;
    }

    .hero-text h1 {
        font-size: 1.35rem;
    }

    .hero-text p {
        font-size: 0.78rem;
        margin-bottom: 8px;
    }

    .hero-media {
        max-height: 195px;
        min-height: 135px;
    }

    .section-title {
        font-size: 1.55rem;
    }

    .card {
        padding: 18px 14px;
    }

    .producto-carrusel {
        height: 190px;
    }
}