/* style.css - Servirey Blindado y Completo */
* { box-sizing: border-box; }

:root { 
    --primary: #111111; 
    --accent: #F7A800; 
    --bg: #ffffff;
    --text: #1a1a1a; 
    --light-gray: #f2f2f2; 
    --text-muted: #666666;
}

body { 
    font-family: 'Segoe UI', system-ui, sans-serif; 
    margin: 0; 
    line-height: 1.4; 
    color: var(--text); 
    background-color: var(--bg);
    cursor: url('../puntero.png'), auto; 
}

/* ========================================================== */
/* ENCABEZADO Y NAVEGACIÓN                                    */
/* ========================================================== */
header { 
    padding: 0.5rem 2rem; 
    background: var(--bg); 
    border-bottom: 2px solid #e0e0e0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; 
    top: 0;
    z-index: 1000;
}

.logo { margin-right: auto; flex-shrink: 0; }
.logo img { height: 140px; width: auto; object-fit: contain; }

.header-info { display: flex; flex-direction: column; align-items: center; font-size: 1.0rem; font-weight: bold; margin: 0 1rem; color: var(--primary); }
#clock { color: var(--primary); }
#weather { color: var(--accent); }

nav { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: flex-end; }
nav a { padding: 8px 15px; text-decoration: none; color: var(--text); font-weight: bold; text-transform: uppercase; font-size: 1.2rem; transition: 0.3s; }
nav a:hover, nav a.active { background-color: var(--accent); color: var(--primary); border-radius: 5px; }

/* Cursor interactivo para enlaces */
a:hover, .cta-btn:hover, button:hover { cursor: url('../puntero.png'), pointer; }

/* ========================================================== */
/* SECCIONES PRINCIPALES (HERO, CONTENEDORES Y TARJETAS)      */
/* ========================================================== */
.hero-video-container { position: relative; width: 100%; min-height: 85vh; padding: 2rem 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--primary); }
.video-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; background: rgba(255, 255, 255, 0.85); padding: 2rem; border-radius: 20px; max-width: 600px; margin: 1rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem; }
.page-header { text-align: center; margin-bottom: 3rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.card { background: var(--bg); border: 1px solid #e0e0e0; border-radius: 10px; padding: 2rem; text-align: center; transition: 0.3s; transform-style: preserve-3d; }
.card:hover { transform: translateY(-5px); border-bottom: 4px solid var(--accent); }
.card i, .card h3, .card p { transform: translateZ(40px); }

.cta-btn { background: var(--accent); color: #000; padding: 1rem 2rem; text-decoration: none; font-weight: bold; border-radius: 5px; display: inline-block; }

/* Blog */
.blog-card { text-align: left; padding: 0; overflow: hidden; }
.blog-img { width: 100%; height: 200px; background: #ddd; object-fit: cover; border-radius: 10px 10px 0 0; }

/* ========================================================== */
/* SPLASH SCREEN (BLINDADO Y CINEMATOGRÁFICO)                 */
/* ========================================================== */
#splash-screen {
    position: fixed !important; 
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--primary);
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s;
    overflow: hidden;
}

#splash-screen.oculto-rapido { display: none !important; }
#splash-screen.salida { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-logo img { width: 160px; height: auto; position: relative; z-index: 2; animation: zoomLogo 2s ease-out forwards; }

@keyframes zoomLogo {
    0% { transform: scale(0.8); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: scale(1.1); opacity: 1; }
}

.luces-torreta { position: absolute; top: 15%; width: 100%; display: flex; justify-content: space-between; padding: 0 10%; z-index: 1; pointer-events: none; }
.luz { width: 30vw; height: 250px; background: var(--accent); filter: blur(80px); opacity: 0; border-radius: 50%; }
.luz-izq { animation: estrobo 0.8s infinite; }
.luz-der { animation: estrobo 0.8s infinite 0.4s; }

@keyframes estrobo {
    0%, 100% { opacity: 0; }
    10% { opacity: 0.6; }
    20% { opacity: 0; }
    30% { opacity: 0.6; }
    40% { opacity: 0; }
}

/* ========================================================== */
/* WIDGET INTERACTIVO DE WHATSAPP                             */
/* ========================================================== */
.whatsapp-widget-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; font-family: sans-serif; }

/* Botón flotante con Animación Zumbido */
.whatsapp-float-btn { 
    width: 60px; height: 60px; background-color: #25d366; color: white; 
    border-radius: 50%; display: flex; justify-content: center; align-items: center; 
    font-size: 30px; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); 
    cursor: pointer; border: none; transition: transform 0.3s ease; position: relative;
    transform-origin: center;
    animation: zumbidoVivo 5s infinite; 
}
.whatsapp-float-btn:hover { 
    transform: scale(1.1); 
    animation-play-state: paused; 
}

@keyframes zumbidoVivo {
    0%, 100% { transform: scale(1) rotate(0deg); }
    2% { transform: scale(1.1) rotate(-5deg); }
    4% { transform: scale(1.15) rotate(5deg); }
    6% { transform: scale(1.1) rotate(-5deg); }
    8% { transform: scale(1.05) rotate(5deg); }
    10% { transform: scale(1) rotate(0deg); }
}

/* Estructura del Chat */
.whatsapp-chat-box { display: none; width: 320px; background: #fff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); overflow: hidden; margin-bottom: 15px; flex-direction: column; }
.wa-chat-header { background: #075e54; color: white; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; }
.wa-header-info { display: flex; align-items: center; gap: 10px; }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2px; }
.wa-chat-header h4 { margin: 0; font-size: 14px; font-weight: bold; }
.wa-chat-header p { margin: 0; font-size: 11px; opacity: 0.9; }
.wa-close-btn { background: rgba(255,255,255,0.2); border: none; color: white; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; padding: 0; }
.wa-close-btn:hover { background: rgba(255,255,255,0.4); }

/* Cuerpo y Mensajes (Sincronizado con JavaScript) */
.wa-chat-body { background: #e5ddd5; padding: 12px; height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.wa-msg { max-width: 85%; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; box-shadow: 0 1px 2px rgba(0,0,0,0.1); word-break: break-word; }
.wa-msg.bot { background: #fff; color: #333; align-self: flex-start; border-top-left-radius: 0; }
.wa-msg.user { background: #dcf8c6; color: #333; align-self: flex-end; border-top-right-radius: 0; }

/* Botones de Opciones del Bot */
.wa-options { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; width: 100%; }
.wa-option-btn { background: #075e54; color: white; border: none; padding: 8px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; text-align: left; transition: background 0.2s; width: 100%; }
.wa-option-btn:hover { background: #128c7e; }

/* Pie del Chat */
.wa-chat-footer { padding: 10px; background: #f0f0f0; display: flex; gap: 8px; align-items: center; }
.wa-chat-footer input { flex: 1; padding: 9px 12px; border: 1px solid #ccc; border-radius: 20px; outline: none; font-size: 13px; background: #fff; color: #333; }
.wa-chat-footer button { background: #25d366; color: white; border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 14px; flex-shrink: 0; }

/* ========================================================== */
/* ADAPTACIÓN A CELULARES (RESPONSIVE)                        */
/* ========================================================== */
@media (max-width: 768px) {
    header { flex-direction: column; gap: 0.5rem; padding: 1rem 0.5rem; position: static !important; }
    .header-info { display: none !important; }
    .logo { margin: 0 auto; width: 100%; text-align: center; }
    .logo img { height: auto !important; max-height: 106px !important; max-width: 90% !important; }
    nav { justify-content: center; gap: 0.4rem; width: 100%; }
    nav a { padding: 6px 10px; font-size: 0.8rem; }
    .hero-video-container { min-height: auto; padding: 3rem 1rem; }
    .video-bg { display: none !important; } 
}