/**
 * Modern Improvements - Ar-Tec Invent
 * Mejoras visuales y de usabilidad para modernizar el sitio
 */

/* ===== MEJORAS GENERALES ===== */
:root {
    --primary-color: #fbb03b;
    --secondary-color: #ff8c00;
    --dark-color: #1c1c1c;
    --light-color: #ffffff;
    --text-color: #333333;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== ANIMACIONES SUAVES ===== */
* {
    transition: var(--transition);
}

/* ===== BOTONES MEJORADOS ===== */
.btn, .contact_btn, .newsletter-btn {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.btn:hover, .contact_btn:hover, .newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn::before, .contact_btn::before, .newsletter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before, .contact_btn:hover::before, .newsletter-btn:hover::before {
    left: 100%;
}

/* ===== EFECTOS DE CARGA ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== FORMULARIOS MEJORADOS ===== */
input, textarea, select {
    border-radius: var(--border-radius);
    border: 2px solid #e0e0e0;
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(251, 176, 59, 0.1);
    background: #ffffff;
}

input.error, textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* ===== CARDS Y CONTENEDORES ===== */
.card, .service-item, .product-item {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: #ffffff;
    overflow: hidden;
}

.card:hover, .service-item:hover, .product-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ===== NAVEGACIÓN MEJORADA ===== */
.navmenu ul li a {
    position: relative;
    transition: var(--transition);
}

.navmenu ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navmenu ul li a:hover::after,
.navmenu ul li.active a::after {
    width: 100%;
}

/* ===== SLIDER MEJORADO ===== */
.flexslider .slides li {
    position: relative;
    overflow: hidden;
}

.flexslider .slides li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(28, 28, 28, 0.3), rgba(251, 176, 59, 0.1));
    z-index: 1;
}

.flexslider .flex_caption1 {
    position: relative;
    z-index: 2;
}

/* ===== EFECTOS DE SCROLL ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== INDICADORES DE PROGRESO ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.3s ease;
}

/* ===== TOOLTIPS ===== */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: var(--light-color);
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark-color);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== NOTIFICACIONES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--light-color);
    color: var(--text-color);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    border-left: 4px solid var(--primary-color);
    transform: translateX(400px);
    transition: var(--transition);
    z-index: 10000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #27ae60;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification.warning {
    border-left-color: #f39c12;
}

/* ===== BREADCRUMBS MEJORADOS ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    color: var(--primary-color);
    margin: 0 8px;
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== RESPONSIVE MEJORAS ===== */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .tooltip::after {
        left: 0;
        transform: none;
        white-space: normal;
        max-width: 200px;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MODO OSCURO ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ffffff;
        --light-color: #1a1a1a;
    }
    
    input, textarea, select {
        background: rgba(255, 255, 255, 0.1);
        color: var(--light-color);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    input:focus, textarea:focus, select:focus {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ===== EFECTOS DE PARTÍCULAS (OPCIONAL) ===== */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* ===== MEJORAS DE PERFORMANCE ===== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* ===== EFECTOS DE HOVER AVANZADOS ===== */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
}

.hover-glow {
    transition: var(--transition);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 176, 59, 0.4);
}

/* ===== INDICADORES DE ESTADO ===== */
.status-online {
    position: relative;
}

.status-online::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    border: 2px solid var(--light-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* ===== BOTÓN WHATSAPP FLOTANTE MEJORADO ===== */
.whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.whatsapp-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    text-decoration: none;
    color: white;
}

.whatsapp-floating i {
    font-size: 28px;
    transition: all 0.3s ease;
}

.whatsapp-floating .whatsapp-text {
    position: absolute;
    right: 70px;
    background: #25D366;
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-floating .whatsapp-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #25D366;
}

.whatsapp-floating:hover .whatsapp-text {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-floating:hover i {
    transform: rotate(10deg);
}

/* Animación de pulso para WhatsApp */
.whatsapp-floating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: #25D366;
    animation: whatsapp-pulse 2s infinite;
    z-index: -1;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Responsive para WhatsApp */
@media (max-width: 768px) {
    .whatsapp-floating {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-floating i {
        font-size: 24px;
    }
    
    .whatsapp-floating .whatsapp-text {
        display: none;
    }
}
