/* ============================================
   Gallery page — St. Vincent De Paul Hospitals
   ============================================ */

/* ============ INTRO ============ */
.gallery-intro {
  padding: 5rem 0 3rem;
  background: #fff;
}

.gallery-intro-text {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 0.75rem;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.gallery-empty {
  text-align: center;
  padding: 3.5rem 1.75rem;
  background: var(--color-light);
  border-radius: var(--radius);
  color: var(--color-muted);
  border: 1px dashed var(--color-border);
}

.gallery-empty i {
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
  display: block;
}

/* ============ ALBUMS ============ */
.gallery-albums {
  padding: 0 0 5rem;
  background: #fff;
}

.gallery-albums-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.gallery-albums-header .section-header {
  text-align: left;
  margin-bottom: 0;
}

.gallery-albums-header .section-title {
  margin-top: 0.5rem;
}

.gallery-albums-note {
  font-size: 0.875rem;
  color: var(--color-muted);
  max-width: 280px;
  line-height: 1.5;
  font-weight: 500;
}

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

.gallery-album-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
  text-align: left;
}

.gallery-album-card--interactive {
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.gallery-album-card--interactive:hover,
.gallery-album-card--interactive:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(14, 42, 85, 0.12);
  outline: none;
  border-color: transparent;
}

.gallery-album-card--empty {
  opacity: 0.75;
  cursor: default;
}

.gallery-album-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8edf3 0%, #d1d9e6 100%);
  overflow: hidden;
}

.gallery-album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-album-card--interactive:hover .gallery-album-thumb img {
  transform: scale(1.05);
}

.gallery-album-view {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(14, 42, 85, 0);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.gallery-album-card--interactive:hover .gallery-album-view,
.gallery-album-card--interactive:focus-visible .gallery-album-view {
  background: rgba(14, 42, 85, 0.5);
  opacity: 1;
}

.gallery-album-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(14, 42, 85, 0.35);
  font-size: 3rem;
}

.gallery-album-count {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(14, 42, 85, 0.88);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.gallery-album-count i {
  font-size: 0.7rem;
  color: var(--color-gold);
}

.gallery-album-body {
  padding: 1.5rem;
}

.gallery-album-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.gallery-album-body p {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ SPOTLIGHT (MASONRY) ============ */
.gallery-spotlight {
  padding: 5rem 0;
  background: var(--color-light);
}

.gallery-spotlight-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.gallery-spotlight-sub {
  margin-top: -1.75rem;
  margin-bottom: 2.25rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-muted);
}

.gallery-masonry {
  columns: 1;
  column-gap: 1.25rem;
}

.gallery-masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
}

.gallery-masonry-trigger {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: none;
  padding: 0;
  width: 100%;
  cursor: pointer;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.gallery-masonry-trigger:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-masonry-trigger img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-masonry-trigger:hover img {
  transform: scale(1.05);
}

.gallery-masonry-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 42, 85, 0);
  color: #fff;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.gallery-masonry-trigger:hover .gallery-masonry-zoom {
  background: rgba(14, 42, 85, 0.45);
  opacity: 1;
}

/* ============ VALUES / STATS / CTA ============ */
.gallery-values {
  background: var(--color-navy);
  color: #fff;
  padding: 5rem 0;
}

.gallery-stats {
  padding: 4rem 0;
  background: #fff;
}

.gallery-cta {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
  padding: 4.5rem 0;
}

.gallery-cta-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.5fr;
  gap: 3rem;
  align-items: center;
}

.gallery-cta-text h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.gallery-cta-text > p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
}

.gallery-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-cta-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-cta-icon {
  font-size: 7rem;
  color: rgba(255, 255, 255, 0.1);
}

/* ============ LIGHTBOX ============ */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 40, 0.96);
  backdrop-filter: blur(8px);
}

.gallery-lightbox-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.gallery-lightbox-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.gallery-lightbox-meta {
  min-width: 0;
  flex: 1;
}

.gallery-lightbox-album {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.25rem;
}

.gallery-lightbox-caption {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-lightbox-counter {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.gallery-lightbox-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.gallery-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.gallery-lightbox-img {
  max-width: 100%;
  max-height: min(78vh, 740px);
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.gallery-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-prev {
  left: -4rem;
}

.gallery-lightbox-next {
  right: -4rem;
}

/* ============ RESPONSIVE ============ */
@media (min-width: 640px) {
  .gallery-masonry {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .gallery-masonry {
    columns: 3;
  }
}

@media (max-width: 1024px) {
  .gallery-albums-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-cta-inner {
    grid-template-columns: 1fr;
  }

  .gallery-cta-visual {
    display: none;
  }

  .gallery-lightbox-prev {
    left: 0.5rem;
  }

  .gallery-lightbox-next {
    right: 0.5rem;
  }
}

@media (max-width: 768px) {
  .gallery-intro,
  .gallery-spotlight {
    padding: 3.5rem 0;
  }

  .gallery-albums {
    padding-bottom: 3.5rem;
  }

  .gallery-albums-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .gallery-albums-grid {
    grid-template-columns: 1fr;
  }

  .gallery-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
