/* Gallery-specific styles. Shared controls and typography are in styles.css. */

/* Gallery page layout */
.photo-page {
  padding-top: 40px;
  padding-bottom: 70px;
}

.photo-page h1 {
  font-size: clamp(2.5rem,5vw,4.8rem);
  line-height: 1.05;
  max-width: 900px;
  margin: 20px 0;
}

.photo-intro {
  max-width: 720px;
  font-size: 1.2rem;
}

/* Category filters */
.photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 18px;
}

.gallery-filter {
  border: 1px solid #b5c9da;
  border-radius: 30px;
  padding: 11px 19px;
  background: white;
  color: #102b46;
  font: inherit;
  cursor: pointer;
}

.gallery-filter[aria-pressed=true] {
  background: #102b46;
  color: white;
  border-color: #102b46;
}

.photo-count {
  color: #496579;
  font-size: .95rem;
}

/* Photo sections and cards */
.photo-category {
  margin: 45px 0 60px;
}

.photo-category[hidden] {
  display: none;
}

.photo-category h2 {
  font-size: 1.8rem;
  margin-bottom: 22px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 26px;
}

.photo-card {
  margin: 0;
  min-width: 0;
}

.photo-open {
  display: block;
  position: relative;
  background: #edf4fa;
  border-radius: 12px;
  overflow: hidden;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .3s;
}

.photo-open:hover img {
  transform: scale(1.025);
}

.photo-enlarge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #fff;
  color: #102b46;
  padding: 7px 10px;
  border-radius: 20px;
  font-size: .8rem;
}

.photo-card figcaption {
  padding-top: 12px;
  color: #496579;
}

.photo-cta {
  border-top: 1px solid #b5c9da;
  padding: 38px 0;
}

/* Photo lightbox */
.photo-dialog {
  border: 0;
  border-radius: 14px;
  background: #102b46;
  color: white;
  width: min(1100px,94vw);
  max-height: 94vh;
  padding: 20px;
}

.photo-dialog::backdrop {
  background: #061522d9;
}

.photo-dialog img {
  width: 100%;
  height: 65vh;
  object-fit: contain;
  display: block;
}

.photo-dialog p {
  text-align: center;
  margin: 12px;
}

.photo-dialog button {
  font: inherit;
  background: white;
  color: #102b46;
  border: 0;
  border-radius: 24px;
  padding: 10px 18px;
  cursor: pointer;
}

.photo-close {
  display: block;
  margin-left: auto;
  margin-bottom: 12px;
}

.photo-dialog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.photo-position {
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #4f8cbd;
  outline-offset: 4px;
}

@media(max-width:1000px) {
  .photo-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media(max-width:600px) {
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .photo-page {
    padding-top: 25px;
  }

  .gallery-filter {
    font-size: .9rem;
    padding: 9px 13px;
  }

  .photo-dialog {
    padding: 12px;
  }

  .photo-dialog img {
    height: 55vh;
  }
}

@media(prefers-reduced-motion:reduce) {
  .photo-card img {
    transition: none;
  }
}

@media(max-width:600px) {
  .photo-page {
    padding-top: 8px;
  }

  .photo-page .service-breadcrumb {
    padding-block: 10px;
    margin-bottom: 10px;
  }

  .photo-page>.eyebrow {
    margin-bottom: 8px;
  }

  .photo-page h1 {
    font-size: 2.15rem;
    line-height: 1.08;
    margin: 10px 0 12px;
  }

  .photo-intro {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    max-width: 34ch;
  }

  .photo-filters {
    gap: 7px;
    margin: 18px 0 10px;
  }

  .gallery-filter {
    min-height: 44px;
    font-size: .8rem;
    padding: 9px 11px;
    line-height: 1.2;
  }

  .photo-count {
    font-size: .85rem;
    margin: 10px 0 0;
  }

  .photo-category {
    margin: 24px 0 36px;
  }

  .photo-category h2 {
    font-size: 1.5rem;
    margin: 0 0 14px;
  }

  .photo-card figcaption {
    padding-top: 9px;
    font-size: .95rem;
  }
}
