/* El Reino del Escape — hoja de estilos compartida (estilo original extendido) */
:root {
  --gold: #d0a15a;
  --gold-soft: #b98542;
  --ink: rgba(19, 11, 6, 0.9);
  --panel: rgba(31, 19, 11, 0.64);
  --line: rgba(208, 161, 90, 0.35);
  --text: #f2e5d2;
  --text-soft: #d8c1a1;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: #120b07;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Escena de fondo ---------- */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(rgba(8, 5, 3, 0.38), rgba(8, 5, 3, 0.58)),
    #120b07;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-position: center 55%;
  background-repeat: no-repeat;
  background-size: cover;
}

.bg-base {
  background-image: url("/assets/fondo-reino.webp");
  filter: saturate(0.95) brightness(0.78);
  transition: background-image 0.35s ease-in-out;
}

.bg-glow {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 186, 92, 0.14), transparent 16%),
    radial-gradient(circle at 88% 22%, rgba(255, 186, 92, 0.12), transparent 16%),
    radial-gradient(circle at 15% 78%, rgba(255, 186, 92, 0.08), transparent 16%),
    radial-gradient(circle at 86% 74%, rgba(255, 186, 92, 0.08), transparent 16%);
  mix-blend-mode: screen;
}

.bg-vignette {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.5), transparent 14%, transparent 86%, rgba(0,0,0,0.52)),
    linear-gradient(180deg, rgba(0,0,0,0.36), transparent 14%, transparent 86%, rgba(0,0,0,0.46));
}

/* ---------- Marco general ---------- */
.page {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.frame {
  position: relative;
  background: linear-gradient(rgba(33, 20, 12, 0.48), rgba(16, 10, 6, 0.7));
  border: 1px solid rgba(180, 130, 70, 0.18);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding-bottom: 24px;
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.frame::before {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.55), transparent 12%, transparent 88%, rgba(0,0,0,0.55)),
    linear-gradient(180deg, rgba(0,0,0,0.45), transparent 14%, transparent 86%, rgba(0,0,0,0.55));
  z-index: 0;
}

.frame::after {
  border: 1px solid rgba(208, 161, 90, 0.08);
  margin: 18px;
  inset: 18px;
  z-index: 0;
}

.content {
  position: relative;
  z-index: 1;
  padding: 0 52px;
}

/* ---------- Cabecera y navegación ---------- */
header { padding-top: 24px; text-align: center; }

.brand {
  display: inline-block;
  padding: 10px 28px 8px;
  border-bottom: 2px solid rgba(208, 161, 90, 0.45);
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  text-decoration: none;
}

.brand .brand-title {
  margin: 0;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.03em;
  color: #f0d2a1;
  font-weight: 700;
}

.brand .brand-sub {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: clamp(0.95rem, 1.5vw, 1.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

nav.main-nav {
  margin: 18px auto 12px;
  max-width: 860px;
  background: linear-gradient(180deg, rgba(36, 24, 16, 0.88), rgba(21, 14, 9, 0.88));
  border-top: 1px solid rgba(208, 161, 90, 0.28);
  border-bottom: 1px solid rgba(208, 161, 90, 0.28);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

nav.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav.main-nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 14px 18px;
  font-size: clamp(0.95rem, 1.35vw, 1.2rem);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: #ffd9a0;
  background: rgba(208, 161, 90, 0.08);
}

/* ---------- Secciones ---------- */
.section {
  max-width: 760px;
  margin: 26px auto 0;
  text-align: center;
  padding: 10px 0 0;
  scroll-margin-top: 100px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 10px 0 22px;
  color: #f0d2a1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.section-title::before,
.section-title::after {
  content: "";
  width: min(170px, 18vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(208,161,90,0.7), transparent);
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.1;
}

.section-panel {
  background: linear-gradient(180deg, rgba(24, 15, 9, 0.62), rgba(15, 9, 5, 0.48));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 22px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), inset 0 -1px 0 rgba(255,255,255,0.03);
  text-align: left;
}

.section-panel.centered { text-align: center; }

.section-panel h3 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  color: var(--text);
}

.section-panel p {
  margin: 0 0 14px;
  font-size: clamp(1.02rem, 1.6vw, 1.3rem);
  color: var(--text-soft);
  line-height: 1.7;
}

.section-panel p:last-child { margin-bottom: 0; }
.section-panel a { color: #f3d4a4; }

.lead {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem) !important;
  color: var(--text) !important;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  margin-top: 12px;
  border: 1px solid rgba(208, 161, 90, 0.45);
  background: linear-gradient(rgba(70, 45, 24, 0.95), rgba(45, 28, 14, 0.95));
  color: #f3d4a4;
  padding: 12px 26px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn:hover {
  background: linear-gradient(rgba(88, 56, 28, 0.95), rgba(56, 34, 16, 0.95));
}

.btn-row { text-align: center; }
.btn-row .btn { margin: 12px 8px 0; }

/* ---------- Tarjetas de sala (portada) ---------- */
.room-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 8px;
}

.room-card {
  background: linear-gradient(180deg, rgba(22, 14, 9, 0.9), rgba(15, 10, 6, 0.9));
  border: 1px solid rgba(208, 161, 90, 0.4);
  box-shadow: 0 18px 30px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.room-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) brightness(0.85);
}

.room-card .room-body { padding: 18px 18px 22px; display: flex; flex-direction: column; flex: 1; }
.room-card h3 { margin: 0 0 8px; color: #f0d2a1; font-size: 1.5rem; }
.room-card p { margin: 0 0 12px; color: var(--text-soft); line-height: 1.6; flex: 1; }
.room-card .btn { align-self: center; }

/* ---------- Ficha técnica ---------- */
.ficha {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(208,161,90,0.22);
  border: 1px solid rgba(208,161,90,0.35);
  margin: 6px 0 4px;
}

.ficha > div {
  background: linear-gradient(180deg, rgba(24, 15, 9, 0.92), rgba(15, 9, 5, 0.92));
  padding: 14px 10px;
  text-align: center;
}

.ficha dt {
  margin: 0 0 4px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.ficha dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0d2a1;
}

/* ---------- Tabla de precios ---------- */
table.precios {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 10px;
  background: linear-gradient(180deg, rgba(22, 14, 9, 0.92), rgba(15, 10, 6, 0.92));
  border: 2px solid rgba(208,161,90,0.5);
}

table.precios th,
table.precios td {
  border: 1px solid rgba(208,161,90,0.25);
  padding: 12px 10px;
  text-align: center;
  font-size: 1.05rem;
}

table.precios th {
  color: #f3d4a4;
  background: rgba(208,161,90,0.08);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

table.precios td { color: var(--text); }

/* ---------- FAQ (details) ---------- */
details.faq {
  border: 1px solid rgba(208,161,90,0.3);
  background: linear-gradient(180deg, rgba(24, 15, 9, 0.8), rgba(15, 9, 5, 0.8));
  margin: 0 0 10px;
}

details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-weight: 700;
  color: #f0d2a1;
  font-size: 1.08rem;
  position: relative;
  padding-right: 40px;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
  content: "▾";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: var(--gold);
}

details.faq[open] summary::after { transform: translateY(-50%) rotate(180deg); }

details.faq .faq-body {
  padding: 0 18px 16px;
  color: var(--text-soft);
  line-height: 1.7;
}
details.faq .faq-body p { margin: 0 0 10px; font-size: 1.02rem; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Listas dentro de paneles ---------- */
.section-panel ul.marcada {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text-soft);
  line-height: 1.8;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.section-panel ul.marcada li::marker { color: var(--gold); }

/* ---------- Pasos (cómo funciona) ---------- */
.pasos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
}

.paso {
  border: 1px solid rgba(208,161,90,0.3);
  background: linear-gradient(180deg, rgba(24, 15, 9, 0.8), rgba(15, 9, 5, 0.8));
  padding: 18px 14px;
}

.paso .num {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid rgba(208,161,90,0.5);
  border-radius: 50%;
  color: #f0d2a1;
  font-weight: 700;
  margin-bottom: 10px;
}

.paso h4 { margin: 0 0 6px; color: #f0d2a1; font-size: 1.15rem; }
.paso p { margin: 0; font-size: 0.98rem !important; }

/* ---------- Calendario (original) ---------- */
.calendar-wrap { display: flex; justify-content: center; align-items: center; padding-top: 8px; }

.calendar-card {
  width: min(100%, 420px);
  background: linear-gradient(180deg, rgba(22, 14, 9, 0.94), rgba(15, 10, 6, 0.94));
  border: 2px solid rgba(208,161,90,0.5);
  box-shadow: 0 18px 30px rgba(0,0,0,0.35);
  overflow: hidden;
}

.calendar-head {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  border-bottom: 1px solid rgba(208,161,90,0.3);
  color: #f0d2a1;
  font-size: 1.5rem;
  font-weight: 700;
  min-height: 54px;
  text-align: center;
}

.calendar-nav { border: 0; background: transparent; color: inherit; font-size: 1.35rem; cursor: pointer; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.day-name, .day-cell {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(208,161,90,0.22);
  border-bottom: 1px solid rgba(208,161,90,0.22);
  font-size: 1.12rem;
}

.day-name:nth-child(7n), .day-cell:nth-child(7n) { border-right: 0; }
.day-name { color: #f3d4a4; font-weight: 700; background: rgba(208,161,90,0.06); }
.day-cell { color: var(--text); }
.day-cell.muted { color: rgba(242,229,210,0.32); }
.day-cell.today {
  background: rgba(208,161,90,0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 162, 0.5);
  font-weight: 700;
}

/* ---------- Contacto ---------- */
.contact-links { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.contact-links a { color: #f3d4a4; text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }

/* ---------- Figura de ambientación ---------- */
.hero-figure { margin: 0 0 16px; }
.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(208,161,90,0.4);
  box-shadow: 0 18px 30px rgba(0,0,0,0.35);
  filter: saturate(0.95) brightness(0.9);
}
.hero-figure figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-soft);
  text-align: center;
  font-style: italic;
}

/* ---------- Mapa ---------- */
.map-wrap {
  border: 2px solid rgba(208,161,90,0.5);
  box-shadow: 0 18px 30px rgba(0,0,0,0.35);
  margin: 6px 0 14px;
  background: rgba(15, 10, 6, 0.9);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  filter: saturate(0.9);
}

/* ---------- Pie ---------- */
footer {
  max-width: 760px;
  margin: 42px auto 0;
  text-align: center;
  color: rgba(242,229,210,0.82);
  padding: 18px 14px 0;
  border-top: 1px solid rgba(208,161,90,0.22);
}

.footer-contact { margin-bottom: 12px; line-height: 1.8; font-size: 0.98rem; }
.footer-contact a { color: #f3d4a4; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 14px 18px;
  flex-wrap: wrap;
}

.footer-links a { color: var(--text-soft); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: #f3d4a4; }

.footer-copy { margin-top: 14px; font-size: 0.9rem; }

/* ---------- Aviso "Próximamente" ---------- */
.opening-notice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 4, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.opening-notice-box {
  width: min(100%, 560px);
  background: linear-gradient(rgba(32, 20, 12, 0.96), rgba(18, 11, 7, 0.96));
  border: 1px solid rgba(208, 161, 90, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  padding: 28px 24px;
  text-align: center;
  color: var(--text);
}

.opening-notice-box h2 {
  margin: 0 0 16px;
  color: #f0d2a1;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}

.opening-eyebrow {
  margin: 0 0 6px !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold) !important;
}

.opening-hook {
  color: var(--text) !important;
  font-weight: 700;
}

.opening-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.opening-actions .btn { margin-top: 8px; }

.btn-link {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: 0;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.98rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-link:hover { color: #f3d4a4; }

@media (max-width: 480px) {
  .opening-actions { flex-direction: column; }
  .opening-actions .btn { width: 100%; }
}

.opening-notice-box p {
  margin: 0 0 14px;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}

.opening-notice-overlay.hidden { display: none; }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10000;
  display: none;
  padding: 16px;
  background: linear-gradient(rgba(32, 20, 12, 0.98), rgba(18, 11, 7, 0.98));
  border-top: 2px solid rgba(208, 161, 90, 0.5);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  color: var(--text);
}

.cookie-banner.visible { display: block; }

.cookie-inner {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-text { flex: 1 1 380px; }
.cookie-text h2 { margin: 0 0 6px; color: #f0d2a1; font-size: 1.25rem; }
.cookie-text p { margin: 0; color: var(--text-soft); font-size: 0.98rem; line-height: 1.6; }
.cookie-text a { color: #f3d4a4; }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-actions .btn { margin-top: 0; }

.btn-plain {
  border: 1px solid rgba(208, 161, 90, 0.35);
  background: transparent;
  color: var(--text-soft);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-plain:hover { color: #f3d4a4; border-color: rgba(208, 161, 90, 0.6); }

/* Panel de configuración */
.cookie-prefs {
  display: none;
  width: min(980px, 100%);
  margin: 0 auto 16px;
  border-top: 1px solid rgba(208, 161, 90, 0.28);
  padding-top: 16px;
}

.cookie-prefs.visible { display: block; }

.cookie-cat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(208, 161, 90, 0.15);
}

.cookie-cat:last-child { border-bottom: 0; }
.cookie-cat input[type="checkbox"] { margin-top: 5px; width: 18px; height: 18px; accent-color: #b98542; flex-shrink: 0; }
.cookie-cat label { font-weight: 700; color: #f0d2a1; cursor: pointer; display: block; margin-bottom: 3px; }
.cookie-cat p { margin: 0; color: var(--text-soft); font-size: 0.93rem; line-height: 1.55; }
.cookie-cat .locked { color: var(--text-soft); font-weight: 400; font-size: 0.88rem; }

/* Enlace del pie para reabrir preferencias */
.cookie-reopen {
  background: none;
  border: 0;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0;
}
.cookie-reopen:hover { color: #f3d4a4; }

@media (max-width: 640px) {
  .cookie-actions { width: 100%; }
  .cookie-actions .btn, .cookie-actions .btn-plain { flex: 1 1 auto; text-align: center; }
}

/* ---------- Accesibilidad ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #ffd9a0;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .content { padding: 0 24px; }
  .bg-layer { background-size: cover; background-position: center center; }
  .pasos { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page { width: calc(100% - 16px); padding-top: 8px; }
  .content { padding: 0 12px; }
  .brand { padding-inline: 12px; }
  nav.main-nav a { padding: 12px 12px; }
  .section-panel { padding-inline: 14px; }
  .room-cards { grid-template-columns: 1fr; }
  .ficha { grid-template-columns: repeat(2, 1fr); }
  .day-name, .day-cell { min-height: 42px; font-size: 1rem; }
}
