/* =========================================================
   VALUED CLIENTS ECOSYSTEM STYLESHEET (abhimo.com Style)
   All In One Technology - 500+ Corporate Client Logos
   ========================================================= */

:root {
  --client-amber: #f59e0b;
  --client-primary: #0284c7;
  --client-card-bg: #ffffff;
}

/* Division Pill Badge (Division 04: Professional Blue + Slate Glass) */
.badge-clients {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: #DBEAFE;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
  transition: all 0.3s ease;
}

.badge-clients i,
.badge-clients svg {
  color: #60A5FA;
}

/* Client Logo Card (Abhimo Crisp White Frosted Card)
   Static display only — no click/detail interaction.
   Every card is a fixed-ratio "plate" so square, wide-rectangle
   and tall-rectangle source logos all read as the same size,
   regardless of the original file's own aspect ratio. */
.client-grid-card {
  background: var(--client-card-bg);
  border: 1px solid rgba(0, 119, 255, 0.1);
  border-radius: 18px;
  padding: 0.65rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.client-grid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.1);
}

/* The tile enforces one uniform box for every logo. object-fit:
   contain means a tall/portrait logo (e.g. a narrow banner) and a
   wide landscape logo both shrink-to-fit inside the same shape
   without stretching, cropping, or leaving the grid uneven. */
.client-logo-tile {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  overflow: hidden;
  position: relative;
}

/* Shimmer placeholder shown while a lazy-loaded logo is still fetching,
   so the grid doesn't look like a wall of empty gray boxes while scrolling
   through 218 images on a slower mobile connection. Sits behind the image;
   once the image loads and turns opaque it simply covers the shimmer. */
.client-logo-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: clientShimmer 1.4s ease infinite;
}

.client-logo-tile img {
  position: relative;
  z-index: 1;
  opacity: 0;
}

.client-logo-tile img.is-loaded {
  opacity: 1;
}

@keyframes clientShimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.client-logo-tile img {
  max-width: 88%;
  max-height: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  image-rendering: auto;
  /* Forces GPU compositing for this element so the hover zoom (and the
     upscaled source images themselves) render through the browser's
     high-quality scaling path instead of a cheaper/blurrier fallback that
     can otherwise kick in on some devices during a CSS transform. */
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: filter 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
}

/* Hover polish: logos stay in full color at all times (no grayscale) on
   every device. On real mouse/trackpad devices we add a gentle lift + zoom
   for feedback; touch devices skip this since ":hover" isn't reliable there. */
@media (hover: hover) and (pointer: fine) {
  .client-grid-card:hover .client-logo-tile img {
    transform: translateZ(0) scale(1.06);
  }

  .client-grid-card:hover .client-logo-tile {
    background: #f1f5fb;
  }
}

/* Scroll-reveal: cards fade + rise into place as the grid enters view.
   --reveal-delay is set per-card from JS to create a staggered wave. */
.client-grid-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.client-grid-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keep the existing lift-on-hover working once a card has revealed */
.client-grid-card.is-visible:hover {
  transform: translateY(-3px);
}

/* Animated counter ticking upward */
#clients-count-badge {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Clear ("x") button inside the client search input - handy on mobile
   where the OS keyboard doesn't always show its own clear icon. */
.client-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: none;
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  transition: background 0.2s ease;
}

.client-search-clear:hover {
  background: #cbd5e1;
}

.client-search-clear.is-visible {
  display: flex;
}

/* Filter Pill */
.client-pill {
  transition: all 0.25s ease;
  cursor: pointer;
}

.client-pill:hover {
  transform: translateY(-2px);
}

/* Responsive Enhancements for Valued Clients */
@media (max-width: 640px) {
  .client-grid-card {
    padding: 0.5rem;
    border-radius: 14px;
  }

  .client-logo-tile {
    border-radius: 10px;
  }

  .client-pill {
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 1920px) {
  #clients-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* =========================================================
   HERO BACKGROUND VIDEO, OVERLAY & DIVISION 04 TREATMENT
   ========================================================= */
/* Division 04 Soft Overlay & Glass Content Panel Treatment */
.hero-video-section {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
      rgba(15, 23, 42, 0.55) 0%,
      rgba(15, 23, 42, 0.12) 22%,
      rgba(15, 23, 42, 0.12) 78%,
      rgba(15, 23, 42, 0.55) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Crystal clear video content panel: 60% translucent dark tint without backdrop blur for crisp video visibility */
.hero-content-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 28px;
  padding: 2.75rem 2.25rem;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .hero-video-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero-content-panel {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
  }
}

.hero-video-section .relative.z-10 {
  position: relative;
  z-index: 10;
}

/* =========================================================
   SUBTLE PROFESSIONAL ENTRANCE ANIMATIONS
   ========================================================= */
@keyframes heroFadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

.hero-video-section .badge-clients {
  animation: heroFadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-video-section h1 {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.hero-video-section .hero-text {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

.hero-video-section .inline-flex.items-center.gap-2 {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-section * {
    animation: none !important;
    transition: none !important;
  }

  .client-grid-card,
  .client-logo-tile img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .client-logo-tile::before {
    animation: none !important;
  }
}

/* Slightly shorter, snappier reveal on small screens so a long scroll
   through 218 logos doesn't feel sluggish on phones/tablets. */
@media (max-width: 767px) {
  .client-grid-card {
    transition-duration: 0.4s;
  }
}