/* 🎨 ETIQUETA: Reset básico de la página */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    /* 🎨 ETIQUETA: Tipografía general de la página */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #f5f5f7; 
    line-height: 1.5;
    overflow-x: hidden;
    background-color: transparent; 
}

/* --- FONDO DE VIDEO GLOBAL --- */
.fondo-video-global {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -100; 
}
.fondo-video-global video {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* --- NAVEGACIÓN --- */
nav {
    position: fixed; 
    width: 100%;
    top: 0;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 15px 40px; 
    z-index: 100; 
}

.nav-fondo-difuminado {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 180%; 
    /* 🎨 ETIQUETA: Nivel de oscuridad de la barra superior */
    background-color: rgba(20, 20, 20, 0.7); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
    pointer-events: none; 
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

nav .logo { font-size: 26px; font-weight: 600; letter-spacing: -0.5px; color: #ffffff; }

/* 🎨 ETIQUETA: Botón de WhatsApp de la barra superior */
.btn-whatsapp-nav {
    background-color: #25D366; color: #ffffff; text-decoration: none;
    padding: 10px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
    transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp-nav:hover {
    background-color: #1ebe5d; transform: scale(1.05); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* --- HERO SECTION (PORTADA) --- */
.hero { 
    position: relative; 
    text-align: center; 
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 80px; 
    color: white; 
}
.capa-oscura-hero { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    /* 🎨 ETIQUETA: Oscuridad del filtro sobre el video */
    background-color: rgba(0, 0, 0, 0.3); z-index: -1; 
}
.hero-contenido { position: relative; z-index: 1; }
.hero h1 { font-size: 64px; font-weight: 700; letter-spacing: -2px; margin-bottom: 20px; text-shadow: 0 4px 15px rgba(0,0,0,0.8); }
.hero p { font-size: 24px; color: #f5f5f7; max-width: 650px; margin: 0 auto 40px; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }

/* 🎨 ETIQUETA: Botón principal "Consulta" */
.btn-ia-gigante {
    background: #ffffff; color: #1e1e1e; font-size: 20px; font-weight: 600; padding: 18px 45px;
    border-radius: 999px; border: none; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); 
    transition: all 0.3s ease;
}
.btn-ia-gigante:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.8); 
}

/* --- CRISTAL AHUMADO (FONDO GENERAL) --- */
.contenido-con-cristal {
    background-color: rgba(18, 18, 18, 0.75); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    margin-top: -150px; 
    padding-top: 400px; 
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 150px, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 150px, black 100%);
}

/* --- ESTILOS COMPARTIDOS (TARJETAS) --- */
.servicio, .proyecto, .ia-tarjeta, .cristal-oscuro {
    background: rgba(255, 255, 255, 0.08); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12); 
    border-radius: 30px; 
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* --- CONTENEDOR DE TARJETAS DE SERVICIOS --- */
.contenedor-servicios { padding: 0 20px 80px; margin-top: 0; } 
.contenedor { max-width: 1000px; margin: 0 auto; display: flex; gap: 30px; flex-wrap: wrap; }

.servicio {
    position: relative; 
    flex: 1; min-width: 280px; 
    padding: 150px 30px 40px; 
    text-align: center; transition: all 0.4s ease; 
    cursor: pointer; 
    margin-top: 50px; 
}

.servicio-icono {
    position: absolute;
    top: -325px; 
    left: 50%;
    transform: translateX(-50%); 
    width: 450px; 
    height: 450px; 
    object-fit: contain;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.7)); 
    z-index: 2;
}

.servicio::after {
    content: attr(data-titulo);
    position: absolute;
    top: -180px; 
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.9);
    background: rgba(20, 20, 20, 0.9); 
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 999px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    z-index: 10;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    pointer-events: none; 
}

.servicio:hover { 
    transform: translateY(-10px); 
    background: rgba(255, 255, 255, 0.12); 
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.servicio:hover .servicio-icono {
    transform: translate(-50%, -15px) scale(1.08); 
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.3)); 
}

.servicio:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

.servicio h3 { font-size: 21px; margin-bottom: 15px; color: #ffffff; }
.servicio p { font-size: 17px; color: #f5f5f7; }

/* --- SECCIÓN INTELIGENCIA ARTIFICIAL --- */
.seccion-ia { max-width: 1000px; margin: 0 auto 80px; padding: 0 20px; }
.ia-tarjeta { display: flex; flex-wrap: wrap; align-items: center; overflow: hidden; }
.ia-texto { flex: 1; min-width: 300px; padding: 50px; }
.ia-texto h2 { font-size: 32px; color: #ffffff; margin-bottom: 20px; letter-spacing: -1px;}
.ia-texto p { font-size: 17px; color: #f5f5f7; line-height: 1.6;}
.ia-imagen { flex: 1; min-width: 300px; overflow: hidden; height: 100%;}
.ia-imagen img { width: 100%; height: 100%; object-fit: cover; min-height: 350px; filter: brightness(0.85); transition: transform 0.5s ease, filter 0.3s ease; }
.ia-tarjeta:hover .ia-imagen img { transform: scale(1.08); filter: brightness(1); }

/* --- PORTAFOLIO --- */
.portafolio-contenedor { padding: 0 20px 80px; }
.seccion-titulo { text-align: center; font-size: 32px; font-weight: 600; margin-bottom: 50px; color: #ffffff; }
.grid-proyectos { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.proyecto { padding: 0; display: flex; flex-direction: column; overflow: hidden; transition: all 0.4s ease; cursor: pointer; }
.proyecto-foto { width: 100%; height: 220px; object-fit: cover; border-bottom: 1px solid rgba(255, 255, 255, 0.15); filter: brightness(0.85); transition: filter 0.3s ease, transform 0.5s ease; }
.proyecto:hover .proyecto-foto { filter: brightness(1); transform: scale(1.08); }
.proyecto-info { padding: 30px; text-align: left; }
.proyecto-info h4 { font-size: 18px; margin-bottom: 10px; color: #ffffff; }
.proyecto-info p { font-size: 15px; color: #f5f5f7; }

/* --- LOGOS DE TECNOLOGÍAS --- */
.tecnologias-contenedor { max-width: 1000px; margin: 0 auto 80px; padding: 0 20px; text-align: center; }
.carrusel-logos { 
    display: flex; justify-content: center; align-items: center; 
    gap: 50px; flex-wrap: wrap; margin-top: 30px; 
    background: rgba(255, 255, 255, 0.05); 
    padding: 40px; border-radius: 30px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.carrusel-logos img { 
    width: 70px; height: auto; object-fit: contain; 
    filter: grayscale(100%) opacity(0.6); 
    transition: all 0.3s ease; cursor: pointer;
}
.carrusel-logos img:hover { filter: grayscale(0%) opacity(1); transform: scale(1.15) translateY(-5px); }

/* --- QUIÉNES SOMOS & CEO --- */
.quienes-somos-contenedor {
    max-width: 1000px; margin: 0 auto 80px; padding: 0 20px;
    display: flex; gap: 30px; flex-wrap: wrap; align-items: stretch;
}

.quienes-somos-texto { flex: 2; min-width: 300px; display: flex; flex-direction: column; justify-content: center; padding: 40px;}
.quienes-somos-texto h2 { font-size: 32px; color: #ffffff; margin-bottom: 20px; }
.quienes-somos-texto p { font-size: 17px; color: #f5f5f7; line-height: 1.6; }
.quienes-somos-texto strong { color: #ffffff; }

.ceo-perfil { flex: 1; min-width: 250px; padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ceo-foto { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 3px solid rgba(255,255,255,0.2); }
.ceo-info h3 { font-size: 20px; color: #ffffff; margin-bottom: 5px; }
.ceo-cargo { font-size: 15px; color: #cccccc; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;}

/* --- FOOTER Y QR --- */
footer { background-color: rgba(10, 10, 10, 0.8); color: #a1a1a6; text-align: center; padding: 60px 20px 40px; border-top: 1px solid rgba(255,255,255,0.05); }
.contacto-info { margin-bottom: 30px; }
.contacto-info h2 { color: #ffffff; margin-bottom: 20px; }
.contacto-info p { font-size: 18px; margin-bottom: 10px; }
.contacto-info a { color: #ffffff; text-decoration: none; font-weight: 500; }
.contacto-info a:hover { text-decoration: underline; }

.footer-qr { margin: 40px 0 30px; display: flex; flex-direction: column; align-items: center; }
.footer-qr p { font-size: 16px; margin-bottom: 12px; color: #ffffff; font-weight: 500; }
.footer-qr img { width: 140px; height: 140px; border-radius: 16px; border: 2px solid rgba(255,255,255,0.1); object-fit: cover; }

.redes { margin: 20px 0; }
.redes a { color: #f5f5f7; text-decoration: none; margin: 0 10px; font-size: 14px; opacity: 0.7;}
.redes a:hover { opacity: 1; }
.copyright { font-size: 12px; margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px;}

/* --- VENTANAS MODALES --- */
.modal-overlay, .confirmacion-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.activo, .confirmacion-overlay.activo { opacity: 1; pointer-events: all; }

.modal-content, .confirmacion-content {
    background: rgba(30, 30, 30, 0.95); backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 30px;
    padding: 50px 40px; max-width: 500px; width: 90%; text-align: left;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    transform: translateY(30px); transition: transform 0.3s ease; position: relative;
}
.modal-overlay.activo .modal-content, .confirmacion-overlay.activo .confirmacion-content { transform: translateY(0); }

.modal-cerrar {
    position: absolute; top: 20px; right: 25px; font-size: 28px; color: #a1a1a6;
    cursor: pointer; transition: color 0.3s ease; background: none; border: none;
}
.modal-cerrar:hover { color: #ffffff; }

.modal-titulo { font-size: 28px; color: #ffffff; margin-bottom: 15px; letter-spacing: -0.5px; }
.modal-texto { font-size: 16px; color: #f5f5f7; margin-bottom: 25px; line-height: 1.6; }
.modal-lista { list-style: none; margin-bottom: 35px; }
.modal-lista li { font-size: 16px; color: #f5f5f7; margin-bottom: 10px; display: flex; align-items: center; }
.modal-lista li::before { content: '✨'; margin-right: 10px; font-size: 14px; color: #ffffff; }

.btn-modal-cotizar {
    width: 100%; background: #ffffff; color: #1e1e1e; font-size: 18px; font-weight: 600; 
    padding: 15px; border-radius: 999px; border: none; cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); transition: all 0.3s ease;
}
.btn-modal-cotizar:hover { background: #e0e0e0; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7); transform: translateY(-2px); }

.confirmacion-content { text-align: center; }
.confirmacion-texto { font-size: 18px; color: #f5f5f7; margin-bottom: 30px; line-height: 1.5; font-weight: 500;}
.confirmacion-botones { display: flex; gap: 15px; justify-content: center; }

.btn-confirmar {
    flex: 1; background: #ffffff; color: #1e1e1e; font-size: 16px; font-weight: 600; 
    padding: 12px; border-radius: 999px; border: none; cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); transition: all 0.3s ease;
}
.btn-confirmar:hover { background: #e0e0e0; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7); }

.btn-cancelar {
    flex: 1; background: transparent; color: #f5f5f7; font-size: 16px; font-weight: 600; 
    padding: 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); cursor: pointer;
    transition: all 0.3s ease;
}
.btn-cancelar:hover { background: rgba(255,255,255,0.1); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .contenido-con-cristal { padding-top: 110px; }
    .contenedor-servicios { padding-bottom: 40px; }
    .servicio { margin-top: 150px; padding-top: 160px; }
    .servicio-icono { width: 280px; height: 280px; top: -140px; }
    .servicio::after { top: -90px; font-size: 16px; padding: 8px 20px; }
    .hero h1 { font-size: 48px; } 
    .confirmacion-botones { flex-direction: column; }
}