/* Homepage featured projects — centered grid (≤3) or carousel (4+) v5 */
.eco-projects-strip {
  --eco-strip-card-w: 18rem;
  --eco-strip-gap: 0.75rem;
  position: relative;
  padding: 2.25rem 0 2rem;
  background: #f4f7fb;
  overflow: hidden;
}

.eco-projects-strip__inner {
  max-width: 100%;
  margin: 0 auto;
}

.eco-projects-strip__head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 1rem;
  padding: 0 1rem;
}

.eco-projects-strip__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
  background: rgba(10, 31, 68, 0.07);
  color: #0a1f44;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.45rem;
}

.eco-projects-strip__title {
  font-family: Oswald, Cairo, sans-serif;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
  font-weight: 700;
  color: #0a1f44;
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

.eco-projects-strip__desc {
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* ── Centered static grid (1–3 projects) ── */
.eco-projects-strip__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--eco-strip-gap);
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.15rem 1rem 0.35rem;
}

.eco-projects-strip__grid .eco-projects-strip__card {
  flex: 0 1 var(--eco-strip-card-w);
  width: var(--eco-strip-card-w);
  max-width: 100%;
}

@media (min-width: 900px) {
  .eco-projects-strip--grid {
    --eco-strip-card-w: min(18rem, calc((100% - 2 * var(--eco-strip-gap)) / 3));
  }

  .eco-projects-strip__grid[data-count="3"] .eco-projects-strip__card {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 19rem;
  }

  .eco-projects-strip__grid[data-count="2"] {
    max-width: 42rem;
  }

  .eco-projects-strip__grid[data-count="1"] {
    max-width: 20rem;
  }
}

/* ── Carousel (4+ projects) ── */
.eco-projects-strip__slider {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 3rem;
}

.eco-projects-strip__viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.eco-projects-strip__viewport::-webkit-scrollbar {
  display: none;
}

.eco-projects-strip__track {
  display: flex;
  width: max-content;
  gap: var(--eco-strip-gap);
  padding: 0.15rem 0 0.35rem;
}

.eco-projects-strip__track .eco-projects-strip__card {
  scroll-snap-align: center;
}

.eco-projects-strip__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(10, 31, 68, 0.14);
  border-radius: 9999px;
  background: #fff;
  color: #0a1f44;
  box-shadow: 0 4px 16px rgba(10, 31, 68, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.eco-projects-strip__arrow svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.eco-projects-strip__arrow:hover:not(:disabled) {
  background: #0a1f44;
  color: #fff;
  box-shadow: 0 6px 20px rgba(10, 31, 68, 0.2);
  transform: translateY(calc(-50% - 1px));
}

.eco-projects-strip__arrow:focus-visible {
  outline: 2px solid #0a1f44;
  outline-offset: 2px;
}

.eco-projects-strip__arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.eco-projects-strip__arrow--prev {
  right: 0.35rem;
}

.eco-projects-strip__arrow--next {
  left: 0.35rem;
}

/* ── Cards ── */
.eco-projects-strip__card {
  flex: 0 0 var(--eco-strip-card-w);
  width: var(--eco-strip-card-w);
  display: flex;
  flex-direction: column;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 2px 4px rgba(10, 31, 68, 0.06),
    0 8px 18px -6px rgba(10, 31, 68, 0.14);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.eco-projects-strip__card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 8px rgba(10, 31, 68, 0.08),
    0 14px 24px -8px rgba(10, 31, 68, 0.18);
}

.eco-projects-strip__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbe3ee;
  flex-shrink: 0;
}

.eco-projects-strip__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.45s ease;
}

.eco-projects-strip__media img[src*="sanam-tower"] {
  object-position: center 42%;
}

.eco-projects-strip__card:hover .eco-projects-strip__media img {
  transform: scale(1.04);
}

.eco-projects-strip__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 31, 68, 0.55) 0%,
    rgba(10, 31, 68, 0.08) 38%,
    transparent 100%
  );
  pointer-events: none;
}

.eco-projects-strip__badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  padding: 0.18rem 0.5rem;
  border-radius: 9999px;
  background: #c9a227;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.eco-projects-strip__body {
  padding: 0.65rem 0.75rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
}

.eco-projects-strip__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #94a3b8;
  font-size: 0.74rem;
  margin: 0;
}

.eco-projects-strip__meta svg {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

.eco-projects-strip__name {
  font-family: Oswald, Cairo, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0a1f44;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eco-projects-strip__client {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eco-projects-strip__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0a1f44;
}

.eco-projects-strip__cta svg {
  width: 0.85rem;
  height: 0.85rem;
}

.eco-projects-strip__footer {
  text-align: center;
  margin-top: 0.85rem;
  padding: 0 1rem;
}

.eco-projects-strip__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border-radius: 0.55rem;
  background: #0a1f44;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.eco-projects-strip__btn:hover {
  background: #132d5c;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .eco-projects-strip {
    --eco-strip-card-w: min(16.5rem, 88vw);
    padding: 1.75rem 0 1.5rem;
  }

  .eco-projects-strip__head {
    margin-bottom: 0.75rem;
  }

  .eco-projects-strip__slider {
    padding: 0 2.5rem;
  }

  .eco-projects-strip__arrow {
    width: 2.35rem;
    height: 2.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eco-projects-strip__viewport {
    scroll-behavior: auto;
  }
}
