/* =========================================================
   SITE-WIDE EFFECTS (works with assets/js/effects.js)
   To undo: remove the effects.css <link> in header.php and the
   effects.js <script> in footer.php.
========================================================= */

/* ---------- Scroll progress bar ---------- */
.fx-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(var(--fx-progress, 0));
    transform-origin: left center;
    background: linear-gradient(90deg, #0052FF, #1D4ED8, #00D2FF);
    box-shadow: 0 0 10px rgba(0, 82, 255, 0.5);
    z-index: 2000;
    pointer-events: none;
}

/* ---------- Navbar gets compact & glassy on scroll ---------- */
.navbar {
    transition: padding 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.navbar.fx-scrolled {
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

/* Nav links: gradient underline grows on hover */
@media (min-width: 992px) {
    .navbar-nav > .nav-item > .nav-link {
        position: relative;
    }

    .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle)::after {
        content: '';
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 2px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, #0052FF, #00D2FF);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 0.3s ease;
    }

    .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle):hover::after {
        transform: scaleX(1);
    }
}

/* ---------- Back-to-top button with progress ring ---------- */
.fx-top {
    position: fixed;
    right: 26px;
    bottom: 100px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: conic-gradient(#0052FF calc(var(--fx-progress, 0) * 360deg), rgba(0, 82, 255, 0.15) 0);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 82, 255, 0.3);
}

.fx-top::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--gradient-primary);
}

.fx-top i {
    position: relative;
    color: #FFFFFF;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.fx-top.fx-show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.fx-top:hover i {
    transform: translateY(-3px);
}

@media (max-width: 575.98px) {
    .fx-top {
        right: 16px;
        bottom: 90px;
        width: 42px;
        height: 42px;
    }
}

/* ---------- Mouse-follow glow on cards ---------- */
.fx-spot {
    position: relative;
    overflow: hidden;
}

.fx-spot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(110, 180, 255, 0.22), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 3;
}

.fx-spot:hover::after {
    opacity: 1;
}

/* ---------- Click ripple on buttons ---------- */
.btn {
    position: relative;
    overflow: hidden;
}

.fx-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: fxRipple 0.65s ease-out forwards;
    pointer-events: none;
}

@keyframes fxRipple {
    to { transform: scale(2.6); opacity: 0; }
}

/* ---------- Shimmering gradient headings (all pages) ---------- */
.gradient-text {
    background: linear-gradient(90deg, #0052FF 0%, #00D2FF 50%, #0052FF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fxShimmer 6s linear infinite;
}

@keyframes fxShimmer {
    to { background-position: -200% center; }
}

/* ---------- Section eyebrow labels get a small gradient dash ---------- */
section .text-uppercase.small.fw-bold[style*="letter-spacing"]:not(.rounded-pill):not(.badge)::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 2px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 2px;
    background: linear-gradient(90deg, #0052FF, #00D2FF);
}

/* ---------- Icon boxes bounce on card hover ---------- */
.service-row-item:hover .service-icon-box,
.why-box-card:hover .service-icon-box {
    animation: fxBounce 0.6s ease;
}

@keyframes fxBounce {
    0%   { transform: scale(1) rotate(0); }
    40%  { transform: scale(1.18) rotate(-8deg); }
    70%  { transform: scale(0.95) rotate(4deg); }
    100% { transform: scale(1.1) rotate(-6deg); }
}

/* ---------- Images lift slightly on hover ---------- */
.img-rounded-custom {
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.img-rounded-custom:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 82, 255, 0.18);
}

/* ---------- Proof / stats bar numbers glow ---------- */
.proof-bar-section h3 {
    text-shadow: 0 0 24px rgba(0, 210, 255, 0.45);
}

/* ---------- CTA banner: slow moving shine ---------- */
.cta-banner {
    position: relative;
    overflow: hidden;
    background-size: 200% 200% !important;
    animation: fxCtaFlow 10s ease-in-out infinite;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -30%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: rotate(20deg);
    animation: fxCtaShine 6s ease-in-out infinite;
    pointer-events: none;
}

.cta-banner > * {
    position: relative;
    z-index: 1;
}

@keyframes fxCtaFlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes fxCtaShine {
    0%   { left: -60%; }
    60%  { left: 130%; }
    100% { left: 130%; }
}

/* ---------- Accordion: smooth hover tint ---------- */
.accordion-button.collapsed:hover {
    background-color: var(--bg-blue-subtle);
    color: var(--brand-blue);
}

/* ---------- Footer social icons pop ---------- */
.social-btn:hover {
    transform: translateY(-4px) rotate(-6deg);
    box-shadow: 0 10px 20px rgba(0, 82, 255, 0.35);
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .gradient-text,
    .cta-banner,
    .cta-banner::before,
    .service-row-item:hover .service-icon-box,
    .why-box-card:hover .service-icon-box {
        animation: none !important;
    }

    .fx-ripple {
        display: none;
    }
}
