/* ============================================================
   KILBOURNE LODGE — Gallery Page Styles
   ============================================================ */

/* ---- Page Header ---- */
.gallery-page { padding-top: 0; }

.gallery-page-header {
  position: relative;
  height: 45vh;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.gallery-page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
}
.gallery-page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,25,28,0.85) 0%, rgba(15,25,28,0.3) 100%);
}
.gallery-page-header-content {
  position: relative;
  z-index: 2;
  padding: 48px 40px;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}
.gallery-page-header-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 8px 0 12px;
}
.gallery-page-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.7) !important;
}
.back-link {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  display: inline-block;
  margin-bottom: 16px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--white); }

/* ---- Carousel ---- */
.carousel-section {
  background: var(--navy);
  padding: 0;
}
.carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/7;
  max-height: 520px;
}
.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  overflow: hidden;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.carousel-btn:hover { background: rgba(255,255,255,0.28); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
}
.carousel-dot.active {
  background: var(--amber);
  transform: scale(1.3);
}

/* ---- Room Tabs & Grid ---- */
.room-gallery {
  padding: 60px 40px 80px;
  background: var(--cream);
  max-width: 100%;
}
.room-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: var(--max-width);
  margin: 0 auto 40px;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 0;
}
.tab {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab:hover { color: var(--navy); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }

.room-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: var(--max-width);
  margin: 0 auto;
}
@media (min-width: 600px)  { .room-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .room-grid { grid-template-columns: repeat(4, 1fr); } }

.room-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  background: var(--cream-dark);
  position: relative;
}
.room-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.room-item:hover img { transform: scale(1.05); }
.room-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27,42,44,0);
  transition: background var(--transition);
}
.room-item:hover::after { background: rgba(27,42,44,0.15); }
.room-item.hidden { display: none; }

/* ---- Floor Plan ---- */
.floorplan-section {
  background: var(--white);
  padding: 80px 40px;
}
.floorplan-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.floorplan-inner .section-header { margin-bottom: 40px; }
.floorplan-inner .section-header h2 { color: var(--navy); }
.floorplan-desc {
  margin-top: 12px;
  max-width: 580px;
}
.floorplan-img {
  max-width: 820px;
  margin: 0 auto 40px;
  background: var(--cream);
  padding: 32px;
  border: 1px solid var(--cream-dark);
}
.floorplan-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.floorplan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  max-width: 820px;
  margin: 0 auto;
}
.legend-item {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

/* ---- Gallery Book CTA ---- */
.gallery-book-cta {
  background: var(--cream-dark);
  padding: 80px 40px;
  text-align: center;
}
.gallery-book-cta .eyebrow { display: block; margin-bottom: 12px; }
.gallery-book-cta h2 { color: var(--navy); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,15,18,0.94);
  z-index: 999;
  display: none;
  cursor: pointer;
}
.lightbox-backdrop.active { display: block; }
.lightbox-img-wrap {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  z-index: 1002;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.lightbox-close:hover { color: var(--white); }
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--white);
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5) !important;
  white-space: nowrap;
}
.lightbox-share {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  display: flex;
  gap: 8px;
}
.lightbox-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.80);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.lightbox-share-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.50);
  color: var(--white);
}

/* ---- Nav active state override for scrolled-always nav ---- */
.nav.scrolled .nav-links .active { color: var(--amber); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .gallery-page-header-content { padding: 40px 24px; }
  .room-gallery { padding: 48px 20px 60px; }
  .carousel { aspect-ratio: 4/3; }
  .floorplan-section { padding: 60px 24px; }
  .gallery-book-cta { padding: 60px 24px; }
  .tab { padding: 10px 14px; font-size: 0.62rem; }
}
