.pwg-gallery,
.pwg-gallery * {
  box-sizing: border-box;
}

.pwg-gallery {
  width: 100%;
  color: #111;
}

.pwg-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  align-items: start;
  justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.pwg-category {
  appearance: none !important;
  border: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  box-shadow: none !important;
  min-width: 0 !important;
  width: 100%;
  max-width: none;
}

.pwg-category::before,
.pwg-category::after,
.pwg-category-image::before,
.pwg-category-image::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}

.pwg-category-image {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: block !important;
  position: relative !important;
  border: 2px solid #23746d !important;
  border-top: 2px solid #23746d !important;
  border-right: 2px solid #23746d !important;
  border-bottom: 2px solid #23746d !important;
  border-left: 2px solid #23746d !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #fff !important;
  box-sizing: border-box !important;
  line-height: 0 !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.pwg-category-image img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}

.pwg-category-name {
  display: block;
  margin-top: 9px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.25;
  color: inherit;
  text-align: center;
}

.pwg-category:hover .pwg-category-image,
.pwg-category.is-active .pwg-category-image,
.pwg-category:focus-visible .pwg-category-image {
  transform: translateY(-3px);
  box-shadow: 0 5px 16px rgba(0,0,0,.12) !important;
}

.pwg-previous-work {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  transition: max-height .45s ease, opacity .3s ease, padding-top .45s ease;
}

.pwg-previous-work.is-open {
  max-height: 4000px;
  opacity: 1;
  padding-top: 36px;
}

.pwg-previous-work h2 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 2px;
}

.pwg-work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pwg-work-grid img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  cursor: default !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

/* Previous-work thumbnails are display-only, so disable hover effects. */
.pwg-work-grid img:hover,
.pwg-work-grid img:focus {
  cursor: default !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

@media (max-width: 900px) {
  .pwg-categories {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .pwg-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .pwg-categories {
    gap: 24px 16px;
  }
  .pwg-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pwg-work-grid {
    grid-template-columns: 1fr;
  }
}
