/* ============================================================
   MEYRA — Sección Patio: grid collage + scroll reveal
   ============================================================ */

#patio .section__header { margin-bottom: 36px; }

.patio__title {
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: 14px;
}

.patio__intro {
  max-width: 540px;
  margin: 0 auto;
}

/* ─── Grid ─── */
.patio-grid {
  display: grid;
  grid-template-columns: 58% 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 580px;
  border-radius: 8px;
  overflow: hidden;
}

.patio-grid__main {
  grid-column: 1;
  grid-row: 1 / 3;
  margin: 0;
}

.patio-grid__small {
  margin: 0;
}

/* figure y picture deben llenar su celda del grid */
.patio-grid figure,
.patio-grid figure picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* Contiene el zoom del hover dentro del marco sin desbordarse */
.patio-grid figure {
  overflow: hidden;
}

/* Especificidad mayor que base.css (img { height: auto }) */
.patio-grid figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.patio-grid figure {
  cursor: pointer;
}

.patio-grid figure:hover img {
  transform: scale(1.06);
}

/* Sin hover en dispositivos touch */
@media (hover: none) {
  .patio-grid figure:hover img {
    transform: none;
  }
}

/* ─── Scroll reveal ─── */
.patio-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease var(--delay, 0s),
              transform 0.7s ease var(--delay, 0s);
}

.patio-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Tablet ─── */
@media (min-width: 768px) and (max-width: 1024px) {
  .patio-grid { height: 420px; }
}

/* ─── Mobile ─── */
@media (max-width: 767px) {
  .patio-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 150px 150px;
    height: auto;
  }

  .patio-grid__main {
    grid-column: 1 / 3;
    grid-row: 1;
  }
}

/* ─── Modal patio ─── */
.patio-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 9, 3, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.patio-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Slider ocupa todo el overlay */
.patio-modal__slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Cada slot cubre todo el slider y centra su imagen */
.patio-modal__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patio-modal__img {
  max-width: min(920px, 90vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.patio-modal__close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.patio-modal__close:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Dots */
.patio-modal__dots {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 1;
}

.patio-modal__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  padding: 0;
  transition: background 0.22s ease, transform 0.22s ease;
}

.patio-modal__dot.is-active {
  background: #fff;
  transform: scale(1.28);
}

/* Swipe hint */
.patio-modal__hint {
  position: fixed;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 7px 18px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1;
}

.patio-modal__hint.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Flechas de navegación — solo en desktop (pointer: fine) */
.patio-modal__nav {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.18s, border-color 0.18s;
  padding: 0;
  z-index: 10001;
}
.patio-modal__nav--prev { left: 20px; }
.patio-modal__nav--next { right: 20px; }
.patio-modal__nav:hover {
  background: rgba(255, 255, 255, 0.30);
  border-color: rgba(255, 255, 255, 0.75);
}
@media (pointer: fine) {
  .patio-modal__nav  { display: flex; }
  .patio-modal__hint { display: none !important; }
}
