/* Sunshine Boys — reusable Our Work gallery (v1 style)
   Poppins, black / Sun Yellow, 7px black dividers, no blue links, no cream.
   Used on commercial.html and residential.html. */
.work-gallery {
  display: block;
  background: #f8dc08;
  border-top: 7px solid #0a0a0a;
  padding: 80px 0;
  color: #0a0a0a;
}

.work-gallery[hidden] {
  display: none !important;
}

.work-gallery .section-header {
  text-align: center;
  margin-bottom: 40px;
}

.work-gallery .eyebrow {
  font-family: "Poppins", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin-bottom: 10px;
}

.work-gallery h2 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  color: #0a0a0a;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0;
}

.work-gallery h2::after {
  content: "";
  display: block;
  width: 96px;
  height: 12px;
  margin: 16px auto 0;
  background:
    linear-gradient(#0a0a0a, #0a0a0a) top / 100% 2px no-repeat,
    linear-gradient(#0a0a0a, #0a0a0a) center / 100% 2px no-repeat,
    linear-gradient(#0a0a0a, #0a0a0a) bottom / 100% 2px no-repeat;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gallery-item {
  background: #ffffff;
  border-top: 4px solid #0a0a0a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px color-mix(in srgb, #0a0a0a 14%, transparent);
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px color-mix(in srgb, #0a0a0a 18%, transparent);
}

.gallery-item:focus-visible {
  outline: 3px solid #0a0a0a;
  outline-offset: 3px;
}

.gallery-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #ececec;
  overflow: hidden;
}

.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gallery-play span {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f8dc08;
  border: 3px solid #0a0a0a;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px color-mix(in srgb, #0a0a0a 30%, transparent);
}

.gallery-play span::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #0a0a0a;
}

.gallery-caption {
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #0a0a0a;
  padding: 14px 16px 16px;
  margin: 0;
  margin-top: auto;
  line-height: 1.4;
  min-height: 4.4em;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, #0a0a0a 88%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gallery-lightbox-media {
  width: 100%;
  max-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}

.gallery-lightbox-media img,
.gallery-lightbox-media video {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.gallery-lightbox-caption {
  font-family: "Poppins", sans-serif;
  color: #f8dc08;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  margin: 0;
  max-width: 70ch;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  position: absolute;
  background: #f8dc08;
  color: #0a0a0a;
  border: 2px solid #0a0a0a;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.gallery-lightbox-close {
  top: -8px;
  right: -8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
}

.gallery-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.gallery-lightbox-prev { left: -8px; }
.gallery-lightbox-next { right: -8px; }

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:focus-visible {
  background: #ffffff;
  outline: 2px solid #f8dc08;
  outline-offset: 3px;
}

@media (max-width: 1000px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-lightbox-prev { left: 0; }
  .gallery-lightbox-next { right: 0; }
}

@media (max-width: 600px) {
  .work-gallery { padding: 56px 0; }
  .gallery-grid { grid-template-columns: 1fr; }
}
