/* Kleverish site animations — pure CSS, activated by site-animations.js.
   Content is fully visible when JavaScript is disabled: every hiding rule
   is scoped to html.anim-ready, which only JS applies. */

/* ---------- Scroll reveal primitives ---------- */
html.anim-ready [data-anim] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--anim-delay, 0ms);
  will-change: opacity, transform;
}
html.anim-ready [data-anim="left"]  { transform: translateX(-34px); }
html.anim-ready [data-anim="right"] { transform: translateX(34px); }
html.anim-ready [data-anim="zoom"]  { transform: scale(0.94); }
html.anim-ready [data-anim].anim-in {
  opacity: 1;
  transform: none;
}

/* ---------- Smooth scrolling ---------- */
html.anim-ready { scroll-behavior: smooth; }

/* ---------- Header scroll state ---------- */
html.anim-ready header nav { transition: box-shadow 0.3s ease, background-color 0.3s ease; }
html.anim-ready header nav.kv-scrolled {
  background-color: rgba(255, 255, 255, 0.99) !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14);
}

/* ---------- Hero image float ---------- */
html.anim-ready .kv-float { animation: kv-hero-float 7s ease-in-out infinite; }
@keyframes kv-hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ---------- Parallax images (JS drives --kv-par) ---------- */
html.anim-ready .kv-parallax img { transform: translateY(var(--kv-par, 0px)); transition: transform 0.1s linear; }

/* ---------- Buttons ---------- */
html.anim-ready .btn-fx { transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; }
html.anim-ready .btn-fx:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14); }
html.anim-ready .btn-fx:active { transform: translateY(0) scale(0.97); box-shadow: 0 4px 10px rgba(17, 24, 39, 0.1); transition-duration: 0.08s; }

/* ---------- Button micro-interaction (no forced colour) ---------- */
/* .btn-animate only adds hover/active motion; each button keeps its own
   Tailwind background colour (yellow primary CTAs, blue actions, red
   destructive actions, white/bordered secondary actions, etc.). */
html.anim-ready .btn-animate {
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
html.anim-ready .btn-animate:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}
html.anim-ready .btn-animate:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.1);
  transition-duration: 0.08s;
}

/* ---------- Cards ---------- */
html.anim-ready .card-fx { transition: transform 0.25s ease, box-shadow 0.25s ease; }
html.anim-ready .card-fx:hover { transform: translateY(-3px) scale(1.005); box-shadow: 0 16px 34px rgba(17, 24, 39, 0.09); }
html.anim-ready .card-fx:active { transform: translateY(-1px) scale(0.99); transition-duration: 0.08s; }

/* ---------- Pricing cards ---------- */
html.anim-ready .kv-pricing { transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease; }
html.anim-ready .kv-pricing:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 26px 52px rgba(17, 24, 39, 0.13);
  border-color: #fcd34d !important;
}

/* ---------- Icons inside hoverable elements ---------- */
html.anim-ready .card-fx svg,
html.anim-ready header nav a svg,
html.anim-ready .btn-fx svg { transition: transform 0.25s ease; }
html.anim-ready .card-fx:hover svg,
html.anim-ready header nav a:hover > svg { transform: scale(1.15) rotate(-3deg); }

/* ---------- Screenshot hover zoom ---------- */
html.anim-ready .shot-zoom { overflow: hidden; }
html.anim-ready .shot-zoom img { transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }
html.anim-ready .shot-zoom:hover img { transform: scale(1.025); }

/* ---------- Animated nav underline ---------- */
html.anim-ready .nav-underline { position: relative; }
html.anim-ready .nav-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  border-radius: 2px; background: #fcd34d;
  transform: scaleX(0); transform-origin: left center; transition: transform 0.25s ease;
}
html.anim-ready .nav-underline:hover::after,
html.anim-ready .nav-underline.text-black::after { transform: scaleX(1); }

/* ---------- Mobile menu slide ---------- */
html.anim-ready #mobile-menu:not(.hidden) { animation: kv-nav-drop 0.28s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes kv-nav-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- FAQ smooth height (driven by JS, legacy accordions) ---------- */
html.anim-ready .faq-anim { overflow: hidden; transition: max-height 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease; }

/* ---------- Tab panel transition ---------- */
html.anim-ready .kv-tab-pop { animation: kv-pop 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* ---------- CTA floating shapes ---------- */
html.anim-ready .cta-shapes { position: relative; overflow: hidden; isolation: isolate; }
html.anim-ready .cta-shapes::before,
html.anim-ready .cta-shapes::after {
  content: ""; position: absolute; border-radius: 9999px; filter: blur(46px);
  opacity: 0.16; z-index: -1; pointer-events: none;
}
html.anim-ready .cta-shapes::before {
  width: 300px; height: 300px; background: #fcd34d; top: -120px; right: -80px;
  animation: kv-float-a 9s ease-in-out infinite;
}
html.anim-ready .cta-shapes::after {
  width: 240px; height: 240px; background: #7c3aed; bottom: -110px; left: -70px;
  animation: kv-float-b 11s ease-in-out infinite;
}
@keyframes kv-float-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-26px, 22px) scale(1.08); } }
@keyframes kv-float-b { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(24px, -18px) scale(1.06); } }

/* ---------- Card pop (filters / search / load-more / tabs) ---------- */
html.anim-ready .anim-pop { animation: kv-pop 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both; animation-delay: var(--anim-delay, 0ms); }
@keyframes kv-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- TOC / scroll-spy active state ---------- */
html.anim-ready .toc-active { color: #111827 !important; font-weight: 700; transform: translateX(2px); }
html.anim-ready #doc-toc a,
html.anim-ready .sidebar-spy a { transition: color 0.2s ease, transform 0.2s ease; }

/* ---------- Lightbox ---------- */
#kv-lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.82);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  cursor: zoom-out; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s;
  backdrop-filter: blur(4px);
}
#kv-lightbox.show { opacity: 1; visibility: visible; }
#kv-lightbox img { max-width: 100%; max-height: 100%; border-radius: 0.75rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }

/* ---------- Back to top ----------
   Sits directly to the left of the WhatsApp widget button in one
   horizontal row. The WhatsApp button (injected by the Wati script, see
   #wa-widget-send-button in the CreateWhatsappChatWidget options on every
   page) is a 50x50px circle whose bottom edge sits marginBottom(50)px from
   the viewport bottom and whose right edge sits marginRight(50)px from the
   viewport right — i.e. its vertical center is 75px up from the bottom and
   its left edge is 100px in from the right. This button is centered on
   that same 75px line, with its right edge 12px further left (100 + 12)
   so there's a clean gap and no overlap. */
#kv-back-top {
  position: fixed; right: 112px; bottom: 53px; z-index: 45;
  width: 44px; height: 44px; border-radius: 9999px;
  background: #111827; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.25);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  cursor: pointer; border: none;
}
#kv-back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
#kv-back-top:hover { transform: translateY(-3px); }
#kv-back-top:active { transform: scale(0.94); }

/* ---------- Floating buttons on mobile/tablet ----------
   The WhatsApp button is injected at runtime by the Wati widget script with
   its own inline <style> (see #wa-widget-send-button, generated from the
   chatButtonSetting options on every page). That injected stylesheet loads
   asynchronously, so we can't rely on source order to win a specificity tie —
   "html body #wa-widget-send-button" is used below purely to guarantee our
   rule always wins over the widget's own same-property rules, not to add
   unnecessary weight. Goal: keep both buttons clear of the hero's CTA area
   and the device's own bottom UI (home indicator / gesture bar), which only
   shows up as extra reserved space when a page opts into edge-to-edge
   rendering — env() safely resolves to 0 otherwise, so this is a no-op on
   browsers/pages that don't need it. */
@media (max-width: 767px) {
  #kv-back-top { bottom: calc(53px + env(safe-area-inset-bottom, 0px)); }
  html body #wa-widget-send-button { bottom: calc(0px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Very small phones: tuck both buttons in from the edge and shrink them
   slightly so they read as compact controls rather than crowding the CTA
   area above them. Vertical centers stay matched and the 12px gap between
   the two buttons is preserved (see math in the base rule above). */
@media (max-width: 480px) {
  #kv-back-top {
    width: 40px; height: 40px;
    right: 72px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  html body #wa-widget-send-button {
    width: 44px !important; height: 44px !important; min-width: 44px !important;
    margin: 0 !important;
    right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body #wa-widget-send-button .wa-messenger-svg-whatsapp { width: 36px; height: 44px; }
}

/* ---------- Reduced motion: disable everything ---------- */
@media (prefers-reduced-motion: reduce) {
  html.anim-ready { scroll-behavior: auto; }
  html.anim-ready [data-anim],
  html.anim-ready .anim-pop,
  html.anim-ready .kv-tab-pop,
  html.anim-ready .btn-fx,
  html.anim-ready .btn-animate,
  html.anim-ready .card-fx,
  html.anim-ready .kv-pricing,
  html.anim-ready .kv-float,
  html.anim-ready .kv-parallax img,
  html.anim-ready .shot-zoom img,
  html.anim-ready .faq-anim,
  html.anim-ready #mobile-menu:not(.hidden),
  html.anim-ready .cta-shapes::before,
  html.anim-ready .cta-shapes::after,
  #kv-back-top {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none !important;
  }
  #kv-back-top { visibility: visible; }
}
.new-review{
 /* Compact spacing on mobile/tablet so the hero doesn't feel oversized;
    restored to the original 50px above the md breakpoint (desktop unchanged). */
 margin-bottom: 24px !important;
 margin-top: 24px !important;
}
@media (min-width: 768px) {
  .new-review{
    margin-bottom: 50px !important;
    margin-top: 50px !important;
  }
}
.new-link{
 z-index: 1000 !important;
}

/* =========================
   LOGO MARQUEE SECTION
========================= */

.logo-marquee-section {
    width: 100%;
    overflow: hidden;
    padding: 25px 0;
    position: relative;
}

.logo-marquee {
    width: 100%;
    overflow: hidden;
}

/* Moving Track */
.logo-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: logoMarquee 12s linear infinite;
    will-change: transform;
}

/* Individual Logo */
.logo-item {
    flex: 0 0 220px;
    height: 100px;
    margin: 0 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo Image */
.logo-item img {
    max-width: 160px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}


/* =========================
   INFINITE ANIMATION
========================= */

@keyframes logoMarquee {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-10%);
    }

}


/* =========================
   OPTIONAL:
   HOVER KARNE PAR PAUSE
========================= */

.logo-marquee:hover .logo-track {
    animation-play-state: paused;
}


/* =========================
   TABLET RESPONSIVE
========================= */

@media (max-width: 1024px) {

    .logo-marquee-section {
        padding: 20px 0;
    }

    .logo-track {
        animation-duration: 22s;
    }

    .logo-item {
        flex: 0 0 180px;
        height: 90px;
        margin: 0 15px;
    }

    .logo-item img {
        max-width: 140px;
        max-height: 60px;
    }

}


/* =========================
   MOBILE RESPONSIVE
========================= */

@media (max-width: 768px) {

    .logo-marquee-section {
        padding: 15px 0;
    }

    .logo-track {
        animation-duration: 18s;
    }

    .logo-item {
        flex: 0 0 140px;
        height: 70px;
        margin: 0 10px;
    }

    .logo-item img {
        max-width: 110px;
        max-height: 50px;
    }

}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .logo-track {
        animation-duration: 15s;
    }

    .logo-item {
        flex: 0 0 120px;
        height: 60px;
        margin: 0 8px;
    }

    .logo-item img {
        max-width: 95px;
        max-height: 45px;
    }

}