/* ================================================
   MICRO-INTERACTIONS & VISUAL ENHANCEMENTS
   ================================================ */

/* Smooth transitions for all interactive elements */
a, button, input, textarea, select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BUTTON ENHANCEMENTS ===== */

/* Primary CTA Button */
.cta-button {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:active {
    transform: scale(0.98);
}

/* Submit Button Loading State */
button[type="submit"]:disabled {
    cursor: not-allowed;
    position: relative;
}

button[type="submit"]:disabled::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ===== CARD HOVER EFFECTS ===== */

.industry-card,
.product-card,
.contact-card {
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on hover (desktop only) */
@media (min-width: 769px) {
    .industry-card::after,
    .product-card::after,
    .contact-card::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(
            45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%
        );
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        transition: transform 0.6s;
    }

    .industry-card:hover::after,
    .product-card:hover::after,
    .contact-card:hover::after {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ===== LINK HOVER EFFECTS ===== */

/* Smooth underline animation */
.footer-section a,
.nav-links a {
    position: relative;
}

/* ===== ICON ANIMATIONS ===== */

.icon-container,
.product-icon-container,
.contact-icon {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Pulse animation on page load */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.icon-container.animate-in,
.product-icon-container.animate-in {
    animation: pulse 0.6s ease-out 0.3s;
}

/* ===== FORM INPUT ENHANCEMENTS ===== */

.form-control,
input[type="text"],
input[type="email"],
textarea {
    transition: all 0.3s ease;
}

.form-control:focus,
input:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Floating label effect (optional) */
.form-group {
    position: relative;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-25px) scale(0.9);
    color: var(--secondary);
}

/* ===== SOCIAL ICON ANIMATIONS ===== */

.social-icons a {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-icons a:hover {
    transform: translateY(-5px) rotate(5deg);
}

.social-icons a:active {
    transform: translateY(-2px) rotate(2deg);
}

/* ===== BACK TO TOP BUTTON ===== */

#back-to-top {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#back-to-top:hover {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1.1); }
    50% { transform: translateY(-10px) scale(1.15); }
}

/* ===== WHATSAPP BUTTON ===== */

.whatsapp-float {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: float-pulse 3s ease-in-out infinite;
}

@keyframes float-pulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-float:hover {
    animation: none;
}

/* ===== LOGO ANIMATION ===== */

.logo-img {
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05) rotate(2deg);
}

/* ===== CLIENT CAROUSEL ===== */

.carousel-item {
    transition: all 0.3s ease;
}

.carousel-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* ===== SECTION TITLE UNDERLINE ANIMATION ===== */

.section-title::after {
    transition: all 0.4s ease;
}

.section-title:hover::after {
    width: 100px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
}

/* ===== IMAGE HOVER EFFECTS ===== */

.card-gallery img {
    transition: all 0.4s ease;
}

.card-gallery img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ===== SMOOTH SCROLL INDICATOR ===== */

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    opacity: 0.8;
    animation: scroll-bounce 2s infinite;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: scroll-dot 2s infinite;
}

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

@keyframes scroll-dot {
    0% { opacity: 1; top: 10px; }
    100% { opacity: 0; top: 30px; }
}

/* ===== LOADING SKELETON ===== */

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== RIPPLE EFFECT ===== */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 200px;
    height: 200px;
}

/* ===== DISABLE ANIMATIONS ON MOBILE IF PREFERRED ===== */

@media (max-width: 768px) {
    /* Simplify animations on mobile for performance */
    .industry-card::after,
    .product-card::after,
    .contact-card::after {
        display: none;
    }

    /* Keep essential animations only */
    .cta-button:hover::before {
        display: none;
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */

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