/* Gallery page */
.gallery-hero {
  background-image: url('https://www.maroonavecb.com/wp-content/uploads/2026/03/Guestbr1-scaled.jpg');
  background-position: center 52%;
}

.gallery-hero::before {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.24));
}

.gallery-hero .hero-content {
  text-align: left;
}

.gallery-hero .hero-subtitle {
  margin-left: 0;
}

@media (max-width: 768px) {
  section.hero.gallery-hero {
    background-image: url('https://www.maroonavecb.com/wp-content/uploads/2026/03/Guestbr1-scaled.jpg');
    background-position: center 52%;
  }
}

section.content.cabin-gallery-section {
  padding: 34px var(--section-gutter) 78px;
  background: rgba(245, 242, 236, 0.86);
  overflow: hidden;
}

section.content.cabin-gallery-section::before {
  display: none;
}

.gallery-intro {
  position: relative;
  z-index: 1;
  width: min(100%, 960px);
  margin: 0 auto 34px;
  color: var(--text);
}

.frontend-page-gallery section.content {
  padding-left: 20px;
  padding-right: 20px;
}

section.content.cabin-gallery-section .cabin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
  width: min(100%, 1100px);
  margin: 0 auto;
  background: transparent;
}

section.content.cabin-gallery-section .cabin-gallery-grid img {
  height: 230px;
  transition: transform 0.28s ease;
}

section.content.cabin-gallery-section .cabin-gallery-grid a:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

section.content.cabin-gallery-section .cabin-gallery-grid a:first-child img {
  height: 476px;
}

section.content.cabin-gallery-section .cabin-gallery-grid a:hover img {
  transform: scale(1.035);
}

section.content.cabin-gallery-section .cabin-gallery-grid a:focus-visible {
  outline: 3px solid rgba(166, 124, 82, 0.45);
  outline-offset: 3px;
}

.gallery-booking-note {
  width: min(100%, 920px);
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  text-align: center;
}

.gallery-booking-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.gallery-booking-note a:hover,
.gallery-booking-note a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

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

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 16, 0.82);
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  max-height: calc(100vh - 56px);
  display: grid;
  align-items: center;
}

.gallery-lightbox figure {
  margin: 0;
  display: grid;
  gap: 12px;
}

.gallery-lightbox-image {
  width: 100%;
  max-height: calc(100vh - 150px);
  display: block;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  background: #111111;
}

.gallery-lightbox-caption {
  justify-self: center;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible {
  background: rgba(166, 124, 82, 0.92);
}

.gallery-lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-lightbox-prev {
  left: -62px;
}

.gallery-lightbox-next {
  right: -62px;
}

.gallery-lightbox-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .frontend-page-gallery > section.content.cabin-gallery-section {
    padding-top: 16px !important;
  }

  section.content.cabin-gallery-section .cabin-gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    row-gap: 16px;
  }

  section.content.cabin-gallery-section .cabin-gallery-grid a:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  section.content.cabin-gallery-section .cabin-gallery-grid a:first-child img,
  section.content.cabin-gallery-section .cabin-gallery-grid img {
    height: auto;
    max-height: 360px;
  }

  .gallery-lightbox {
    padding: 18px;
  }

  .gallery-lightbox-close {
    top: 8px;
    right: 8px;
  }

  .gallery-lightbox-nav {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .gallery-lightbox-prev {
    left: 22px;
  }

  .gallery-lightbox-next {
    right: 22px;
  }

  .gallery-lightbox-caption {
    margin-bottom: 64px;
  }
}
