/*
  Astraea House gallery page layout refinement.

  Image first, smaller heading below, tighter artwork padding,
  and centred apartment gallery tiles.
*/

.gallery-image-first {
  padding-top: clamp(0.55rem, 1.6vw, 1.1rem);
  padding-bottom: clamp(1.1rem, 3vw, 2rem);
}

.gallery-feature-panel.visual-card,
.gallery-feature-panel.visual-card.concept-loaded,
.gallery-feature-panel.visual-card:has(.concept-slot.has-concept) {
  width: min(980px, 100%);
  min-height: auto !important;
  margin: 0 auto;
  padding: clamp(0.18rem, 0.65vw, 0.45rem) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.gallery-feature-panel .concept-slot--page {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  margin: 0 auto;
}

.gallery-feature-panel .concept-slot--page.has-concept .concept-img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(780px, calc(100vh - 128px)) !important;
  object-fit: contain !important;
}

.gallery-feature-panel .visual-name,
.gallery-feature-panel .visual-note {
  display: none !important;
}

.gallery-title-below {
  padding-top: clamp(0.4rem, 1vw, 0.9rem);
  padding-bottom: clamp(1.4rem, 3.5vw, 2.6rem);
}

.gallery-title-below-inner {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.gallery-title-below .breadcrumb {
  margin: 0 0 0.45rem;
}

.gallery-title-below .eyebrow {
  margin: 0 0 0.45rem;
}

.gallery-title-below .page-title {
  max-width: 850px;
  margin: 0 auto;
  font-size: clamp(1.85rem, 4.05vw, 3.45rem);
  line-height: 1.02;
}

.gallery-apartment-section {
  padding-top: clamp(1.3rem, 3vw, 2.5rem);
}

.gallery-apartment-heading {
  width: min(720px, 100%);
  margin: 0 auto clamp(1rem, 2.4vw, 1.6rem);
  text-align: center;
}

.gallery-apartment-heading .section-kicker {
  margin: 0;
}

.gallery-apartment-grid {
  align-items: stretch;
}

.gallery-apartment-grid .gallery-tile {
  min-height: 340px;
  padding: clamp(0.45rem, 1vw, 0.75rem);
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.65rem;
}

.gallery-apartment-grid .gallery-tile .concept-slot {
  margin: 0 auto 0.45rem;
}

.gallery-apartment-grid .gallery-tile .concept-slot--gallery {
  width: min(14rem, 94%);
}

.gallery-apartment-grid .gallery-tile span {
  text-align: center;
}

@media (max-width: 920px) {
  .gallery-feature-panel.visual-card,
  .gallery-feature-panel.visual-card.concept-loaded,
  .gallery-feature-panel.visual-card:has(.concept-slot.has-concept) {
    width: min(820px, 100%);
  }

  .gallery-feature-panel .concept-slot--page.has-concept .concept-img {
    max-height: min(720px, calc(100vh - 118px)) !important;
  }

  .gallery-title-below .page-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
  }

  .gallery-apartment-grid .gallery-tile {
    min-height: 310px;
  }
}

@media (max-width: 560px) {
  .gallery-image-first {
    padding-top: 0.45rem;
  }

  .gallery-feature-panel.visual-card,
  .gallery-feature-panel.visual-card.concept-loaded,
  .gallery-feature-panel.visual-card:has(.concept-slot.has-concept) {
    width: 100%;
    padding: 0.25rem !important;
    border-radius: 24px;
  }

  .gallery-feature-panel .concept-slot--page.has-concept .concept-img {
    max-height: min(650px, calc(100vh - 108px)) !important;
  }

  .gallery-title-below {
    padding-top: 0.4rem;
  }

  .gallery-title-below .page-title {
    font-size: clamp(1.65rem, 8.2vw, 2.6rem);
  }

  .gallery-apartment-grid .gallery-tile {
    min-height: 280px;
  }

  .gallery-apartment-grid .gallery-tile .concept-slot--gallery {
    width: min(12rem, 94%);
  }
}
