/* Custom CSS para LiveSmart - Automatización de Hogares Inteligentes */

/* Variables CSS personalizadas */
:root {
    --primary-color: #06b6d4; /* Cyan-500 */
    --primary-dark: #0891b2; /* Cyan-600 */
    --bg-dark: #0f172a; /* Gray-900 */
    --bg-card: rgba(30, 41, 59, 0.5); /* Gray-800 con transparencia */
    --text-primary: #f1f5f9; /* Gray-100 */
    --text-secondary: #cbd5e1; /* Gray-300 */
}

/* Estilos base */
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    scroll-behavior: smooth;
}

/* Header fijo en todos los dispositivos */
#main-header {
    background-color: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(6, 182, 212, 0.25);
}

/* Efecto de scroll sutil */
header.scrolled {
    background-color: rgba(15, 23, 42, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Ajustar Hero para header fijo */
#hero {
    padding-top: 0 !important;
}

/* Hero section con gradiente mejorado */
#hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 50%, var(--bg-dark) 100%);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Tarjetas de servicios con efecto hover mejorado */
.bg-gray-800\/50 {
    background-color: var(--bg-card);
    transition: all 0.3s ease;
}

.bg-gray-800\/50:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color) !important;
}

/* Formulario con validación visual */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1) !important;
}

input.error, select.error, textarea.error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1) !important;
}

input.success, select.success, textarea.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Botones con efecto mejorado */
button, .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
}

button::after, .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:focus:not(:active)::after, .btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Animaciones sutiles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 3rem !important;
    }
    
    .bg-gray-800\/50 {
        margin-bottom: 1.5rem;
    }
    
    .bg-gray-800\/50:last-child {
        margin-bottom: 0;
    }
}

/* Loading spinner para formulario */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mensajes de éxito/error del formulario */
#form-message.success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

#form-message.error {
    background-color: rgba(248, 113, 113, 0.1);
    border: 1px solid #f87171;
    color: #f87171;
}

/* Efecto de partículas para hero (opcional) */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.1);
    pointer-events: none;
}

/* Texturas para el Hero */
.texture-dots {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(6, 182, 212, 0.08) 2px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 1px, transparent 2px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 
        60px 60px,
        40px 40px,
        80px 80px;
    animation: textureFloat 20s ease-in-out infinite;
}

/* Textura de líneas diagonales sutiles */
.texture-lines {
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(6, 182, 212, 0.02) 10px,
            rgba(6, 182, 212, 0.02) 20px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 15px,
            rgba(59, 130, 246, 0.015) 15px,
            rgba(59, 130, 246, 0.015) 30px
        );
    background-size: 
        100px 100px,
        150px 150px;
    opacity: 0.4;
}

/* Textura de cuadrícula inteligente */
.texture-grid {
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: -1px -1px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Animación para textura flotante */
@keyframes textureFloat {
    0%, 100% {
        background-position: 
            0% 0%,
            0% 0%,
            0% 0%;
    }
    25% {
        background-position: 
            10% 10%,
            5% 5%,
            -5% -5%;
    }
    50% {
        background-position: 
            0% 20%,
            10% 0%,
            0% 10%;
    }
    75% {
        background-position: 
            -10% 10%,
            0% 5%,
            5% 0%;
    }
}

/* Efectos de textura para diferentes dispositivos */
@media (max-width: 768px) {
    .texture-dots {
        background-size: 
            40px 40px,
            30px 30px,
            60px 60px;
        opacity: 0.6;
    }
    
    .texture-lines {
        opacity: 0.3;
        background-size: 
            80px 80px,
            120px 120px;
    }
    
    .texture-grid {
        background-size: 40px 40px;
        opacity: 0.4;
    }
}

/* Efecto de partículas de conexión */
.connection-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(6, 182, 212, 0.3);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(0.5px);
    animation: particleFlow 3s linear infinite;
}

@keyframes particleFlow {
    0% {
        transform: translateX(-100px) translateY(var(--start-y));
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(var(--end-y));
        opacity: 0;
    }
}

/* Efecto de scanlines sutil */
.texture-scanlines {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    background-size: 100% 4px;
    opacity: 0.1;
    pointer-events: none;
}

/* Menú móvil mejorado */
.mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes para header fijo en móviles */
@media (max-width: 768px) {
    #main-header {
        background-color: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(10px);
    }
    
    .mobile-menu {
        top: 3.5rem; /* Ajustado para header más compacto */
    }
}

/* Textura de ruido digital sutil */
.texture-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.03;
}

/* Transiciones suaves para todos los elementos */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   ANIMACIONES MEJORADAS PARA HERO SECTION
   ============================================ */

/* Animación de gradiente para fondo */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Animación de texto con gradiente */
@keyframes gradientText {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-text {
    background-size: 200% auto;
    animation: gradientText 3s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
}

/* Animaciones de pulso personalizadas */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.05);
    }
}

@keyframes pulse-medium {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1);
    }
    50% {
        opacity: 0.25;
        transform: scale(1.03);
    }
}

@keyframes pulse-slower {
    0%, 100% {
        opacity: 0.05;
        transform: scale(1);
    }
    50% {
        opacity: 0.1;
        transform: scale(1.02);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-pulse-medium {
    animation: pulse-medium 3s ease-in-out infinite;
}

.animate-pulse-slower {
    animation: pulse-slower 6s ease-in-out infinite;
}

/* Animación de entrada suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Líneas de conexión animadas */
.connection-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
    height: 1px;
    width: 100%;
    opacity: 0;
}

.line-1 {
    top: 20%;
    animation: lineFlow 8s linear infinite;
    animation-delay: 0s;
}

.line-2 {
    top: 50%;
    animation: lineFlow 10s linear infinite;
    animation-delay: 2s;
}

.line-3 {
    top: 80%;
    animation: lineFlow 12s linear infinite;
    animation-delay: 4s;
}

@keyframes lineFlow {
    0% {
        left: -100%;
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Efecto de brillo para botones */
@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
    }
}

.hover\:shadow-cyan-500\/30:hover {
    animation: buttonGlow 2s ease-in-out infinite;
}

/* Animación de dispositivos flotantes */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-6deg);
    }
    50% {
        transform: translateY(-10px) rotate(-6deg);
    }
}

@keyframes floatReverse {
    0%, 100% {
        transform: translateY(0) rotate(3deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

.relative.w-48.h-96.transform.-rotate-6 {
    animation: float 6s ease-in-out infinite;
}

.relative.w-64.h-48.transform.rotate-3 {
    animation: floatReverse 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* Efecto de partículas mejorado */
.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent);
    pointer-events: none;
    filter: blur(1px);
}

/* Efecto de scroll indicator */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* Responsive adjustments para Hero mejorado */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    #hero h1 span {
        font-size: 3rem !important;
    }
    
    #hero p {
        font-size: 1.125rem !important;
    }
    
    .relative.w-48.h-96,
    .relative.w-64.h-48 {
        transform: none !important;
        animation: none !important;
        margin: 0 auto;
    }
    
    .relative.w-48.h-96 {
        width: 40vw;
        height: 80vw;
    }
    
    .relative.w-64.h-48 {
        width: 60vw;
        height: 45vw;
    }
    
    .flex.flex-wrap.gap-8.mb-12 {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .flex.flex-wrap.gap-4.mb-16 {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flex.flex-wrap.gap-4.mb-16 a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2rem !important;
    }
    
    #hero h1 span {
        font-size: 2.5rem !important;
    }
    
    .relative.w-48.h-96 {
        width: 60vw;
        height: 120vw;
    }
    
    .relative.w-64.h-48 {
        width: 80vw;
        height: 60vw;
    }
}

/* Mejoras de rendimiento */
@media (prefers-reduced-motion: reduce) {
    .animate-gradient,
    .animate-gradient-text,
    .animate-pulse-slow,
    .animate-pulse-medium,
    .animate-pulse-slower,
    .animate-fade-in,
    .connection-line,
    .relative.w-48.h-96.transform.-rotate-6,
    .relative.w-64.h-48.transform.rotate-3,
    .animate-bounce {
        animation: none !important;
    }
    
    .hover\:shadow-cyan-500\/30:hover {
        animation: none !important;
    }
}

/* Optimización para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .hover\:scale-105:hover,
    .hover\:rotate-0:hover {
        transform: none !important;
    }
    
    .hover\:shadow-2xl:hover {
        box-shadow: none !important;
    }
}

/* ============================================
   ESTILOS PARA MODALES LEGALES
   ============================================ */

/* Overlay del modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Contenedor del modal */
.modal-container {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header del modal */
.modal-header {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close-btn {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #06b6d4;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: #06b6d4;
    transform: rotate(90deg);
}

.modal-close-btn i {
    width: 20px;
    height: 20px;
}

/* Contenido del modal */
.modal-content {
    padding: 0;
    height: calc(90vh - 80px);
    overflow: hidden;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Footer del modal */
.modal-footer {
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(6, 182, 212, 0.1);
    text-align: center;
}

.modal-footer p {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

/* Enlaces legales en el footer */
.legal-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 8px;
}

.legal-link {
    color: #06b6d4;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.legal-link:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
}

/* Responsive para modales */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-content {
        height: calc(85vh - 72px);
    }
    
    .legal-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .legal-link {
        text-align: center;
        padding: 8px;
    }
}

/* Animación de salida */
.modal-overlay.closing {
    opacity: 0;
}

.modal-overlay.closing .modal-container {
    animation: modalSlideOut 0.3s ease-in forwards;
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* Prevenir scroll del body cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}

/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    transition: all 0.3s ease;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 1%, transparent 1%);
    background-size: 10px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-button:hover::before {
    opacity: 0.1;
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.whatsapp-button:hover .whatsapp-icon {
    transform: scale(1.1);
}

/* Efecto de pulso */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    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-pulse {
    animation: whatsappPulse 2s infinite;
}

/* Tooltip del botón */
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-left: 6px solid rgba(15, 23, 42, 0.95);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.whatsapp-button:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

/* Badge de notificación */
.whatsapp-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgeBounce 0.5s ease;
}

@keyframes badgeBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Versión móvil */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        z-index: 9998; /* Asegurar que esté sobre otros elementos */
    }
    
    .whatsapp-button {
        width: 64px; /* Más grande para mejor touch */
        height: 64px;
        min-width: 64px; /* Evitar compresión */
        min-height: 64px;
        touch-action: manipulation; /* Mejorar respuesta táctil */
        -webkit-tap-highlight-color: rgba(37, 211, 102, 0.3); /* Feedback visual al tocar */
        tap-highlight-color: rgba(37, 211, 102, 0.3);
    }
    
    .whatsapp-icon {
        width: 32px;
        height: 32px;
    }
    
    .whatsapp-tooltip {
        display: none; /* Ocultar tooltip en móviles para mejor UX */
    }
    
    .whatsapp-button:hover .whatsapp-tooltip {
        display: none;
    }
    
    /* Mejorar touch target */
    .whatsapp-button::after {
        content: '';
        position: absolute;
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        z-index: -1;
    }
    
    /* Desactivar hover effects en móviles */
    .whatsapp-button:hover {
        transform: none;
    }
    
    .whatsapp-button:active {
        transform: scale(0.9);
        transition: transform 0.1s ease;
    }
    
    /* Feedback visual para touch */
    .whatsapp-button.touch-active {
        transform: scale(0.9);
        opacity: 0.9;
    }
}

/* Versión tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .whatsapp-float {
        bottom: 25px;
        right: 25px;
    }
}

/* Animación de entrada */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.whatsapp-float {
    animation: slideInRight 0.5s ease-out 1s both;
}

/* Estado inactivo (cuando el usuario ya hizo clic) */
.whatsapp-button.clicked {
    background: linear-gradient(135deg, #1da851 0%, #0d7a5f 100%);
    transform: scale(0.9);
}

.whatsapp-button.clicked .whatsapp-icon {
    transform: rotate(360deg);
    transition: transform 0.6s ease;
}

/* Para usuarios que prefieren reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-button,
    .whatsapp-button:hover,
    .whatsapp-icon,
    .whatsapp-float,
    .whatsapp-pulse,
    .whatsapp-badge {
        animation: none !important;
        transition: none !important;
    }
    
    .whatsapp-button:hover {
        transform: none;
    }
}

/* Ajuste para cuando hay modales abiertos */
.modal-open .whatsapp-float {
    z-index: 9997; /* Detrás del modal pero sobre otros elementos */
}

/* ============================================
   ESTILOS PARA BOTONES DE REDES SOCIALES EN FOOTER
   ============================================ */

/* Estilo para el icono de WhatsApp en el footer */
.hover\:text-\[\#25D366\]:hover {
    color: #25D366 !important;
}

/* Efecto especial para el icono de WhatsApp */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Tooltip para redes sociales */
.relative .absolute {
    pointer-events: none;
}

/* Animación suave para tooltips */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Estilo específico para el icono de WhatsApp en footer */
i[data-lucide="message-circle"] {
    transition: all 0.3s ease;
}

.group:hover i[data-lucide="message-circle"] {
    color: #25D366;
    filter: drop-shadow(0 2px 4px rgba(37, 211, 102, 0.3));
}

/* Estilo específico para el icono de Facebook en footer */
.group:hover i[data-lucide="facebook"] {
    color: #1877F2;
    filter: drop-shadow(0 2px 4px rgba(24, 119, 242, 0.3));
}

/* Espaciado y alineación para los botones de redes */
.flex.items-center.space-x-8 {
    gap: 2rem;
}

/* Responsive para botones de redes en footer */
@media (max-width: 768px) {
    .flex.items-center.space-x-8 {
        gap: 1.5rem;
    }
    
    .relative .absolute {
        display: none; /* Ocultar tooltips en móviles para mejor UX */
    }
}

/* Efecto de pulso sutil para WhatsApp en footer */
@keyframes subtlePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Aplicar pulso solo al icono de WhatsApp */
i[data-lucide="message-circle"] {
    animation: subtlePulse 3s ease-in-out infinite;
}

/* Para usuarios que prefieren reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    i[data-lucide="message-circle"] {
        animation: none;
    }
    
    .group-hover\:scale-110 {
        transition: none;
    }
}

/* ============================================
   ESTILOS PARA CAPTCHA MATEMÁTICO
   ============================================ */

/* Contenedor del captcha */
.bg-gray-800\/30.border-gray-700 {
    border-color: rgba(6, 182, 212, 0.1) !important;
    background: rgba(30, 41, 59, 0.4) !important;
    transition: all 0.3s ease;
}

.bg-gray-800\/30.border-gray-700:hover {
    border-color: rgba(6, 182, 212, 0.2) !important;
    background: rgba(30, 41, 59, 0.5) !important;
}

/* Icono del captcha */
.w-10.h-10.bg-cyan-500\/20 {
    background: rgba(6, 182, 212, 0.15) !important;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Pregunta del captcha */
#captcha-question {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(6, 182, 212, 0.3);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Input del captcha */
#captcha {
    transition: all 0.3s ease;
}

#captcha:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2) !important;
    border-color: #06b6d4 !important;
}

#captcha.success {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

#captcha.error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Botón de refrescar captcha */
#refresh-captcha {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

#refresh-captcha:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: #06b6d4;
    transform: rotate(90deg);
}

#refresh-captcha:active {
    transform: rotate(180deg);
}

/* Animación para el botón de refrescar */
@keyframes rotateRefresh {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#refresh-captcha.refreshing i {
    animation: rotateRefresh 0.6s ease;
}

/* Mensaje de error del captcha */
#captcha-error {
    position: absolute;
    width: 100%;
    text-align: center;
    font-weight: 500;
}

/* Estilos para el texto del captcha */
.text-xs.text-gray-400 {
    opacity: 0.8;
}

/* Responsive para captcha */
@media (max-width: 768px) {
    .bg-gray-800\/30.border-gray-700 .flex-col.sm\:flex-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem !important;
    }
    
    .bg-gray-800\/30.border-gray-700 .flex-col.sm\:flex-row > div {
        width: 100%;
        text-align: center;
    }
    
    .bg-gray-800\/30.border-gray-700 .flex.items-center.space-x-3 {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem !important;
    }
    
    #captcha {
        width: 100px !important;
        min-width: 100px !important;
        font-size: 1.25rem !important;
        height: 56px !important;
        padding: 0.75rem !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(6, 182, 212, 0.2);
        tap-highlight-color: rgba(6, 182, 212, 0.2);
        font-weight: bold;
    }
    
    #captcha-question {
        min-width: 100px !important;
        font-size: 1.25rem !important;
        padding: 0.75rem !important;
        height: 56px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mejorar botón de refrescar en móviles */
    #refresh-captcha {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ajustar icono del captcha */
    .w-10.h-10.bg-cyan-500\/20 {
        width: 48px !important;
        height: 48px !important;
    }
    
    .w-10.h-10.bg-cyan-500\/20 i {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Mejorar labels */
    .block.text-sm.font-medium.text-gray-300 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .text-xs.text-gray-400 {
        font-size: 0.875rem !important;
        line-height: 1.4;
    }
    
    /* Prevenir zoom en input */
    #captcha {
        font-size: 16px !important; /* Prevenir zoom en iOS */
    }
    
    /* Mejorar touch target para todo el grupo del captcha */
    .bg-gray-800\/30.border-gray-700 {
        margin: 0.5rem 0;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    #captcha {
        width: 90px !important;
        min-width: 90px !important;
        font-size: 1.125rem !important;
        height: 52px !important;
    }
    
    #captcha-question {
        min-width: 90px !important;
        font-size: 1.125rem !important;
        height: 52px !important;
    }
    
    .bg-gray-800\/30.border-gray-700 .flex.items-center.space-x-3 {
        gap: 0.75rem !important;
    }
}

/* Efecto de validación */
@keyframes captchaSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

#captcha.success {
    animation: captchaSuccess 0.6s ease;
}

/* Para usuarios que prefieren reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    #refresh-captcha:hover,
    #refresh-captcha:active,
    #refresh-captcha.refreshing i,
    #captcha.success {
        animation: none !important;
        transform: none !important;
    }
}