/* ═══════════════════════════════════════════════
   PROJECTS GRID — Widget: anigami_projects_grid
   ═══════════════════════════════════════════════ */

.anigami-projects-grid-section {
  position: relative;
}

/* ── Capçalera ── */
.pgw-header {
  text-align: center;
  padding-bottom: 20px;
}
.pgw-header h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 300;
  color: #fff;
  margin-bottom: 16px;
}
.pgw-header p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  margin: 0;
}

/* ── Filter bar ── */
.pgw-filter-bar {
  text-align: center;
  padding: 40px 24px 20px;
}
.pgw-filter-btn {
  display: inline-block;
  padding: 8px 20px;
  margin: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}
.pgw-filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.pgw-filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ── Grid ── */
.pgw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

/* ── Card ── */
.pgw-card {
  background: rgba(255, 255, 255, 0.03);
  border: none;
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s;
  display: flex;
  flex-direction: column;
}
.pgw-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* ── Card carousel ── */
.pgw-card-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.pgw-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}
.pgw-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
	background-color:white;
}
.pgw-carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.1);
  transition: filter 0.4s;
	aspect-ratio: 4 / 3;
}
.pgw-card:hover .pgw-carousel-slide img {
  filter: grayscale(0%) brightness(1);
}
.pgw-single-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
  filter: grayscale(100%) brightness(1.1);
  transition: filter 0.4s;
}
.pgw-card:hover .pgw-single-img {
  filter: grayscale(0%) brightness(1);
}

.pgw-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  filter: grayscale(100%) brightness(1.1);
  transition: filter 0.4s;
}
.pgw-card:hover .pgw-fallback {
  filter: grayscale(0%) brightness(1);
}

/* ── Carousel controls ── */
.pgw-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s, background 0.3s;
  padding: 0;
  font-family: inherit;
}
.pgw-carousel-btn:hover { background: rgba(0, 0, 0, 0.8); }
.pgw-card:hover .pgw-carousel-btn,
.pgw-carousel-btn:focus-visible { opacity: 1; }
.pgw-carousel-btn.prev { left: 8px; }
.pgw-carousel-btn.next { right: 8px; }
.pgw-carousel-btn svg  { width: 14px; height: 14px; }

.pgw-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.pgw-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}
.pgw-carousel-dot.active { background: #fff; }

/* ── Card body ── */
.pgw-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pgw-card-body h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  color: #fff;
}
.pgw-card-body p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}
.pgw-card-body a{
	text-decoration:none!important;
}
.pgw-card-footer {
  margin-top: auto;
  padding-top: 20px;
}
.pgw-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}
.pgw-card-link:hover {
  background: #fff;
  color: #1a1a1a;
  border-color: #fff;
  transform: translateX(2px);
}
.pgw-card-link svg { width: 14px; height: 14px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pgw-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pgw-grid { grid-template-columns: 1fr; }
  .pgw-filter-btn { font-size: 11px; padding: 7px 14px; }
  .pgw-carousel-btn { opacity: 1; }
}
