/* Elementor Project Grid: all presentation is scoped to the widget root. */
.epg-project-grid {
  --epg-ink: #1d1d1d;
  --epg-copy: #363636;
  --epg-muted: #ededed;
  --epg-accent: #c94d00;
  --epg-radius: 11px;
  --epg-shadow: 0 3px 14px rgba(16, 18, 21, .08);
  color: var(--epg-copy);
  font-family: inherit;
}

.epg-project-grid *,
.epg-project-grid *::before,
.epg-project-grid *::after { box-sizing: border-box; }

.epg-project-grid__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 39px;
}

.epg-project-grid__filter {
  min-height: 41px;
  padding: 10px 20px;
  border: 1px solid var(--epg-filter-border-color, var(--epg-filter-border, var(--epg-ink)));
  border-radius: 5px;
  background: var(--epg-filter-background, var(--epg-filter-bg, var(--epg-ink)));
  color: var(--epg-filter-color, #fff);
  cursor: pointer;
  font: 600 14px/1.35 inherit;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.epg-project-grid__filter:hover,
.epg-project-grid__filter:focus-visible {
  border-color: var(--epg-filter-hover-border-color, var(--epg-filter-hover-border, var(--epg-filter-border-color, var(--epg-filter-border, var(--epg-ink)))));
  background: var(--epg-filter-hover-background, var(--epg-filter-hover-bg, #fff));
  color: var(--epg-filter-hover-color, var(--epg-ink));
  box-shadow: 0 0 0 3px rgba(255, 97, 0, .25);
  outline: 0;
}

.epg-project-grid__filter:active { transform: translateY(1px); }

.epg-project-grid__filter[aria-pressed="true"] {
  border-color: var(--epg-filter-hover-border-color, var(--epg-filter-hover-border, var(--epg-filter-border-color, var(--epg-filter-border, var(--epg-ink)))));
  background: var(--epg-filter-hover-background, var(--epg-filter-hover-bg, #fff));
  color: var(--epg-filter-hover-color, var(--epg-ink));
}

.epg-project-grid__items {
  display: grid;
  grid-template-columns: repeat(var(--epg-columns-desktop, 3), minmax(0, 1fr));
  gap: var(--epg-grid-gap, 14px);
}

.epg-project-grid__item {
  min-width: 0;
  transition: opacity .22s ease, transform .22s ease;
}

.epg-project-grid__item.is-filtered-out {
  opacity: 0;
  pointer-events: none;
  transform: scale(.985);
}

.epg-project-grid__item[hidden] { display: none; }

.epg-project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--epg-card-radius, var(--epg-radius));
  background: var(--epg-card-background, var(--epg-card-bg, #fff));
  box-shadow: var(--epg-card-shadow, var(--epg-shadow));
  padding: var(--epg-card-padding, 10px 10px 19px);
}

.epg-project-card__category {
  display: block;
  width: min(100%, 245px);
  margin: 0 auto 10px;
  padding: 8px 12px;
  border-radius: 5px;
  background: var(--epg-badge-background, var(--epg-badge-bg, var(--epg-muted)));
  color: var(--epg-badge-color, #2e2e2e);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.epg-project-card__image-link { display: block; overflow: hidden; border-radius: 10px; }
.epg-project-card__image-link:focus-visible { outline: 3px solid rgba(201, 77, 0, .55); outline-offset: 3px; }

.epg-project-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .32s ease;
}

.epg-project-card:hover .epg-project-card__image { transform: scale(1.025); }

.epg-project-card__title {
  margin: 12px auto 18px;
  max-width: 94%;
  color: var(--epg-title-color, var(--epg-copy));
  font-size: clamp(18px, 1.55vw, 21px);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.epg-project-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 119px;
  min-height: 28px;
  margin-top: auto;
  padding: 6px 17px;
  border-radius: 5px;
  background: var(--epg-cta-background, var(--epg-cta-bg, var(--epg-accent)));
  color: var(--epg-cta-color, #fff);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.epg-project-card__cta:hover,
.epg-project-card__cta:focus-visible {
  /* The default pair (#a63f00 / #fff) exceeds WCAG AA for normal text. */
  background: var(--epg-cta-hover-background, var(--epg-cta-hover-bg, #a63f00));
  color: var(--epg-cta-hover-color, #fff);
}

.epg-project-card__cta:hover { transform: translateY(-1px); }
.epg-project-card__cta:focus-visible {
  outline: 3px solid #7a3000;
  outline-offset: 3px;
}

.epg-project-grid__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 20px;
  border: 1px dashed #d6d6d6;
  border-radius: var(--epg-radius);
  color: #666;
  text-align: center;
}

@media (max-width: 1024px) {
  .epg-project-grid__items {
    grid-template-columns: repeat(var(--epg-columns-tablet, 2), minmax(0, 1fr));
    gap: var(--epg-grid-gap-tablet, var(--epg-grid-gap, 18px));
  }
}

@media (max-width: 640px) {
  .epg-project-grid__filters { gap: 8px; margin-bottom: 25px; }
  .epg-project-grid__filter { flex: 1 1 200px; padding-inline: 14px; }
  .epg-project-grid__items {
    grid-template-columns: repeat(var(--epg-columns-mobile, 1), minmax(0, 1fr));
    gap: var(--epg-grid-gap-mobile, var(--epg-grid-gap-tablet, var(--epg-grid-gap, 16px)));
  }
  .epg-project-card { padding: var(--epg-card-padding-mobile, var(--epg-card-padding, 10px 10px 16px)); }
  .epg-project-card__title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .epg-project-grid *, .epg-project-grid *::before, .epg-project-grid *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
