/* =========================================
   GLOBAL ANIMATION SETTINGS
========================================= */

:root {
    --transition-fast: 0.25s ease;
    --transition-normal: 0.4s ease;
    --transition-slow: 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================
   HERO BACKGROUND ANIMATION
========================================= */

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

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(10px);
    z-index: 0;
}

.hero::before {
    width: 420px;
    height: 420px;
    top: -170px;
    left: -130px;
    background: rgba(13, 110, 253, 0.1);
    animation: heroBlobOne 10s ease-in-out infinite alternate;
}

.hero::after {
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -140px;
    background: rgba(0, 184, 148, 0.1);
    animation: heroBlobTwo 12s ease-in-out infinite alternate;
}

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

@keyframes heroBlobOne {

    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(70px, 45px, 0) scale(1.15);
    }
}

@keyframes heroBlobTwo {

    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-70px, -35px, 0) scale(1.12);
    }
}


/* =========================================
   HERO CONTENT ENTRANCE
========================================= */

.hero-tag {
    animation: fadeUp 0.7s ease both;
}

.hero-content h1 {
    animation: fadeUp 0.8s 0.1s ease both;
}

.hero-content > p {
    animation: fadeUp 0.8s 0.2s ease both;
}

.hero-buttons {
    animation: fadeUp 0.8s 0.3s ease both;
}

.hero-features {
    animation: fadeUp 0.8s 0.4s ease both;
}

.hero-image {
    animation: fadeInRight 1s 0.2s ease both;
}

@keyframes fadeUp {

    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {

    from {
        opacity: 0;
        transform: translateX(50px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}


/* =========================================
   FLOATING HERO CARDS
========================================= */

.floating-card {
    animation: floatingCard 4s ease-in-out infinite;
    will-change: transform;
}

.card-two {
    animation-delay: 0.8s;
}

.card-three {
    animation-delay: 1.6s;
}

@keyframes floatingCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}


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

.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    z-index: -1;
    transform: skewX(-25deg);
    background: rgba(255, 255, 255, 0.22);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 140%;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
}


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

.trust-card,
.service-card,
.why-card,
.process-card,
.gallery-card,
.stat-card,
.pricing-card,
.testimonial-card,
.team-card,
.info-card,
.faq-item {
    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal),
        border-color var(--transition-normal);
}

.trust-card:hover,
.why-card:hover,
.process-card:hover,
.stat-card:hover,
.info-card:hover {
    transform: translateY(-9px);
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.12);
}

.service-card:hover,
.gallery-card:hover,
.pricing-card:hover,
.testimonial-card:hover,
.team-card:hover {
    transform: translateY(-12px);
}


/* =========================================
   SERVICE ICON ANIMATION
========================================= */

.service-icon,
.why-icon,
.process-icon,
.info-card i {
    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal);
}

.service-card:hover .service-icon,
.why-card:hover .why-icon,
.process-card:hover .process-icon,
.info-card:hover i {
    transform: rotateY(360deg) scale(1.08);
}


/* =========================================
   IMAGE ZOOM EFFECT
========================================= */

.hero-image,
.about-image,
.why-image,
.service-image,
.gallery-card,
.team-image {
    overflow: hidden;
}

.hero-image img,
.about-image img,
.why-image img,
.service-card img,
.gallery-card img,
.team-image img {
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-image:hover img,
.about-image:hover img,
.why-image:hover img,
.service-card:hover img,
.gallery-card:hover img {
    transform: scale(1.07);
}

.team-card:hover .team-image img {
    transform: scale(1.06) rotate(2deg);
}


/* =========================================
   SECTION TAG PULSE
========================================= */

.section-tag {
    position: relative;
}

.section-tag::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    border: 1px solid rgba(13, 110, 253, 0.25);
    animation: tagPulse 2.4s ease-out infinite;
}

@keyframes tagPulse {

    0% {
        opacity: 0.7;
        transform: scale(0.9);
    }

    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}


/* =========================================
   STATISTICS GLOW
========================================= */

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 250%;
    top: -75%;
    left: -170%;
    transform: rotate(25deg);
    background: rgba(255, 255, 255, 0.14);
    transition: left 0.8s ease;
}

.stat-card:hover::before {
    left: 160%;
}


/* =========================================
   FAQ ICON ANIMATION
========================================= */

.faq-question span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    transition:
        transform 0.35s ease,
        color 0.35s ease,
        background 0.35s ease;
}

.faq-item.active .faq-question span {
    transform: rotate(45deg);
    color: #ffffff;
    background: var(--primary);
}

.faq-item.active {
    border-color: rgba(13, 110, 253, 0.25);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
}


/* =========================================
   NAVIGATION LINK ANIMATION
========================================= */

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 0;
    height: 2px;
    border-radius: 20px;
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary)
    );
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}


/* =========================================
   SOCIAL ICON ANIMATION
========================================= */

.team-social a,
.footer-social a {
    position: relative;
    overflow: hidden;
}

.team-social a::before,
.footer-social a::before {
    content: "";
    position: absolute;
    inset: 50%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition:
        inset 0.35s ease,
        opacity 0.35s ease;
    opacity: 0;
}

.team-social a:hover::before,
.footer-social a:hover::before {
    inset: 0;
    opacity: 1;
}

.team-social a i,
.footer-social a i {
    position: relative;
    z-index: 2;
}


/* =========================================
   FORM INPUT ANIMATION
========================================= */

.contact-form input,
.contact-form select,
.contact-form textarea {
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    transform: translateY(-2px);
}


/* =========================================
   BACK TO TOP PULSE
========================================= */

#backToTop.show {
    animation: backToTopPulse 2.5s infinite;
}

@keyframes backToTopPulse {

    0%,
    100% {
        box-shadow: 0 12px 30px rgba(13, 110, 253, 0.28);
    }

    50% {
        box-shadow: 0 12px 38px rgba(13, 110, 253, 0.48);
    }
}


/* =========================================
   LOADER
========================================= */

#loader {
    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

.loader-spinner {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 5px solid rgba(13, 110, 253, 0.15);
    border-top-color: var(--primary);
    animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {

    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}