/* ========================================
   MEJORAS PERSONALIZADAS DE UI/UX
   ======================================== */

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Mejoras de contacto */
.contact-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.contact-card:hover {
    border-left-color: var(--primary);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.contact-card .rounded-circle {
    box-shadow: 0 4px 15px rgba(4, 99, 250, 0.2);
}

.contact-card:hover .rounded-circle {
    animation: pulse 1s infinite;
}

/* Botón de WhatsApp mejorado */
.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    color: #FFFFFF !important;
    font-weight: 600;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    transform: translateY(-3px);
    color: #FFFFFF !important;
}

.whatsapp-btn i {
    margin-right: 8px;
    color: #FFFFFF;
}

/* Botón de llamada mejorado */
.call-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(4, 99, 250, 0.4);
    transition: all 0.3s ease;
    color: #FFFFFF !important;
    font-weight: 600;
}

.call-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #023A9E 100%);
    box-shadow: 0 6px 20px rgba(4, 99, 250, 0.6);
    transform: translateY(-3px);
    color: #FFFFFF !important;
}

.call-btn i {
    color: #FFFFFF;
}

/* Hero section mejorado */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(4, 99, 250, 0.8) 0%, rgba(27, 44, 81, 0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Tarjetas de servicio mejoradas */
.service-card-enhanced {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #f0f0f0;
}

.service-card-enhanced:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.service-card-enhanced:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 10px 25px rgba(4, 99, 250, 0.4);
}

/* Badge de experiencia */
.experience-badge {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1B2C51;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    animation: pulse 2s infinite;
}

/* Sección de marcas mejorada */
.brand-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.brand-card img {
    transition: all 0.3s ease;
    filter: grayscale(30%);
}

.brand-card:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Skeleton loader para imágenes */
.img-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Mejoras de accesibilidad */
.focus-visible:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Tooltips personalizados */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.custom-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Sección de información de contacto sticky */
.sticky-contact {
    position: sticky;
    top: 100px;
    z-index: 10;
}

/* Gradientes de fondo */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.bg-gradient-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Separadores de sección */
.section-divider {
    height: 4px;
    width: 80px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Mejoras de tipografía */
.heading-primary {
    font-weight: 700;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.heading-primary::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Botones flotantes de acción */
.floating-action-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #FFFFFF !important;
}

.floating-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    color: #FFFFFF !important;
}

.floating-action-btn i {
    color: #FFFFFF !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .service-card-enhanced {
        margin-bottom: 1.5rem;
    }
    
    .floating-action-btn {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 20px;
    }
    
    .hero-section {
        min-height: 60vh;
    }
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras de contraste para accesibilidad */
.high-contrast {
    filter: contrast(1.2);
}

/* Iconos animados */
.animated-icon {
    transition: all 0.3s ease;
}

.animated-icon:hover {
    transform: scale(1.2) rotate(10deg);
}

/* Cards con efecto glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Mejoras de scroll */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

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

/* Notificaciones toast */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mejoras de formularios */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(4, 99, 250, 0.25);
}

/* Badges personalizados */
.custom-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--primary);
    color: white;
}

.custom-badge.badge-success {
    background: var(--success);
}

.custom-badge.badge-warning {
    background: var(--secondary);
}
