/* ═══════════════════════════════════════════
   Atena Living Modena — Room Pages
   Individual room styles: gallery, lightbox, floorplan
   ═══════════════════════════════════════════ */

/* --- Room Hero with watercolor painting --- */
.room-hero {
  position: relative;
}

.room-hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.room-hero .page-hero-content {
  text-align: center;
  flex: 1;
}

.room-hero-painting {
  flex-shrink: 0;
  width: 200px;
}

.room-hero-painting img {
  width: 100%;
  display: block;
  border: 5px solid rgba(201, 169, 110, 0.3);
  border-radius: 3px;
  transform: rotate(3deg);
  box-shadow: 0 8px 30px rgba(42, 37, 32, 0.15);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.room-hero-painting img:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 12px 40px rgba(42, 37, 32, 0.2);
}

.room-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
}

@media (max-width: 768px) {
  .room-hero .page-hero-content {
    text-align: center;
  }

  .room-hero-painting {
    display: none;
  }
}

.room-hero--tortellino { border-bottom: 3px solid var(--tortellino); }
.room-hero--bensone { border-bottom: 3px solid var(--bensone); }
.room-hero--ghirlandina { border-bottom: 3px solid var(--ghirlandina); }
.room-hero--duomo { border-bottom: 3px solid var(--duomo); }

/* --- Room Page Layout --- */
.room-page {
  max-width: 950px;
}

.room-page section {
  margin-bottom: 4rem;
}

.room-page h2 {
  text-align: center;
}

/* --- Room Description --- */
.room-description {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.room-description-text p {
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
  line-height: 1.85;
}

.room-amenities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.room-amenity {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(201, 169, 110, 0.15);
  transition: all 0.3s ease;
}

.room-amenity:hover {
  border-color: var(--gold);
}

.room-amenity i {
  font-size: 1rem;
  color: var(--gold);
  width: 20px;
  text-align: center;
}

.room-amenity span {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--anthracite);
}

@media (max-width: 700px) {
  .room-description {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ═══════════════════════════════════════════
   FOTOGALLERY — Bento Grid
   ═══════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 0.5rem;
  margin-top: 2rem;
}

/* Prima foto: grande, occupa 2 colonne e 2 righe */
.gallery-item:first-child {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

/* Le due righe di foto piccole si dividono l'altezza della foto grande */
.gallery-grid {
  grid-template-rows: 1fr 1fr;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.4s ease;
}

/* Foto piccole: riempiono la cella senza bande */
.gallery-item:not(:first-child) {
  min-height: 0;
}

.gallery-item:not(:first-child) img {
  height: 100%;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Hover overlay con icona */
.gallery-item::after {
  content: '\f00e'; /* fa-magnifying-glass-plus */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0);
  background: rgba(42, 37, 32, 0);
  transition: all 0.4s ease;
  pointer-events: none;
  border-radius: 8px;
}

.gallery-item:hover::after {
  background: rgba(42, 37, 32, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

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

  .gallery-item:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .gallery-item:not(:first-child) img {
    height: 100%;
  }
}

/* ═══════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(42, 37, 32, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 1rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--gold-light);
  transform: scale(1.1);
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.8rem;
}

.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

/* ═══════════════════════════════════════════
   PLANIMETRIA INTERATTIVA
   ═══════════════════════════════════════════ */
.floorplan-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--warm-gray-light);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.floorplan-container {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
}

.floorplan-container img {
  width: 100%;
  display: block;
}

/* SVG overlay */
.floorplan-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Clickable hotspot polygon */
.floorplan-hotspot {
  fill: rgba(201, 169, 110, 0.05);
  stroke: rgba(201, 169, 110, 0.3);
  stroke-width: 0.5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.floorplan-hotspot:hover {
  fill: rgba(201, 169, 110, 0.18);
  stroke: var(--gold);
  stroke-width: 1;
}

/* Hotspot label (HTML overlay) */
.floorplan-label {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--anthracite);
  background: rgba(247, 244, 239, 0.88);
  border: 1px solid rgba(201, 169, 110, 0.35);
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(42, 37, 32, 0.08);
}

/* Floorplan photo popup */
.floorplan-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 1500;
  max-width: 600px;
  width: 90vw;
  background: var(--white-soft);
  padding: 8px;
  box-shadow: 0 20px 60px rgba(42, 37, 32, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.floorplan-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.floorplan-popup img {
  width: 100%;
  display: block;
}

.floorplan-popup-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  background: var(--anthracite);
  color: var(--gold);
  border: none;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.floorplan-popup-close:hover {
  background: var(--gold);
  color: var(--white-soft);
}

.floorplan-popup-prev,
.floorplan-popup-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--anthracite);
  color: var(--gold);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.floorplan-popup-prev { left: -18px; }
.floorplan-popup-next { right: -18px; }

.floorplan-popup-prev:hover,
.floorplan-popup-next:hover {
  background: var(--gold);
  color: var(--white-soft);
}

.floorplan-popup-counter {
  display: block;
  text-align: center;
  padding: 0.5rem 0 0.2rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--warm-gray-light);
}

.floorplan-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 37, 32, 0.4);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.floorplan-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Placeholder */
.floorplan-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.floorplan-placeholder i {
  font-size: 2rem;
  color: rgba(0, 0, 0, 0.12);
}

.floorplan-placeholder span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════
   ROOM CTA
   ═══════════════════════════════════════════ */
.room-cta {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.room-cta p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--warm-gray);
}
