/* ==========================================================================
   PHOTO GALLERY SPECIFIC STYLES
   Modern Editorial Photo Grid, Pill Filters, and Lightbox Viewer
   ========================================================================== */

/* Page Header & Title Section (White Background, No Hero) */
.gallery-page-header {
  padding-top: 155px;
  padding-bottom: 2.25rem;
  background: #ffffff;
}

.gallery-page-title {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: clamp(2.35rem, 4.5vw, 3.4rem);
  font-weight: 600;
  color: #001507;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 1.75rem 0;
  text-align: center;
}

/* Filter Pills */
.gallery-filter-pills-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 auto;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 1.15rem;
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  user-select: none;
  white-space: nowrap;
}

.filter-pill:hover {
  color: #111827;
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--color-emerald-600);
  color: #ffffff;
  border-color: var(--color-emerald-600);
  transform: translateY(-1px);
}

/* Gallery Grid Section */
.gallery-section {
  padding: 1.5rem 0 6rem;
  background: #ffffff;
}

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

/* Gallery Editorial Card */
.gallery-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast, 0.2s) ease;
}

.gallery-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  margin-bottom: 0.85rem;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-thumb {
  transform: scale(1.04);
}

.gallery-card-body {
  display: flex;
  flex-direction: column;
}

.gallery-category-tag {
  display: inline-block;
  width: fit-content;
  background: rgba(0, 149, 57, 0.186);
  color: #007a2d;
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.gallery-card-title {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  color: #111827;
  margin: 0 0 0.35rem 0;
  transition: color 0.2s ease;
}

.gallery-card:hover .gallery-card-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gallery-card-sub {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

/* Lightbox Modal Dialog (Apple Spec) */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 13, 30, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-out);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-container {
  position: relative;
  max-width: 1000px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--color-white);
}

.lightbox-caption-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.lightbox-caption-sub {
  font-size: 0.875rem;
  color: var(--color-gray-400);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-page-header {
    padding-top: 140px;
    padding-bottom: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

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

@media (max-width: 640px) {
  .gallery-page-header {
    padding-top: 125px;
    padding-bottom: 1.75rem;
  }

  .gallery-page-title {
    font-size: 2rem;
    margin-bottom: 1.25rem;
  }

  .gallery-filter-pills-wrap {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.5rem;
    padding: 0.25rem var(--space-4);
    margin: 0 calc(-1 * var(--space-4));
  }

  .gallery-filter-pills-wrap::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.35rem 0.95rem;
    font-size: 0.775rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .gallery-section {
    padding: 1rem 0 4rem;
  }
}
