/* ===================== Projects Page ===================== */

.projects-page {
  background: var(--cream);
}

/* Hero band */
.projects-hero {
  background: var(--dark);
  color: #ffffff;
  padding: 48px 0 44px;
}

.projects-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.projects-hero-text {
  max-width: 480px;
  flex-shrink: 0;
}

.projects-hero-text h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  position: relative;
  padding-bottom: 16px;
}

.projects-hero-text h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--orange);
}

.projects-hero-text p {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 420px;
}

/* Filters */
.projects-filters {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 18px;
  flex: 1;
  max-width: 720px;
}

.filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  min-width: 68px;
  transition: opacity 0.2s;
}

.filter-btn__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.filter-btn__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: var(--filter-icon-white);
}

.filter-btn__icon--all {
  background: none;
  opacity: 0.55;
  position: relative;
}

.filter-btn__icon--all::before,
.filter-btn__icon--all::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 1px;
}

.filter-btn__icon--all::before {
  width: 22px;
  height: 3px;
  top: 14px;
  left: 11px;
  box-shadow: 0 8px 0 #fff, 0 16px 0 #fff;
}

.filter-btn__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  line-height: 1.3;
  transition: color 0.2s;
}

.filter-btn:hover .filter-btn__icon,
.filter-btn:hover .filter-btn__label {
  opacity: 1;
  color: #ffffff;
}

.filter-btn.is-active .filter-btn__icon {
  opacity: 1;
}

.filter-btn.is-active .filter-btn__icon--all::before,
.filter-btn.is-active .filter-btn__icon--all::after {
  background: var(--orange);
  box-shadow: 0 8px 0 var(--orange), 0 16px 0 var(--orange);
}

.filter-btn.is-active .filter-btn__icon img {
  filter: var(--filter-icon-orange);
}

.filter-btn.is-active .filter-btn__label {
  color: var(--orange);
  opacity: 1;
}

/* Grid */
.projects-all {
  background: #ffffff;
  padding: 40px 0 52px;
}

.projects-all-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border-radius: 2px;
  background: var(--cream-2);
}

.project-card.is-hidden {
  display: none;
}

.project-card > a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.04);
}

.projects-all-empty {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 48px 0;
}

.projects-all-empty[hidden] {
  display: none;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 16px;
  background: linear-gradient(
    180deg,
    rgba(39, 35, 32, 0) 40%,
    rgba(39, 35, 32, 0.72) 100%
  );
}

.project-card__info h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.35;
}

.project-card__info p {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.project-card__type {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
}

.project-card__arrow {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--orange);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: background 0.2s;
}

.project-card:hover .project-card__arrow {
  background: var(--orange-dark);
}

/* CTA bar */
.projects-cta {
  background: var(--dark);
  padding: 28px 0;
}

.projects-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.projects-cta-text {
  display: flex;
  align-items: center;
  gap: 18px;
}

.projects-cta-icon {
  flex-shrink: 0;
  color: #ffffff;
  opacity: 0.9;
}

.projects-cta-text p {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  max-width: 520px;
}

.projects-cta .btn {
  flex-shrink: 0;
}

/* ===================== Responsive ===================== */

@media (max-width: 1023px) {
  .projects-hero-inner {
    flex-direction: column;
    gap: 32px;
  }

  .projects-filters {
    justify-content: flex-start;
    max-width: none;
  }

  .projects-all-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .projects-hero {
    padding: 36px 0 32px;
  }

  .projects-filters {
    gap: 4px 10px;
  }

  .filter-btn {
    min-width: 58px;
  }

  .filter-btn__icon {
    width: 36px;
    height: 36px;
  }

  .filter-btn__label {
    font-size: 10px;
  }

  .projects-all-grid {
    grid-template-columns: 1fr;
  }

  .projects-cta-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .projects-cta .btn {
    width: 100%;
    text-align: center;
  }
}
