/* projects.css - ERPNext Support Projects Showcase */

.projects-hero {
  padding: 4.5rem 1.5rem 2.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  position: relative;
}

.projects-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 9999px;
  color: var(--primary, #3b82f6);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.projects-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.projects-subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 750px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.stat-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #60a5fa;
  margin-bottom: 0.35rem;
  display: block;
}

.stat-label {
  font-size: 0.95rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Partner Logos Grid */
.logos-section {
  max-width: 1280px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}

.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.client-logo-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  backdrop-filter: blur(6px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.client-logo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.client-logo-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5), 0 0 16px rgba(59, 130, 246, 0.2);
}

.client-logo-card:hover::before {
  opacity: 1;
}

.client-logo-img {
  max-width: 130px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.25s ease;
  z-index: 1;
}

.client-logo-card:hover .client-logo-img {
  transform: scale(1.08);
}

/* ── Logo band ──────────────────────────────────────────────
   Two endless rows moving in opposite directions. The track holds the logo
   set twice; spacing is margin (not `gap`) so translating exactly -50% lands
   on the duplicate and the loop has no visible seam. */
.logo-band {
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 0 0.5rem;
  display: grid;
  gap: 1.25rem;
  /* Fade the ends so logos dissolve instead of popping at the edge. */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 7%,
    #000 93%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.logo-band-row {
  overflow: hidden;
}

.logo-band-track {
  display: flex;
  width: max-content;
  animation: logo-band-scroll 58s linear infinite;
  will-change: transform;
}

.logo-band-row--reverse .logo-band-track {
  animation-direction: reverse;
  animation-duration: 74s;
}

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

.logo-band-item {
  /* margin, not gap — see the note above about the seamless -50% loop */
  margin-inline-end: 1.25rem;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 168px;
  height: 96px;
  padding: 0.75rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.875rem;
}

.logo-band-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.logo-band-item:hover img {
  opacity: 1;
}

@keyframes logo-band-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Keep the band readable for anyone who asked for less motion: the logos
   stay, they just scroll a lot slower instead of being removed. */
@media (prefers-reduced-motion: reduce) {
  .logo-band-track {
    animation-duration: 240s;
  }

  .logo-band-row--reverse .logo-band-track {
    animation-duration: 300s;
  }
}

@media (max-width: 640px) {
  .logo-band-item {
    width: 132px;
    height: 78px;
  }
}

/* Call to Action Banner */
.cta-banner {
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 1.5rem;
  text-align: center;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-btn-whatsapp {
  background: #25D366;
  color: #ffffff;
}

.cta-btn-whatsapp:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.3);
}

.cta-btn-telegram {
  background: #0088cc;
  color: #ffffff;
}

.cta-btn-telegram:hover {
  background: #0077b5;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 136, 204, 0.3);
}

/* ---------------------------------------------------------------------------
   Arab-market brand wall
   A dense grid of copyright-free company logos. The tiles are deliberately
   smaller and flatter than the client band so a few hundred of them read as
   a texture of the market rather than as individual endorsements.
   --------------------------------------------------------------------------- */
.brand-wall-section {
  max-width: 1400px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

.brand-wall-head {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
}

.brand-wall-head h2 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
  line-height: 1.4;
  color: #f1f5f9;
}

.brand-wall-head p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(226, 232, 240, 0.72);
}

.brand-wall {
  display: grid;
  /* auto-fill keeps the tile count per row fluid; combined with the fixed
     tile height this stays tidy from 320px up to ultrawide. */
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem;
}

.brand-wall-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  padding: 0.6rem;
  border-radius: 0.75rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

/* Almost every logo is dark ink drawn for a light background, so the default
   tile is light. `--dark` is applied only to the handful whose ink is light,
   which would otherwise vanish against a light tile. */
.brand-wall-item--light {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.brand-wall-item--dark {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-wall-item:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 197, 71, 0.55);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.brand-wall-item img {
  /* width/height auto + contain lets very wide wordmarks and square emblems
     share the same box without distortion or cropping. */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-wall-note {
  max-width: 800px;
  margin: 1.5rem auto 0;
  font-size: 0.78rem;
  line-height: 1.85;
  text-align: center;
  color: rgba(148, 163, 184, 0.72);
}

@media (max-width: 640px) {
  .brand-wall {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 0.55rem;
  }

  .brand-wall-item {
    height: 68px;
    padding: 0.45rem;
  }

  .brand-wall-head h2 {
    font-size: 1.3rem;
  }

  .brand-wall-note {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-wall-item {
    transition: none;
  }
}
