/* ===================================
   MICRO-INTERACTIONS & ANIMATIONS - 2025
   Enhanced UX with Subtle Animations
   =================================== */

/* ===== BUTTON ANIMATIONS ===== */

/* Primary Button */
.btn-corporate-primary,
.btn-primary {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shine Effect */
.btn-corporate-primary::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-corporate-primary:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

/* Hover Effects */
.btn-corporate-primary:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.4);
}

.btn-corporate-primary:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(255, 107, 53, 0.3);
}

/* Secondary Button */
.btn-corporate-secondary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-corporate-secondary:hover::after,
.btn-secondary:hover::after {
    width: 300px;
    height: 300px;
}

/* Icon Buttons */
.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

.btn:hover .fa-arrow-right {
    transform: translateX(5px);
}

.btn:hover .fa-arrow-up {
    transform: translateY(-3px);
}

.btn:hover .fa-arrow-down {
    transform: translateY(3px);
}

/* Pulse Effect for CTA Buttons */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(255, 107, 53, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* ===== CARD ANIMATIONS ===== */

/* Card Hover */
.corporate-card,
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.corporate-card:hover,
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Card Icon Animation */
.corporate-card-icon {
    transition: all 0.3s ease;
    position: relative;
}

.corporate-card:hover .corporate-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.corporate-card-icon i {
    transition: all 0.3s ease;
}

.corporate-card:hover .corporate-card-icon i {
    animation: iconBounce 0.6s ease;
}

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

/* Card Content Reveal */
.corporate-card-content {
    transition: all 0.3s ease;
}

.corporate-card:hover .corporate-card-content {
    transform: translateY(-5px);
}

/* ===== PROJECT CARD ANIMATIONS ===== */

.corporate-project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.corporate-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 78, 137, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.corporate-project-card:hover::before {
    opacity: 1;
}

.corporate-project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Project Image Zoom */
.corporate-project-image {
    overflow: hidden;
    position: relative;
}

.corporate-project-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.corporate-project-card:hover .corporate-project-image img {
    transform: scale(1.1);
}

/* Project Category Badge */
.corporate-project-category {
    transition: all 0.3s ease;
}

.corporate-project-card:hover .corporate-project-category {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

/* Project Link Arrow */
.corporate-project-link i {
    transition: transform 0.3s ease;
}

.corporate-project-card:hover .corporate-project-link i {
    transform: translateX(5px);
}

/* ===== STAT COUNTER ANIMATION ===== */

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

.corporate-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.corporate-stat-number {
    transition: all 0.3s ease;
}

.corporate-stat-item:hover .corporate-stat-number {
    transform: scale(1.1);
    color: var(--primary);
}

/* Counter Animation */
@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-animate {
    animation: countUp 0.6s ease-out;
}

/* ===== FORM INTERACTIONS ===== */

/* Input Focus */
.form-control,
.form-select {
    transition: all 0.3s ease;
    position: relative;
}

.form-control:focus,
.form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

/* Input Group Icon */
.input-group-text {
    transition: all 0.3s ease;
}

.form-control:focus + .input-group-text,
.form-control:focus ~ .input-group .input-group-text {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== LINK ANIMATIONS ===== */

/* Underline Effect */
.link-underline {
    position: relative;
    text-decoration: none;
}

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

.link-underline:hover::after {
    width: 100%;
}

/* ===== FLOATING ACTION BUTTONS ===== */

/* WhatsApp Button */
.whatsapp-float {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: floatPulse 3s ease-in-out infinite;
}

@keyframes floatPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

.whatsapp-float:hover {
    animation: none;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
}

/* Quote Float Button */
.quote-float {
    transition: all 0.3s ease;
}

.quote-float:hover {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 15px 40px rgba(0, 78, 137, 0.5);
}

/* Scroll to Top */
.scroll-top-float {
    transition: all 0.3s ease;
}

.scroll-top-float:hover {
    transform: translateY(-3px) scale(1.1);
}

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

/* Zoom Effect */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s ease;
}

.img-zoom:hover img {
    transform: scale(1.15);
}

/* Grayscale to Color */
.img-grayscale img {
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

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

/* ===== TESTIMONIAL CARD ===== */

.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Star Rating Animation */
.rating-stars i {
    transition: all 0.2s ease;
    display: inline-block;
}

.rating-stars:hover i {
    transform: scale(1.2);
}

.rating-stars i:hover ~ i {
    transform: scale(1.1);
}

/* ===== BADGE ANIMATIONS ===== */

.badge {
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* ===== LOADING ANIMATIONS ===== */

/* Spinner */
.spinner-grow {
    animation: spinner-grow 1s ease-in-out infinite;
}

@keyframes spinner-grow {
    0%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Skeleton Loading */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */

.reveal-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal-fade.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ===== 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: 400px;
    height: 400px;
    transition: width 0s, height 0s;
}

/* ===== MOBILE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
    /* Reduce animation intensity on mobile */
    .corporate-card:hover,
    .card:hover {
        transform: translateY(-4px);
    }
    
    .corporate-project-card:hover {
        transform: translateY(-5px) scale(1);
    }
    
    /* Disable some heavy animations on mobile */
    .btn-corporate-primary::before,
    .btn-primary::before {
        display: none;
    }
}

/* ===== ACCESSIBILITY ===== */

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .corporate-card:hover,
    .card:hover {
        outline: 3px solid currentColor;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    transition: outline 0.2s ease;
}
