
.gallery-page { background: #f4f7fb; }
.gallery-page .site-header { position: absolute; }
.gallery-page .site-header.scrolled { position: fixed; }
.gallery-page-hero {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 25%, rgba(42,213,255,.23), transparent 27%),
    radial-gradient(circle at 12% 80%, rgba(11,108,255,.35), transparent 34%),
    linear-gradient(135deg, #041024 0%, #082b57 55%, #064e7c 100%);
}
.gallery-page-hero::after { content: ""; position: absolute; inset: auto -6% -230px 40%; height: 480px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; transform: rotate(-10deg); }
.gallery-page-hero-grid { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 70px 70px; mask-image: linear-gradient(to bottom, #000, transparent 92%); }
.gallery-page-hero-content { position: relative; z-index: 2; padding-top: 145px; padding-bottom: 85px; }
.gallery-back-link { display: inline-flex; margin-bottom: 34px; color: #bdd6f3; font-size: .82rem; font-weight: 750; }
.gallery-back-link:hover { color: #fff; }
.gallery-page-hero h1 { max-width: 900px; margin: 0; font-size: clamp(3.4rem, 8vw, 7.3rem); line-height: .9; letter-spacing: -.065em; }
.gallery-page-hero-content > p:not(.eyebrow) { max-width: 720px; margin: 28px 0 0; color: #d0dceb; font-size: 1.08rem; }
.gallery-page-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 42px; }
.gallery-page-stats div { min-width: 170px; padding: 16px 19px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.gallery-page-stats strong, .gallery-page-stats span { display: block; }
.gallery-page-stats strong { font-size: 1.35rem; }
.gallery-page-stats span { color: #aebed2; font-size: .74rem; }

.album-directory-section { padding: 100px 0 86px; }
.album-directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 42px; }
.album-directory-heading h2, .album-viewer-heading h2, .gallery-page-cta h2 { margin: 0; font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1.02; letter-spacing: -.05em; }
.album-directory-heading > div:first-child > p:last-child { max-width: 660px; margin-bottom: 0; color: var(--muted); }
.album-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.album-filter { min-height: 42px; padding: 9px 15px; color: #39516e; border: 1px solid #cfdbea; border-radius: 99px; background: #fff; font-size: .78rem; font-weight: 800; }
.album-filter:hover { border-color: #8eb6f2; color: var(--blue); }
.album-filter.active { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 10px 24px rgba(11,108,255,.22); }
.album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.album-card { position: relative; display: block; min-height: 235px; padding: 0; overflow: hidden; color: #fff; border: 0; border-radius: 20px; background: #061429; box-shadow: var(--shadow-sm); text-align: left; isolation: isolate; }
.album-card[hidden] { display: none; }
.album-card::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 1px solid rgba(255,255,255,.17); border-radius: inherit; pointer-events: none; }
.album-card img { width: 100%; height: 100%; min-height: 235px; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.album-card-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(2,9,21,.96), rgba(2,9,21,.05) 64%); }
.album-card-copy { position: absolute; z-index: 3; inset: auto 18px 17px; }
.album-card-copy small, .album-card-copy strong, .album-card-copy span { display: block; }
.album-card-copy small { color: #a9cdf8; font-size: .66rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.album-card-copy strong { margin-top: 2px; font-size: 1.08rem; line-height: 1.2; }
.album-card-copy span { margin-top: 6px; color: #d6e5f7; font-size: .7rem; }
.album-card-badge { position: absolute; z-index: 3; top: 13px; right: 13px; padding: 6px 9px; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(4,18,41,.64); backdrop-filter: blur(9px); font-size: .62rem; font-weight: 800; }
.album-card:hover img, .album-card:focus-visible img { transform: scale(1.055); filter: saturate(1.12); }
.album-card.active { outline: 4px solid rgba(11,108,255,.28); outline-offset: 3px; }
.album-card:focus-visible { outline: 4px solid rgba(11,108,255,.3); outline-offset: 3px; }

.album-viewer-section { scroll-margin-top: 88px; padding: 90px 0 110px; border-top: 1px solid #dfe7f0; background: #fff; }
.album-viewer-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 35px; }
.album-viewer-municipality { margin: 0 0 4px; color: var(--blue); font-size: .73rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.album-viewer-heading > div > p:last-child { margin: 13px 0 0; color: var(--muted); }
.photo-count { flex: 0 0 auto; padding: 9px 13px; color: #28517d; border: 1px solid #cbdcf0; border-radius: 99px; background: #f6faff; font-size: .75rem; font-weight: 800; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 17px;
  align-items: start;
}
.photo-card {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #071a35;
  box-shadow: var(--shadow-sm);
}
.photo-card::after { content: "View photo"; position: absolute; inset: auto 14px 13px auto; padding: 7px 10px; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(3,14,31,.65); backdrop-filter: blur(9px); font-size: .68rem; font-weight: 800; opacity: 0; transform: translateY(5px); transition: .22s ease; }
.photo-card img { display: block; width: 100%; height: auto; object-fit: cover; transition: transform .42s ease, filter .42s ease; }
.photo-card:hover img, .photo-card:focus-visible img { transform: scale(1.045); filter: saturate(1.08); }
.photo-card:hover::after, .photo-card:focus-visible::after { opacity: 1; transform: none; }
.photo-card:focus-visible { outline: 4px solid rgba(11,108,255,.28); outline-offset: 3px; }
.album-empty { padding: 54px 28px; border: 1px dashed #b9cbe0; border-radius: 24px; background: #f6f9fd; text-align: center; }
.album-empty-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 15px; color: var(--blue); border-radius: 18px; background: #e4efff; font-size: 1.8rem; }
.album-empty h3 { margin: 0; font-size: 1.35rem; }
.album-empty p { max-width: 610px; margin: 8px auto 0; color: var(--muted); }

.gallery-page-cta { padding: 78px 0; color: #fff; background: linear-gradient(135deg, #061429, #08386b); }
.gallery-page-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 45px; }
.gallery-page-cta h2 { max-width: 720px; }
.gallery-page-cta .button { flex: 0 0 auto; }

.photo-lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; place-items: center; padding: 34px; background: rgba(1,7,17,.94); backdrop-filter: blur(14px); }
.photo-lightbox[hidden] { display: none; }
.photo-lightbox-panel { width: min(1180px, 100%); max-height: calc(100vh - 68px); margin: 0; overflow: hidden; color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 24px; background: #061429; box-shadow: 0 40px 100px rgba(0,0,0,.55); }
.photo-lightbox-panel img { width: 100%; max-height: calc(100vh - 180px); aspect-ratio: 16 / 9; object-fit: contain; background: #020915; }
.photo-lightbox-panel figcaption { padding: 17px 22px 20px; }
.photo-lightbox-panel figcaption p { margin: 0; color: #94c4ff; font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.photo-lightbox-panel figcaption h3 { margin: 1px 0 0; font-size: 1.22rem; }
.photo-lightbox-close, .photo-lightbox-nav { display: grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.09); backdrop-filter: blur(10px); transition: .2s ease; }
.photo-lightbox-close:hover, .photo-lightbox-nav:hover { background: rgba(255,255,255,.18); }
.photo-lightbox-close { position: absolute; top: 20px; right: 22px; width: 46px; height: 46px; border-radius: 50%; font-size: 1.8rem; }
.photo-lightbox-nav { width: 52px; height: 72px; border-radius: 15px; font-size: 2.5rem; }
.gallery-page.modal-open { overflow: hidden; }

@media (max-width: 1040px) {
  .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .gallery-page-hero { min-height: 700px; }
  .gallery-page-hero-content { padding-top: 135px; }
  .album-directory-heading, .album-viewer-heading { align-items: flex-start; flex-direction: column; }
  .album-filters { justify-content: flex-start; }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-page-cta-inner { align-items: flex-start; flex-direction: column; }
  .photo-lightbox { grid-template-columns: 54px minmax(0, 1fr) 54px; padding: 24px 12px; }
  .photo-lightbox-nav { width: 44px; height: 60px; }
}
@media (max-width: 580px) {
  .gallery-page-hero { min-height: 760px; }
  .gallery-page-hero-content { padding-top: 125px; }
  .gallery-page-hero h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .gallery-page-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .gallery-page-stats div:first-child { grid-column: 1 / -1; }
  .album-directory-section { padding: 78px 0 68px; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .album-card, .album-card img { min-height: 190px; }
  .album-card { border-radius: 15px; }
  .album-card-copy { inset: auto 13px 12px; }
  .album-card-copy strong { font-size: .91rem; }
  .album-card-copy small, .album-card-copy span { font-size: .58rem; }
  .album-card-badge { top: 9px; right: 9px; padding: 5px 7px; font-size: .54rem; }
  .album-viewer-section { padding: 72px 0 82px; }
  .photo-grid { grid-template-columns: 1fr; gap: 12px; }
  .photo-card { border-radius: 15px; }
  .photo-lightbox { grid-template-columns: 1fr; padding: 60px 12px 16px; }
  .photo-lightbox-panel { max-height: calc(100vh - 80px); border-radius: 17px; }
  .photo-lightbox-panel img { max-height: calc(100vh - 180px); }
  .photo-lightbox-nav { position: absolute; bottom: 24px; width: 48px; height: 48px; border-radius: 50%; z-index: 2; }
  .photo-lightbox-prev { left: 20px; }
  .photo-lightbox-next { right: 20px; }
  .photo-lightbox-panel figcaption { min-height: 82px; padding: 14px 75px 16px; text-align: center; }
  .photo-lightbox-close { top: 10px; right: 12px; }
}
