:root {
  --anim-primary: var(--primary-color, #00a652);
  --anim-secondary: var(--secondary-color, #01adee);
  --anim-dark: #0f172a;
  --anim-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  --anim-shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.14);
  --anim-radius: 18px;
  --anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================
   KEYFRAMES
========================= */

@keyframes riseFade {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.96);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, -4px, 0) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes numberGlow {
  0% {
    text-shadow: 0 0 0 rgba(1, 173, 238, 0);
  }
  50% {
    text-shadow: 0 0 18px rgba(1, 173, 238, 0.16);
  }
  100% {
    text-shadow: 0 0 0 rgba(1, 173, 238, 0);
  }
}

@keyframes floatSoft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes carouselScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes shineSweep {
  0% {
    transform: translateX(-130%) skewX(-20deg);
    opacity: 0;
  }
  30% {
    opacity: 0.35;
  }
  100% {
    transform: translateX(180%) skewX(-20deg);
    opacity: 0;
  }
}

/* =========================
   GENERIC REVEAL
========================= */

.fade-in,
.reveal-up {
  opacity: 0;
  transform: translateY(18px);
  transition:
          opacity 0.75s ease,
          transform 0.75s var(--anim-ease),
          filter 0.75s ease;
  filter: blur(6px);
  will-change: transform, opacity, filter;
}

.fade-in.visible,
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* =========================
   COUNT ANIMATION
========================= */

.count-animate {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.96);
  filter: blur(8px);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

.count-animate.visible {
  animation:
          riseFade 0.95s var(--anim-ease) forwards,
          numberGlow 1.1s ease-out 0.15s 1;
}

/* Tạo style số nổi bật hơn */
.stat-item h4.count-animate {
  background: linear-gradient(135deg, var(--anim-primary), var(--anim-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.4px;
}

/* =========================
   STATS CARD BEAUTIFY
========================= */

.stats {
  display: flex;
  gap: 18px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat-item {
  position: relative;
  flex: 1 1 180px;
  min-width: 180px;
  padding: 24px 18px;
  border-radius: var(--anim-radius);
  background:
          linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--anim-shadow);
  overflow: hidden;
  transition:
          transform 0.35s var(--anim-ease),
          box-shadow 0.35s ease,
          border-color 0.35s ease;
  text-align: center;
}

.stat-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
          radial-gradient(circle at top right, rgba(1, 173, 238, 0.10), transparent 40%),
          radial-gradient(circle at bottom left, rgba(0, 166, 82, 0.10), transparent 38%);
  pointer-events: none;
}

.stat-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(
          90deg,
          transparent,
          rgba(255,255,255,0.55),
          transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
}

.stat-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--anim-shadow-hover);
  border-color: rgba(1, 173, 238, 0.18);
}

.stat-item:hover::after {
  animation: shineSweep 0.9s ease;
  opacity: 1;
}

.stat-item h4 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 36px;
  font-weight: 700;
}

.stat-item p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

/* =========================
   HOVER CARD EFFECT
========================= */

.hover-effect {
  position: relative;
  overflow: hidden;
  transition:
          transform 0.4s var(--anim-ease),
          box-shadow 0.4s ease,
          border-color 0.4s ease;
}

.hover-effect::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
          linear-gradient(135deg, rgba(0,166,82,0.10), rgba(1,173,238,0.10));
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 0;
}

.hover-effect > * {
  position: relative;
  z-index: 1;
}

.hover-effect:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.10);
}

.hover-effect:hover::before {
  opacity: 1;
}

/* =========================
   CLIENTES CAROUSEL
========================= */

.clientes {
  padding: 0;
  background: linear-gradient(180deg, #f8f9fa, #f3f6f9);
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  min-height: 130px;
  overflow: hidden;
}

.carousel-mask-left,
.carousel-mask-right {
  position: absolute;
  top: 0;
  width: 14%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.carousel-mask-left {
  left: 0;
  background: linear-gradient(
          90deg,
          rgba(248, 249, 250, 1) 0%,
          rgba(248, 249, 250, 0) 100%
  );
}

.carousel-mask-right {
  right: 0;
  background: linear-gradient(
          90deg,
          rgba(248, 249, 250, 0) 0%,
          rgba(248, 249, 250, 1) 100%
  );
}

.clientes-carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.clientes-slider {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 14px 18px;
  will-change: transform;
  animation: carouselScroll 34s linear infinite;
}

.clientes-carousel:hover .clientes-slider {
  animation-play-state: paused;
}

.cliente-logo {
  position: relative;
  width: 185px;
  height: 100px;
  flex: 0 0 auto;
  margin: 0 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(6px);
  transition:
          transform 0.35s var(--anim-ease),
          box-shadow 0.35s ease,
          border-color 0.35s ease,
          background 0.35s ease;
}

.cliente-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
          linear-gradient(135deg, rgba(0,166,82,0.06), rgba(1,173,238,0.06));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cliente-logo img {
  position: relative;
  z-index: 1;
  max-width: 90%;
  max-height: 70px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.70;
  transition:
          transform 0.35s ease,
          filter 0.35s ease,
          opacity 0.35s ease;
}

.cliente-logo:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
  border-color: rgba(1, 173, 238, 0.12);
  background: rgba(255,255,255,1);
}

.cliente-logo:hover::before {
  opacity: 1;
}

.cliente-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* =========================
   OPTIONAL FLOATING IMAGE
========================= */

.hero-image img,
.vantagens-image img,
.sobre-image img {
  transition:
          transform 0.45s var(--anim-ease),
          box-shadow 0.45s ease;
}

.hero-image:hover img,
.vantagens-image:hover img,
.sobre-image:hover img {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

/* =========================
   AOS SMOOTHING
========================= */

[data-aos] {
  will-change: transform, opacity;
}

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

@media (max-width: 992px) {
  .stat-item {
    min-width: calc(50% - 10px);
  }

  .cliente-logo {
    width: 165px;
    height: 92px;
    margin: 0 12px;
  }

  .clientes-slider {
    animation-duration: 28s;
  }
}

@media (max-width: 768px) {
  .stats {
    gap: 14px;
  }

  .stat-item {
    flex: 1 1 100%;
    min-width: 100%;
    padding: 20px 16px;
  }

  .stat-item h4 {
    font-size: 30px;
  }

  .cliente-logo {
    width: 145px;
    height: 82px;
    padding: 12px;
    margin: 0 10px;
    border-radius: 14px;
  }

  .cliente-logo img {
    max-height: 54px;
  }

  .carousel-container {
    min-height: 110px;
  }

  .clientes-slider {
    animation-duration: 24s;
  }
}

@media (max-width: 480px) {
  .stat-item h4 {
    font-size: 28px;
  }

  .stat-item p {
    font-size: 13px;
  }

  .cliente-logo {
    width: 128px;
    height: 76px;
    margin: 0 8px;
  }

  .carousel-mask-left,
  .carousel-mask-right {
    width: 10%;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .count-animate,
  .fade-in,
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .clientes-slider {
    animation: none !important;
  }
}