/* =========================================================
   PM PATIL - SERVICE PHOTO GALLERY
   Masonry layout: every photo keeps its own shape.
========================================================= */

.pmg-gallery {
  --pmg-navy: #0c2c6c;
  --pmg-steel: #2f4e93;
  --pmg-muted: #5b6774;
  --pmg-tile: #e7ebf1;

  padding: 20px;
  background: #f4f6f9;
}

.pmg-gallery *,
.pmg-gallery *::before,
.pmg-gallery *::after {
  box-sizing: border-box;
}

.pmg-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* ---------- Heading ---------- */
.pmg-head {
  text-align: center;
  margin: 0 auto 24px;
  max-width: 820px;
}

.pmg-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--pmg-steel);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pmg-title {
  margin: 0;
  color: var(--pmg-navy);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.2;
}

.pmg-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 10px;
  background: var(--pmg-navy);
}

/* Section title used on the "all services" view */
.pmg-section + .pmg-section {
  margin-top: 36px;
}

.pmg-section__title {
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--pmg-navy);
  color: var(--pmg-navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Masonry grid ---------- */
.pmg-grid {
  column-count: 3;
  column-gap: 14px;
}

.pmg-item {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pmg-tile);
  cursor: zoom-in;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  box-shadow: 0 4px 14px rgba(12, 44, 108, 0.08);
  transition: box-shadow 0.3s ease;
}

.pmg-item img,
.pmg-item video {
  display: block;
  width: 100%;
  height: auto;
}

.pmg-item img {
  transition: transform 0.45s ease;
}

.pmg-item:hover {
  box-shadow: 0 14px 30px rgba(12, 44, 108, 0.18);
}

.pmg-item:hover img {
  transform: scale(1.03);
}

.pmg-item:focus-visible {
  outline: 3px solid var(--pmg-steel);
  outline-offset: 3px;
}

.pmg-item--video {
  cursor: default;
  background: #000;
}

.pmg-empty {
  margin: 0;
  padding: 40px 0;
  text-align: center;
  color: var(--pmg-muted);
  font-size: 15px;
}

/* ---------- Lightbox ---------- */
.pmg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 16, 38, 0.94);
}

.pmg-lightbox[hidden] {
  display: none;
}

.pmg-lb-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pmg-lb-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pmg-lb-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.pmg-lb-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pmg-lb-close {
  top: 18px;
  right: 18px;
}

.pmg-lb-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.pmg-lb-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.pmg-lb-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pmg-grid {
    column-count: 2;
    column-gap: 10px;
  }

  .pmg-item {
    margin-bottom: 10px;
    border-radius: 8px;
  }
}

@media (max-width: 600px) {
  .pmg-gallery {
    padding: 26px 12px 32px;
  }

  .pmg-grid {
    column-gap: 8px;
  }

  .pmg-item {
    margin-bottom: 8px;
  }

  .pmg-lb-btn {
    width: 40px;
    height: 40px;
  }

  .pmg-lb-prev {
    left: 8px;
  }

  .pmg-lb-next {
    right: 8px;
  }

  .pmg-lb-img {
    max-width: 96vw;
  }
}

@media (max-width: 380px) {
  .pmg-grid {
    column-count: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pmg-item img {
    transition: none;
  }

  .pmg-item:hover img {
    transform: none;
  }
}
