/* ==========================================================================
   Garden Sansar - Gallery Stylesheet
   ========================================================================== */

.gallery-page-wrap {
  background-color: #ffffff;
  color: #1f2937;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Hero & Breadcrumb
   -------------------------------------------------------------------------- */
.gallery-hero {
  width: 100%;
  padding: 48px 20px 32px;
  background: linear-gradient(180deg, #f0f7f2 0%, #ffffff 100%);
  text-align: center;
  border-bottom: 1px solid #e5ede7;
}

.gallery-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 12px;
}

.gallery-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.gallery-breadcrumb a:hover {
  color: #15803d;
}

.gallery-breadcrumb .sep {
  color: #94a3b8;
  font-size: 12px;
}

.gallery-breadcrumb .current {
  color: #15803d;
  font-weight: 600;
}

.gallery-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  color: #14532d;
  letter-spacing: -1px;
  margin: 0 0 10px;
  line-height: 1.15;
}

.gallery-subtitle {
  font-size: 16px;
  color: #64748b;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Filter Pills Bar (Mobile Native Scrollable)
   -------------------------------------------------------------------------- */
.gallery-filter-wrap {
  max-width: 1240px;
  margin: 28px auto 10px;
  padding: 0 20px;
}

.gallery-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}

.gallery-filter-bar::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 9999px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  user-select: none;
}

.gallery-filter-btn:hover {
  border-color: #166534;
  color: #166534;
}

.gallery-filter-btn.active {
  background: #166534;
  border-color: #166534;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.22);
}

/* --------------------------------------------------------------------------
   Main Gallery Container & Sections
   -------------------------------------------------------------------------- */
.gallery-content-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 20px 70px;
}

.gallery-section {
  margin-bottom: 56px;
}

.gallery-section-title {
  font-size: 24px;
  font-weight: 700;
  color: #14532d;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Gallery Grids (3-Columns on Desktop, 2 on Tablet, 1-2 on Mobile)
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item-card {
  position: relative;
  width: 100%;
  height: 290px;
  border-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  user-select: none;
}

.gallery-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-card:hover .gallery-item-img {
  transform: scale(1.06);
}

/* Overlay & Caption */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(15, 60, 35, 0.85) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: opacity 0.3s ease;
}

.gallery-item-card:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-caption {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  transform: translateY(8px);
  transition: transform 0.3s ease;
}

.gallery-item-card:hover .gallery-item-caption {
  transform: translateY(0);
}

.gallery-item-zoom-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transform: scale(0.85);
  transition: transform 0.25s ease;
}

.gallery-item-card:hover .gallery-item-zoom-icon {
  transform: scale(1);
}

.gallery-item-zoom-icon svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Filtered Single View (When filtering by tab)
   -------------------------------------------------------------------------- */
.gallery-filtered-view {
  display: none;
}

/* --------------------------------------------------------------------------
   Hiring Callout Strip
   -------------------------------------------------------------------------- */
.gallery-hiring-banner {
  background: linear-gradient(135deg, #09261a 0%, #061d13 100%);
  border-radius: 24px;
  padding: 44px 48px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  margin-top: 50px;
}

.gallery-hiring-content h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
  line-height: 1.25;
}

.gallery-hiring-content p {
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  max-width: 680px;
  line-height: 1.6;
}

.gallery-hiring-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  border-radius: 9999px;
  border: 1.5px solid #4ade80;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.gallery-hiring-btn:hover {
  background: #4ade80;
  color: #052e16;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

/* ==========================================================================
   Mobile Native Lightbox Modal
   ========================================================================== */
.gs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 18, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  touch-action: pan-y;
}

.gs-lightbox.active {
  display: flex;
  opacity: 1;
}

.gs-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gs-lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  user-select: none;
  transition: transform 0.2s ease;
}

.gs-lightbox-header {
  position: absolute;
  top: -46px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  padding: 0 4px;
}

.gs-lightbox-caption {
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.gs-lightbox-counter {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}

.gs-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 100000;
}

.gs-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* Prev / Next Nav Buttons */
.gs-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  z-index: 100000;
}

.gs-lightbox-nav svg {
  width: 26px;
  height: 26px;
}

.gs-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.08);
}

.gs-lightbox-prev {
  left: 24px;
}

.gs-lightbox-next {
  right: 24px;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .gallery-item-card {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 36px 16px 24px;
  }
  .gallery-filter-bar {
    justify-content: flex-start;
  }
  .gallery-content-container {
    padding: 10px 16px 50px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .gallery-item-card {
    height: 210px;
    border-radius: 12px;
  }
  .gallery-item-overlay {
    opacity: 1; /* Always show caption on mobile */
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0, 0, 0, 0.75) 100%);
    padding: 12px;
  }
  .gallery-item-caption {
    font-size: 13px;
    transform: translateY(0);
  }
  .gallery-hiring-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px;
  }
  .gallery-hiring-content p {
    margin: 0 auto;
  }
  .gs-lightbox-nav {
    width: 42px;
    height: 42px;
  }
  .gs-lightbox-prev {
    left: 10px;
  }
  .gs-lightbox-next {
    right: 10px;
  }
  .gs-lightbox-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gallery-item-card {
    height: 240px;
  }
}

/* Ensure footer hiring banner is not displayed on gallery pages */
.page-template-page-gallery .site-footer .footer-hiring,
.page-gallery .site-footer .footer-hiring,
.gallery-page-wrap ~ .site-footer .footer-hiring {
  display: none !important;
}

