/*  MENÚ  */
.menu-item {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    background-color: transparent;
    transition: transform 0.3s ease !important;
}

.menu-item:hover,
.menu-item:focus,
.menu-item:active {
    background-color: transparent;
}

.menu-item:hover {
    transform: scale(1.1) !important;
}

/* KEYFRAMES */
@keyframes slideFromLeft { 0% { opacity: 0; transform: translateX(-50px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes slideFromRight { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes slideFromTop { 0% { opacity: 0; transform: translateY(-30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes slideFromBottom { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
@keyframes autoShinePremium { 0% { left: -150%; } 30% { left: 150%; } 100% { left: 150%; } }
@keyframes blurReveal { 0% { opacity: 0; filter: blur(10px); transform: translateY(20px); } 100% { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes pulseGold { 0% { box-shadow: 0 0 0 0 rgba(241, 203, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(241, 203, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(241, 203, 102, 0); } }

/* Efecto Flote Imagen Descarga */
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Entrada Reseñas */
@keyframes backInRight {
    0% { transform: translateX(100px); opacity: 0; }
    80% { transform: translateX(-10px); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Efecto Claridad (Solo visual, no mueve posición) */
@keyframes clarityFocus {
    0% { filter: blur(8px); opacity: 0; }
    100% { filter: blur(0); opacity: 1; }
}

/* --- 3. ESTADOS INICIALES --- */
.logo, .header-principal, .header-subtitulo, .menu-item, 
.hero p, .servicios h2, .servicio-item,
.quienes-somos h2, .quienes-somos p,
.contenido-gratuito img, .contenido-texto-y-boton-wrapper,
.reseña-title, .reseñas-card, .i1, .i2, .i3 {
    opacity: 0;
    will-change: transform, opacity;
}

/* --- 4. CLASES DE ACTIVACIÓN --- */
.visible-logo { animation: slideFromLeft 0.7s ease-out forwards !important; }
.visible-titulo { 
    animation: slideFromTop 0.7s ease-out forwards !important;
    color: #FAE78B !important;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5), 0px -1px 0px rgba(0, 0, 0, 0.2), 1px 4px 6px rgba(0, 0, 0, 0.3);
}
.visible-subtitulo { animation: slideFromRight 0.7s ease-out forwards !important; }
.visible-menu-item { animation: slideFromBottom 0.5s ease-out forwards !important; }

.visible-servicio-card { 
    animation: zoomIn 0.6s ease-out forwards !important;
    position: relative;
    overflow: hidden;
}

.servicio-item::after {
    content: '';
    position: absolute;
    top: 0; left: -150%; width: 40%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: autoShinePremium 5s infinite ease-in-out;
    z-index: 10;
    pointer-events: none;
}

.visible-quienes-h2 { animation: blurReveal 1s ease-out forwards !important; opacity: 1 !important;}
.visible-quienes-p { animation: slideFromBottom 0.8s ease-out forwards !important; }
.visible-hero-p { animation: slideFromLeft 0.8s ease-out forwards !important; }
.visible-servicios-h2 { animation: slideFromTop 0.7s ease-out forwards !important; }

/* CONTENIDO GRATUITO */
.visible-gratuito-img { animation: slideFromLeft 0.8s ease-out forwards, floating 3s ease-in-out infinite !important; }
.visible-gratuito-box { animation: slideFromRight 0.8s ease-out forwards !important; }

/*SECCIÓN RESEÑAS*/
.visible-reseña-title { animation: slideFromTop 0.8s ease-out forwards !important; }
.visible-reseña-card { animation: backInRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards !important; }

/* Efecto de claridad para logos decorativos */
.visible-i1 { animation: clarityFocus 1s ease-out forwards !important; }
.visible-i2 { animation: clarityFocus 1s ease-out forwards !important; }
.visible-i3 { animation: clarityFocus 1s ease-out forwards !important; }

/*CERTIFICADOS*/
/* Keyframe para que las esferas aparezcan como si se inflaran */
@keyframes spherePop {
    0% { opacity: 0; transform: scale(0.5) translateY(30px); filter: blur(5px); }
    70% { transform: scale(1.1) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.certificado-circulo {
    opacity: 0;
    will-change: transform, opacity;
}

/* Clase de activación */
.visible-certificado {
    animation: spherePop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* --- ANIMACIONES SECCIÓN CONTACTO --- */
.visible-ubicacion { 
    animation: slideFromTop 0.8s ease-out forwards !important; 
}

.visible-formulario { 
    animation: slideFromBottom 0.8s ease-out forwards !important; 
}

.visible-redes { 
    animation: slideFromRight 0.8s ease-out forwards !important; 
}

/* Estados iniciales */
.ubicacion, .formulario-consulta, .social-item {
    opacity: 0;
}
/* --- 5. BOTÓN DE DESCARGA --- */
.boton-descargar {
    position: relative;
    overflow: hidden;
    animation: pulseGold 2s infinite;
    z-index: 5;
}
.boton-descargar::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: all 0.6s;
}
.boton-descargar:hover::before { left: 100%; }

@media (max-width: 768px) {
    .visible-quienes-h2 { font-size: 1.6rem !important; }
}
/* --- Botón WhatsApp Esfera Premium (Estilo Certificado) --- */
.whatsapp-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: white;
    text-decoration: none;
    z-index: 9999;
    
    /* GRADIENTE ESTILO CERTIFICADO: Brillo (30%), Base (60%) y Sombra */
    background: radial-gradient(circle at 30% 30%, #45ef7d, #25D366 60%, #128c7e);
    
    /* DOBLE INSET + SOMBRA EXTERIOR (Copiado de tus certificados) */
    box-shadow: 
        inset -6px -6px 12px rgba(0, 0, 0, 0.2), 
        inset 6px 6px 12px rgba(255, 255, 255, 0.3),
        0 12px 20px rgba(0, 0, 0, 0.2);
    
    /* Texto con relieve sutil */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    
    /* Transición elástica */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

/* --- Botón WhatsApp Esfera Responsivo --- */
.whatsapp-button {
    position: fixed;
    /* Ubicación adaptativa */
    bottom: clamp(1rem, 5vw, 25px);
    right: clamp(1rem, 5vw, 25px);
    
    /* Tamaño responsivo: mínimo 55px, ideal 15vw del móvil, máximo 70px */
    width: clamp(55px, 15vw, 70px);
    height: clamp(55px, 15vw, 70px);
    
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-decoration: none;
    
    /* Estética Esfera (igual a tus certificados) */
    background: radial-gradient(circle at 30% 30%, #45ef7d, #25D366 60%, #128c7e);
    box-shadow: 
        inset -6px -6px 12px rgba(0, 0, 0, 0.2), 
        inset 6px 6px 12px rgba(255, 255, 255, 0.3),
        0 12px 20px rgba(0, 0, 0, 0.2);
    
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

/* Icono responsivo: se ajusta al tamaño del botón */
.whatsapp-button i {
    font-size: clamp(28px, 8vw, 40px);
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

/* Hover con elevación */
.whatsapp-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* Destello Premium */
.whatsapp-button::before {
    content: "";
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
}

.whatsapp-button:hover::before {
    left: 100%;
    top: 100%;
}

/* Animación de pulso sutil */
@keyframes pulse-premium {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-button {
    animation: pulse-premium 2s infinite;
}

/* Estado base del footer */
footer {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
    will-change: opacity; /* Optimización para que la placa de video ayude */
}

/* Clase que aplicará el JS */
footer.footer-visible {
    opacity: 1;
    visibility: visible;
}