/* Gallery Pages Styles */
:root {
  --green: #2D6A4F;
  --mint: #D8F3DC;
  --dark-green: #1b5e40;
  --gray: #6c757d;
  --light: #f8f9fa;
}

.gallery-page {
  background: var(--light);
  min-height: 100vh;
}

.gallery-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--dark-green) 100%);
  color: #fff;
  padding: 80px 20px 60px;
  text-align: center;
}
.gallery-hero h1 {
  font-size: 2.5rem;
  margin: 0 0 12px;
  font-weight: 800;
}
.gallery-hero p {
  font-size: 1.125rem;
  opacity: 0.95;
  max-width: 720px;
  margin: 0 auto;
}

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.gallery-tab {
  background: #fff;
  color: var(--green);
  border: 2px solid var(--green);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-size: 14px;
}
.gallery-tab:hover { background: var(--mint); }
.gallery-tab.active {
  background: var(--green);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.gallery-item-title {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Video specific */
.gallery-video-item {
  position: relative;
}
.gallery-video-item .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(45,106,79,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
  transition: transform .2s;
}
.gallery-video-item:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}
.gallery-video-item .play-icon svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
}
.gallery-video-body {
  padding: 14px;
}
.gallery-video-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--green);
}
.gallery-video-body p {
  margin: 0;
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
}

/* Load more */
.gallery-load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.gallery-load-more-btn {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 14px rgba(45,106,79,0.25);
}
.gallery-load-more-btn:hover {
  background: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,106,79,0.35);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-content iframe {
  width: min(900px, 90vw);
  height: min(506px, 50.6vw);
  border: none;
  border-radius: 8px;
  background: #000;
}
.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 16px;
  font-size: 16px;
}
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* Before/After Section */
.before-after-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.ba-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all .25s ease;
}
.ba-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.ba-images {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.ba-side {
  position: relative;
  overflow: hidden;
}
.ba-side img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.ba-card:hover .ba-side img {
  transform: scale(1.05);
}
.ba-arrow {
  font-size: 24px;
  color: var(--green);
  font-weight: bold;
  padding: 0 8px;
  background: #fff;
  z-index: 2;
}
.ba-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 3;
}
.ba-badge-before {
  background: #dc3545;
  color: #fff;
}
.ba-badge-after {
  background: #28a745;
  color: #fff;
}

.ba-info {
  padding: 14px 16px;
}
.ba-info h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
}
.ba-info p {
  margin: 0;
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
}

/* Before/After Lightbox */
.ba-lightbox-content {
  max-width: 95vw;
  width: 900px;
}
.ba-lightbox-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ba-lightbox-side {
  position: relative;
}
.ba-lightbox-side img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item img { height: 160px; }
  .before-after-grid { grid-template-columns: 1fr; }
  .ba-lightbox-images { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .gallery-hero h1 { font-size: 1.8rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery-item img { height: 130px; }
  .gallery-item-title { font-size: 12px; padding: 10px; }
  .ba-side img { height: 130px; }
  .ba-info h3 { font-size: 13px; }
  .ba-info p { font-size: 11px; }
}