/*==========================================================
ANIMATIONS.CSS
==========================================================*/
/*==========================================================
VARIABLES DE ANIMACIÓN
==========================================================*/
:root {
    --animation-fast: .25s;
    --animation-normal: .5s;
    --animation-slow: .8s;
    --animation-ease: ease;
}

/*==========================================================
TRANSICIONES GENERALES
==========================================================*/
a,
button,
.btn,
img,
.service-card,
.why-card,
.coverage-card,
.gallery-img,
.contact-card,
.stat-box,
.nav-link,
.testimonial-card {
    transition:
        transform var(--animation-normal) var(--animation-ease),
        box-shadow var(--animation-normal) var(--animation-ease),
        color var(--animation-normal) var(--animation-ease),
        background-color var(--animation-normal) var(--animation-ease);
}

/*==========================================================
BOTONES
==========================================================*/
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background:
        rgba(255, 255, 255, .22);
    transform: skewX(-25deg);
    transition: .6s;
}

.btn:hover::before {
    left: 120%;
}

.btn:hover {
    transform: translateY(-3px);
}

/*==========================================================
WHATSAPP PULSE
==========================================================*/
@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(37, 211, 102, .45);
    }

    70% {
        box-shadow:
            0 0 0 12px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-whatsapp {
    animation:
        whatsappPulse 2.5s infinite;
}

/*==========================================================
EFECTO ZOOM IMÁGENES
==========================================================*/
.service-card img,
.gallery-img,
.about-section img {
    transition:
        transform .6s ease,
        filter .6s ease;
}

.service-card:hover img,
.gallery-img:hover,
.about-section img:hover {
    transform: scale(1.04);
    filter: brightness(1.05);
}

/*==========================================================
CARDS GENERALES
==========================================================*/
.service-card,
.why-card,
.coverage-card,
.stat-box,
.contact-card,
.testimonial-card {
    transition:
        transform var(--animation-normal) ease,
        box-shadow var(--animation-normal) ease;
}

.service-card:hover,
.why-card:hover,
.stat-box:hover,
.testimonial-card:hover {
    transform: translateY(-8px);
}

.coverage-card:hover,
.contact-card:hover {
    transform: translateX(8px);
}

/*==========================================================
ICONO SERVICIOS
==========================================================*/
.service-icon {
    transition:
        transform var(--animation-normal) ease;
}

.service-card:hover .service-icon {
    transform:
        rotate(8deg) scale(1.1);
}

/*==========================================================
ABOUT ITEMS
==========================================================*/
.about-item {
    transition:
        transform var(--animation-normal) ease,
        box-shadow var(--animation-normal) ease,
        background-color var(--animation-normal) ease;
}

.about-item:hover {
    transform:
        translateY(-5px);
    background:
        #fff;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, .10);
}

/*==========================================================
WHY CARDS
==========================================================*/
.why-card:hover {
    background: var(--primary);
}

.why-card i {
    transition:
        transform var(--animation-slow) ease;
}

.why-card:hover i {
    transform:
        rotate(360deg);
}

/*==========================================================
ESTADÍSTICAS
==========================================================*/
.stat-box h2 {
    transition:
        transform var(--animation-normal) ease;
}

.stat-box:hover h2 {
    transform:
        scale(1.05);
}

/*==========================================================
COBERTURA
==========================================================*/
.coverage-card i {
    transition:
        transform var(--animation-normal) ease;
}

.coverage-card:hover i {
    transform:
        scale(1.15);
}

/*==========================================================
TIMELINE
==========================================================*/
.timeline-number {
    transition:
        transform var(--animation-normal) ease,
        background-color var(--animation-normal) ease,
        color var(--animation-normal) ease;
}

.timeline-item:hover .timeline-number {
    transform:
        scale(1.15);
    background:
        var(--secondary);
    color:
        #111;
}

/*==========================================================
TESTIMONIOS
==========================================================*/
.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 18px 35px rgba(0, 0, 0, .25);
}

/*==========================================================
FORMULARIOS
==========================================================*/
.form-control {
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.form-control:focus {
    transform:
        scale(1.01);
}

/*==========================================================
NAVBAR LINKS
==========================================================*/
.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background:
        var(--secondary);
    border-radius: 5px;
    transition:
        width .3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/*==========================================================
SCROLL DOWN
==========================================================*/
@keyframes scrollMouse {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(8px);
        opacity: .5;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.scroll-down {
    animation:
        scrollMouse 1.5s infinite;
}

/*==========================================================
FADE UP
==========================================================*/
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation:
        fadeUp .8s ease forwards;
}

/*==========================================================
FADE LEFT
==========================================================*/
@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-left {
    animation:
        fadeLeft .8s ease forwards;
}

/*==========================================================
FADE RIGHT
==========================================================*/
@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-right {
    animation:
        fadeRight .8s ease forwards;
}

/*==========================================================
ZOOM IN
==========================================================*/
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    animation:
        zoomIn .7s ease;
}

/*==========================================================
SHAKE EFFECT
==========================================================*/
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(3px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake:hover {
    animation:
        shake .4s;
}

/*==========================================================
GLASS EFFECT
==========================================================*/
.glass {
    backdrop-filter:
        blur(15px);
    border:
        1px solid rgba(255, 255, 255, .18);
}

/*==========================================================
LOADER
==========================================================*/
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader {
    animation:
        spin .8s linear infinite;
}

/*==========================================================
BOTÓN VOLVER ARRIBA
==========================================================*/
#btnTop {
    transition:
        transform var(--animation-speed) ease,
        background-color var(--animation-speed) ease,
        color var(--animation-speed) ease;
}

#btnTop:hover {
    transform:
        translateY(-5px);
    background:
        var(--primary);
    color:
        #fff;
}

/*==========================================================
ICONOS SOCIALES
==========================================================*/
.social-icon {
    transition:
        transform var(--animation-speed) ease,
        background-color var(--animation-speed) ease,
        color var(--animation-speed) ease;
}

.social-icon:hover {
    transform:
        translateY(-5px) rotate(360deg);
    background:
        var(--secondary);
    color:
        #111;
}

/*==========================================================
RESPETO MOVIMIENTO REDUCIDO
Accesibilidad:
usuarios que prefieren menos animaciones
==========================================================*/
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/*==========================================================
   ERROR 404 ANIMATIONS
==========================================================*/
/* CONTENIDO PRINCIPAL */
.error-content {
    animation: errorFadeUp .8s ease forwards;
}

/* LOGO */
.error-logo {
    animation: errorFadeDown .8s ease forwards;
}

/* BOTONES */
.error-content .buttons {
    animation: errorFadeUp 1s ease .2s forwards;
}

/*==========================================================
   KEYFRAMES
==========================================================*/
@keyframes errorFadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes errorFadeDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}