/* ==========================================================================
   Hotel El Cortijo de Daimiel — estilos propios sobre Bootstrap 5
   Paleta tomada del edificio: cal blanca, zócalo añil, teja y madera.
   ========================================================================== */

/* ===== VARIABLES ===== */
:root {
  --color-primary: #24448f;        /* añil del zócalo */
  --color-primary-hover: #1b3472;
  --color-accent: #b0522a;         /* teja / barro cocido */
  --color-accent-hover: #934321;
  --color-dark: #1b2a4e;           /* azul noche para barra y pie */
  --color-surface: #ffffff;
  --color-bg: #faf7f2;             /* blanco cal */
  --color-text: #1f2937;
  --color-text-muted: #5b6472;
  --color-border: #e7e0d5;
  --radius: 0.75rem;
  --shadow: 0 1px 3px rgba(27, 42, 78, 0.08), 0 8px 24px rgba(27, 42, 78, 0.06);
  --nav-h: 76px;

  --bs-body-font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  --bs-body-color: var(--color-text);
  --bs-body-bg: var(--color-bg);
  --bs-primary: var(--color-primary);
  --bs-primary-rgb: 36, 68, 143;
  --bs-link-color-rgb: 36, 68, 143;
  --bs-link-hover-color-rgb: 27, 52, 114;
  --bs-border-color: var(--color-border);
}

/* ===== BASE ===== */
html { scroll-padding-top: var(--nav-h); }
body { line-height: 1.65; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.lead { font-size: 1.15rem; }
img { max-width: 100%; height: auto; }
a, .btn, .card, .photo img, .tile img { transition: all 0.2s ease-out; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: 0.5rem 1rem; border-radius: var(--radius); }
.section { padding: clamp(3rem, 2rem + 5vw, 6rem) 0; }
.section--alt { background: var(--color-surface); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.75rem; }
.text-muted { color: var(--color-text-muted) !important; }

/* ===== BOTONES ===== */
.btn { font-weight: 600; border-radius: 999px; padding-inline: 1.25rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn-primary { --bs-btn-bg: var(--color-primary); --bs-btn-border-color: var(--color-primary); --bs-btn-hover-bg: var(--color-primary-hover); --bs-btn-hover-border-color: var(--color-primary-hover); --bs-btn-active-bg: var(--color-primary-hover); --bs-btn-active-border-color: var(--color-primary-hover); --bs-btn-disabled-bg: var(--color-primary); --bs-btn-disabled-border-color: var(--color-primary); }
.btn-outline-primary { --bs-btn-color: var(--color-primary); --bs-btn-border-color: var(--color-primary); --bs-btn-hover-bg: var(--color-primary); --bs-btn-hover-border-color: var(--color-primary); --bs-btn-active-bg: var(--color-primary); --bs-btn-active-border-color: var(--color-primary); }
.btn-accent { --bs-btn-color: #fff; --bs-btn-bg: var(--color-accent); --bs-btn-border-color: var(--color-accent); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--color-accent-hover); --bs-btn-hover-border-color: var(--color-accent-hover); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--color-accent-hover); --bs-btn-active-border-color: var(--color-accent-hover); }

/* ===== NAVEGACIÓN ===== */
.site-nav { min-height: var(--nav-h); background: var(--color-dark); transition: background-color 0.25s ease-out, box-shadow 0.25s ease-out; }
/* Sobre la foto de cabecera la barra es transparente hasta que se hace scroll */
.site-nav.is-top { background: linear-gradient(rgba(10, 16, 32, 0.6), rgba(10, 16, 32, 0)); }
.site-nav:not(.is-top) { box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2); }
.site-nav .navbar-brand img { height: 52px; width: auto; }
.site-nav .nav-link { color: rgba(255, 255, 255, 0.9); font-weight: 500; font-size: 0.95rem; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: #fff; }
.site-nav .nav-link.active { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
@media (max-width: 991.98px) {
  /* Menú desplegado en móvil/tablet: fondo sólido para que se lea */
  .site-nav .navbar-collapse { background: var(--color-dark); margin: 0.5rem -0.75rem 0; padding: 0.5rem 1.25rem 1.25rem; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
  .site-nav .nav-link { padding: 0.7rem 0; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .site-nav .nav-link.active { text-decoration: none; color: #f0b79a; }
}

/* Idioma: nombre completo en el menú desplegable y en pantallas anchas; sigla en el resto */
.nav-lang__short { display: none; }
.site-nav .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1399.98px) {
  /* Escritorio estrecho: menú más compacto para que quepan todas las secciones */
  .nav-lang__short { display: inline; }
  .nav-lang__long { display: none; }
  .site-nav .navbar-brand { margin-right: 0.5rem; }
  .site-nav .navbar-brand img { height: 44px; }
  .site-nav .nav-link { font-size: 0.86rem; padding-inline: 0.42rem; }
  .site-nav .btn { padding: 0.4rem 0.9rem; font-size: 0.86rem; }
}
@media (min-width: 992px) and (max-width: 1099.98px) {
  .site-nav .nav-link { font-size: 0.8rem; padding-inline: 0.3rem; }
}

/* ===== PORTADA (HERO) ===== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; background: var(--color-dark); overflow: hidden; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease-out; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 16, 32, 0.82) 0%, rgba(10, 16, 32, 0.25) 55%, rgba(10, 16, 32, 0.15) 100%); }
.hero__body { position: relative; z-index: 2; padding-bottom: clamp(5.5rem, 12vh, 8rem); padding-top: 8rem; }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 4.4vw, 4.5rem); max-width: 16ch; text-wrap: balance; }
.hero .lead { max-width: 52ch; color: rgba(255, 255, 255, 0.92); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0; margin: 1.5rem 0 0; list-style: none; font-weight: 500; font-size: 0.95rem; }
.hero__facts i { color: #f0b79a; margin-right: 0.35rem; }
.hero__dots { position: absolute; z-index: 3; right: 1.25rem; bottom: 5.5rem; display: flex; gap: 0.5rem; }
.hero__dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; }
.hero__dots button[aria-current="true"] { background: #fff; }
@media (min-width: 768px) { .hero__dots { bottom: 2rem; right: 2rem; } }

/* ===== CABECERA DE PÁGINAS INTERIORES ===== */
.page-hero { position: relative; min-height: clamp(320px, 52vh, 520px); display: flex; align-items: flex-end; color: #fff; background: var(--color-dark); }
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 16, 32, 0.8), rgba(10, 16, 32, 0.2)); }
.page-hero__body { position: relative; z-index: 2; padding-top: 7rem; padding-bottom: 2.5rem; }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); text-wrap: balance; }
.page-hero .lead { max-width: 60ch; color: rgba(255, 255, 255, 0.92); }

/* ===== DATOS DESTACADOS ===== */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.facts > div { background: var(--color-surface); padding: 1.5rem 1rem; text-align: center; }
.facts strong { display: block; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.facts span { font-size: 0.9rem; color: var(--color-text-muted); }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* ===== MOSAICO DE ACCESOS (fotos con título encima) ===== */
.tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius); color: #fff; text-decoration: none; aspect-ratio: 4 / 3; background: var(--color-dark); }
.tile--tall { aspect-ratio: 3 / 4; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 16, 32, 0.8), rgba(10, 16, 32, 0) 60%); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile__body { position: absolute; z-index: 2; left: 1.25rem; right: 1.25rem; bottom: 1.1rem; }
.tile__body h3 { font-size: 1.35rem; margin: 0 0 0.15rem; }
.tile__body p { margin: 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.88); }
.tile:hover { color: #fff; }

/* ===== FOTOS ===== */
.rounded-photo { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.photo { display: block; overflow: hidden; border-radius: calc(var(--radius) * 0.75); aspect-ratio: 3 / 2; background: #e9e4da; cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo:hover img, .photo:focus-visible img { transform: scale(1.04); }
.photo-band { position: relative; min-height: clamp(280px, 48vw, 560px); color: #fff; display: flex; align-items: center; background: var(--color-dark); }
.photo-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-band::after { content: ""; position: absolute; inset: 0; background: rgba(10, 16, 32, 0.55); }
.photo-band .container { position: relative; z-index: 2; }

/* ===== TARJETAS Y LISTAS ===== */
.card { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-img-top { aspect-ratio: 3 / 2; object-fit: cover; }
.feature { display: flex; gap: 0.9rem; align-items: flex-start; }
.feature > i { flex: none; font-size: 1.5rem; color: var(--color-primary); width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: rgba(36, 68, 143, 0.08); border-radius: 50%; }
.feature h3 { font-size: 1.05rem; margin: 0.15rem 0 0.2rem; letter-spacing: 0; }
.feature p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding-left: 1.75rem; position: relative; margin-bottom: 0.5rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.9rem; height: 0.5rem; border-left: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(-45deg); }
.notice { border-left: 4px solid var(--color-accent); background: #fbefe8; padding: 1.1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; }
.info-table th { width: 45%; font-weight: 600; color: var(--color-text-muted); }

/* Acordeón de preguntas frecuentes */
.accordion { --bs-accordion-bg: var(--color-surface); --bs-accordion-border-color: var(--color-border); --bs-accordion-active-bg: #eef2fb; --bs-accordion-active-color: var(--color-primary-hover); --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(36, 68, 143, 0.25); --bs-accordion-border-radius: var(--radius); --bs-accordion-inner-border-radius: var(--radius); }
.accordion-button { font-weight: 600; }

/* Filtros de la galería */
.filters .btn { --bs-btn-padding-y: 0.4rem; }
.photo-grid [hidden] { display: none !important; }

/* ===== VALORACIONES ===== */
.ratings { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 2.5rem 0 2rem; }
.rating { display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; align-items: center; padding: 1rem 1.25rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg); color: var(--color-text); text-decoration: none; height: 100%; }
.rating:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--color-text); }
.rating > i { grid-row: span 3; font-size: 2rem; color: var(--color-primary); }
.rating__score { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--color-primary); }
.rating__score small { font-size: 0.9rem; font-weight: 500; color: var(--color-text-muted); }
.rating__name { font-weight: 600; }
.rating__count { font-size: 0.85rem; color: var(--color-text-muted); }
.ratings__note { text-align: center; font-size: 0.8rem; color: var(--color-text-muted); margin: 1rem 0 0; }

/* ===== LLAMADA A LA ACCIÓN ===== */
.cta { background: var(--color-dark); color: #fff; padding: clamp(3rem, 2rem + 4vw, 5rem) 0; }
.cta__mobiles { margin: 1.25rem 0 0; color: rgba(255, 255, 255, 0.85); }
.cta__mobiles a { color: #fff; }
.cta__mobiles > i, .cta .wa-link { color: #4fd68a !important; }
.cta .lead { color: rgba(255, 255, 255, 0.85); max-width: 56ch; margin-inline: auto; }

/* ===== MAPA (se carga al pulsar, sin cookies previas) ===== */
.map { position: relative; aspect-ratio: 16 / 10; max-height: 480px; width: 100%; border-radius: var(--radius); overflow: hidden; background: #dfe5ee; display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===== PIE ===== */
.site-footer { background: #121c36; color: rgba(255, 255, 255, 0.78); padding: 3.5rem 0 6rem; font-size: 0.95rem; }
.site-footer a, .site-footer .btn-link { color: #fff; text-decoration: none; }
.site-footer a:hover, .site-footer .btn-link:hover { text-decoration: underline; }
.footer-logo { height: 80px; width: auto; }
.footer-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.6); margin-bottom: 1rem; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer address i { color: #f0b79a; margin-right: 0.3rem; }
.footer-social { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); font-size: 1.3rem; }
.footer-social + .footer-social { margin-left: 0.4rem; }
.wa-link { color: #1a8f4b !important; font-size: 1.15em; vertical-align: -0.1em; text-decoration: none !important; }
.site-footer .wa-link { color: #4fd68a !important; }
.footer-social:hover { background: #fff; color: var(--color-dark) !important; text-decoration: none !important; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.88rem; }
.footer-bottom .btn-link { font-size: inherit; font-weight: 400; }
@media (min-width: 768px) { .site-footer { padding-bottom: 2.5rem; } }

/* ===== BARRA DE ACCIONES EN MÓVIL ===== */
.mobile-bar { position: fixed; z-index: 1020; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr 1.3fr; background: #fff; box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12); padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 54px; font-weight: 700; text-decoration: none; color: var(--color-primary); }
.mobile-bar__main { background: var(--color-accent); color: #fff !important; }

/* ===== AVISO DE COOKIES ===== */
.cookie-banner { position: fixed; z-index: 1050; left: 1rem; right: 1rem; bottom: 4.5rem; max-width: 460px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); padding: 1.1rem 1.25rem; font-size: 0.9rem; }
@media (min-width: 768px) { .cookie-banner { bottom: 1.25rem; left: 1.25rem; } }

/* ===== VISOR DE FOTOS ===== */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 12, 24, 0.94); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 0.5rem 1rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { color: #fff; padding: 0.75rem 1rem 0; text-align: center; font-size: 0.95rem; }
.lightbox__btn { position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.5rem; display: grid; place-items: center; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox__close { top: 0.75rem; right: 0.75rem; }
.lightbox__prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

/* ===== TEXTOS LEGALES ===== */
.legal h2 { font-size: 1.3rem; margin: 2.25rem 0 1rem; }
.legal table { font-size: 0.92rem; background: #fff; }

/* ===== ACCESIBILIDAD ===== */
:focus-visible { outline: 3px solid #f0b79a; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
