/* =============================================
   Yotel JQC Madrid – Main Stylesheet
   ============================================= */

/* IMPORTANTE: cada vez que se edite este archivo, subir el número de
   "?v=" en los 8 archivos que lo referencian (ver README → Historial
   de cambios para la versión correcta a usar). Si no se hace, los
   visitantes que ya visitaron el sitio seguirán viendo la versión
   vieja cacheada hasta 1 año. */

/* ---- Variables ---- */
:root {
  --green:      #70A83B;
  --green-dark: #5a8a2e;
  --green-light:#8fc257;
  --black:      #000002;
  --white:      #FFFFFF;
  --bg-light:   #F6F7F5;
  --gray-text:  #6B7280;
  --gray-light: #E5E7EB;
  --gray-border:#D1D5DB;
  --dark-section:#0d0d0e;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Inter', system-ui, sans-serif;
  --shadow-sm:  0 2px 8px rgba(0,0,2,.08);
  --shadow-md:  0 8px 32px rgba(0,0,2,.12);
  --shadow-lg:  0 24px 64px rgba(0,0,2,.16);
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --transition: .3s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* overflow-x e overscroll-behavior van solo en body — ponerlos en html
     convierte al elemento html en el scroll root y bloquea el scroll de ratón */
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;        /* evita scroll horizontal sin bloquear el scroll vertical */
  overscroll-behavior: none; /* elimina el bounce en iOS/Android */
  touch-action: pan-y;       /* solo permite scroll vertical táctil — refuerza el overflow-x en iOS */
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.2; color: var(--black); }

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }

img { max-width: 100%; display: block; }

.section-padding { padding: 90px 0; }

/* Primera sección de una página interior (sin hero a pantalla completa
   debajo del header fijo): compensa la altura del header para que el
   título no quede tapado. Usado en reserva-directa.php, contacto.php y
   hostales.php. */
.page-header-offset.section-padding { padding-top: 150px; }

.bg-light-custom { background: var(--bg-light); }

.text-accent { color: var(--green); }

/* ---- Preloader ---- */
#preloader {
  position: fixed; inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.loaded { opacity: 0; visibility: hidden; }

.preloader-inner { text-align: center; }
.preloader-logo {
  font-family: var(--font-head);
  font-size: 2.5rem;
  color: var(--white);
  letter-spacing: 3px;
  margin-bottom: 20px;
}
.preloader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}
.preloader-progress {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  animation: loadBar 1.4s ease forwards;
}
@keyframes loadBar { from { width: 0 } to { width: 100% } }

/* ---- Header ---- */
.header {
  background: transparent;
  transition: background .4s ease, box-shadow .4s ease, padding .3s ease;
  padding: 4px 0;
  z-index: 1000;
}
.header.scrolled {
  background: rgba(0,0,2,.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,0,2,.25);
  padding: 2px 0;
}
.navbar-brand { display: flex; flex-direction: column; line-height: 1; }
.logo-text {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}
.logo-accent { color: var(--green); }
.logo-sub {
  font-family: var(--font-body);
  font-size: .65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}
.nav-link {
  color: rgba(255,255,255,.85) !important;
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .3px;
  padding: 6px 12px !important;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--green) !important; background: rgba(112,168,59,.08); }

.btn-book {
  background: var(--green);
  color: var(--white) !important;
  border-radius: 30px;
  padding: 8px 22px !important;
  font-size: .85rem !important;
  font-weight: 600;
  border: 2px solid var(--green);
  transition: all var(--transition);
}
.btn-book:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(112,168,59,.4); }

/* Logo imagen header */
.navbar-logo {
  height: 58px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity var(--transition);
}
.navbar-logo:hover { opacity: .85; }

/* Logo imagen footer */
.footer-logo-img {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 14px;
}

/* Toggler */
.toggler-icon { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.toggler-icon span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all var(--transition);
}
.navbar-toggler { border: none; padding: 6px; background: transparent; }
.navbar-toggler:focus { box-shadow: none; }

/* ---- Buttons ---- */
.btn-primary-custom {
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
  border-radius: 30px;
  padding: 10px 28px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .3px;
  transition: all var(--transition);
  display: inline-flex; align-items: center;
}
.btn-primary-custom:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(112,168,59,.4);
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;          /* fallback navegadores antiguos */
  min-height: 100svh;         /* small viewport height: excluye barras del navegador iOS/Android */
  position: relative;
  overflow: hidden;
  color: var(--white);
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,0,2,.72) 0%, rgba(0,0,2,.4) 60%, rgba(0,0,2,.65) 100%);
  z-index: 1;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.8s ease-in-out;
  /* GPU acceleration — necesario para que Ken Burns funcione en móvil/tablet */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Slide entrante: aparece encima de la anterior (sin flash negro) */
.hero-slide.active {
  opacity: 1;
  z-index: 2;
  will-change: transform;
  -webkit-animation: kenBurns 8s ease-out forwards;
  animation: kenBurns 8s ease-out forwards;
}

/* Slide saliente: visible mientras la nueva se disuelve encima.
   El zoom exacto se congela vía inline style (transform) desde JS. */
.hero-slide.leaving {
  opacity: 1;
  z-index: 1;
  transition: none;
}

/* Ken Burns — prefijos para Safari / Chrome móvil */
@-webkit-keyframes kenBurns {
  from { -webkit-transform: scale(1);    transform: scale(1);    }
  to   { -webkit-transform: scale(1.07); transform: scale(1.07); }
}
@keyframes kenBurns {
  from { -webkit-transform: scale(1);    transform: scale(1);    }
  to   { -webkit-transform: scale(1.07); transform: scale(1.07); }
}

/* Pantallas verticales (móvil): el hero es más alto que ancho y cover escala
   la foto por la altura, así que solo se ve una franja central de ≤ 620 px de
   los 1920. Si la slide declara --hero-portrait (recorte central 620x1080 de
   la misma imagen, ver index.php) se usa ese archivo: mismo encuadre y escala,
   menos peso. !important porque la imagen normal va en el style inline. */
@media (max-aspect-ratio: 9/16) {
  .hero-slide[style*="--hero-portrait"] { background-image: var(--hero-portrait) !important; }
}

/* Fallback cuando no carga ninguna imagen: el hero-bg-overlay ya oscurece */
.hero-slide:first-child:not([style]) {
  background: linear-gradient(135deg, #1a2a12 0%, #2d4a1e 50%, #1a2a12 100%);
  opacity: 1;
}
/* Nota: el ::after original con z-index:-1 se eliminó porque al crear
   .active un contexto de apilamiento (z-index:2), el ::after se pintaba
   encima del background-image tapando la foto. El oscurecimiento lo
   gestiona .hero-bg-overlay (hermano del contenedor, no pseudo-elemento). */

.hero .container { padding-top: 80px; }

.hero-eyebrow {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--green-light);
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.1;
}
.hero-title .text-accent { color: var(--green); }
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  max-width: 600px;
  margin: 0 auto 35px;
  font-weight: 300;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center;
}
.badge-item {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  padding: 6px 14px;
  border-radius: 30px;
  display: inline-flex; align-items: center; gap: 6px;
}
.badge-item i { color: var(--green); }

.hero-dots {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
/* Área táctil ampliada sin cambiar el aspecto: el punto visible sigue siendo
   el content-box de 8x8 (24x8 el activo) gracias a background-clip; el
   padding transparente amplía el área (16x24; 32x24 el activo) y el margen
   negativo lo compensa para que nada se mueva. No llega a 24 de ancho porque
   los puntos están a 16 px entre centros: más ancho solaparía el área del
   vecino (y el toque iría al punto equivocado). Radios del fondo recortado =
   radio exterior - padding: 8/12 - 4/8 = 4 px. */
.hero-dot {
  box-sizing: content-box;
  width: 8px; height: 8px;
  padding: 8px 4px; margin: -8px -4px;
  background-clip: content-box;
  border-radius: 50%;
  background-color: rgba(255,255,255,.4);
  border: none; cursor: pointer;
  transition: all var(--transition);
}
.hero-dot.active { background-color: var(--green); width: 24px; border-radius: 8px / 12px; }

/* ---- Section Headers ---- */
.section-header { margin-bottom: 50px; }
.section-eyebrow {
  display: inline-block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
  padding-left: 30px;
}
.section-eyebrow::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 2px;
  background: var(--green);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1rem;
  color: var(--gray-text);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Availability ---- */
.availability-section {
  padding: 0;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}
.availability-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.availability-label-col {
  background: var(--green);
  padding: 28px 20px;
}
.avail-label {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; color: var(--white); text-align: center;
}
.avail-label i { font-size: 1.8rem; }
.avail-label span { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; line-height: 1.3; }
.form-label-custom {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-text);
  margin-bottom: 6px;
  display: block;
}
.form-control-custom, .form-select-custom {
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .9rem;
  color: var(--black);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control-custom:focus, .form-select-custom:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(112,168,59,.15);
  outline: none;
}
.field-highlight {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 4px rgba(112,168,59,.3) !important;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.btn-avail { padding: 11px 20px; font-size: .9rem; }

/* ---- About ---- */
.about-image-wrapper {
  position: relative;
  padding-bottom: 60px;
  padding-right: 60px;
}
.about-main-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 2;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-badge {
  position: absolute;
  bottom: 30px; left: -10px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  z-index: 3;
}
.badge-number { font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.badge-text { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-top: 4px; }
.about-accent-img {
  position: absolute; bottom: 0; right: 0;
  width: 55%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  z-index: 4;
  border: 4px solid var(--white);
}
.about-accent-img img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.about-text { color: var(--gray-text); font-size: .95rem; margin-bottom: 14px; }

.about-feature-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  border-left: 3px solid var(--green);
}
.about-feature-item i { color: var(--green); font-size: 1rem; }

.about-feature-item--expanded {
  align-items: flex-start;
}
.about-feature-item--expanded i {
  margin-top: 2px;
}
.about-feature-item--expanded strong {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 3px;
}
.about-feature-item--expanded p {
  font-size: .78rem;
  color: var(--gray-text);
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green);
}
.stat-label { font-size: .8rem; color: var(--gray-text); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; margin-top: 4px; }

/* ---- Hostales ---- */
.hostal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
  border: 1px solid var(--gray-light);
}
.hostal-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.hostal-card.featured { border: 2px solid var(--green); }

.hostal-img-wrapper { position: relative; overflow: hidden; }
.hostal-img {
  /* height:auto — sin él, el atributo height="340" del <img> fijaría la
     altura y anularía el aspect-ratio 16/9. */
  width: 100%; height: auto; aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform .5s ease;
}
/* Placeholder color when image missing */
.hostal-img-wrapper::before {
  content: '';
  display: block;
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #e8f0e0, #d4e6c0);
  z-index: 0;
}
.hostal-img { position: relative; z-index: 1; }
.hostal-card:hover .hostal-img { transform: scale(1.06); }

.hostal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,2,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}
.hostal-card:hover .hostal-overlay { opacity: 1; }

.hostal-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(0,0,2,.7);
  color: var(--white);
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 20px;
  z-index: 2;
}
.hostal-badge.featured { background: var(--green); }

.hostal-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.hostal-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.hostal-rating i { color: #f59e0b; font-size: .85rem; }
.hostal-rating span { font-size: .85rem; font-weight: 600; margin-left: 4px; }
.hostal-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.hostal-desc { font-size: .875rem; color: var(--gray-text); margin-bottom: 16px; line-height: 1.6; flex: 1; }

.hostal-amenities {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-light);
}
.hostal-amenities span {
  display: flex; align-items: center; gap: 5px;
  font-size: .78rem; color: var(--gray-text);
}
.hostal-amenities i { color: var(--green); }

.hostal-footer { display: flex; align-items: center; justify-content: space-between; }
/* min-height = línea del precio cargado ("Desde <strong>99€</strong>/noche":
   strong 1.2rem × line-height 1.65): la tarjeta no crece al llegar el precio. */
.hostal-price { font-size: .85rem; color: var(--gray-text); min-height: calc(1.2rem * 1.65); }
.hostal-price strong { font-size: 1.2rem; color: var(--green); font-family: var(--font-head); }
.hostal-cta { font-size: .85rem; font-weight: 600; color: var(--green); display: flex; align-items: center; gap: 5px; }
.hostal-cta:hover { color: var(--green-dark); }

.hostal-cta-card {
  background: var(--green);
  border-radius: var(--radius-lg);
  color: var(--white);
  padding: 36px 40px;
}
.hostal-cta-card .cta-icon { font-size: 2.5rem; opacity: .8; }
.hostal-cta-card h4, .hostal-cta-card .h4 { font-size: 1.2rem; color: var(--white); margin-bottom: 8px; }
.hostal-cta-card p { font-size: .875rem; opacity: .85; margin-bottom: 0; }
.hostal-cta-card .btn { background: var(--white); color: var(--green); border: none; font-weight: 700; min-width: 200px; }
.hostal-cta-card .btn:hover { background: rgba(255,255,255,.9); }

/* ---- Rooms ---- */
.room-tabs-wrapper {
  text-align: center;
  margin-bottom: 2.5rem;
}
.room-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg-light);
  border-radius: 50px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}
.room-tab {
  background: transparent;
  border: none;
  border-radius: 30px;
  padding: 10px 22px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-text);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex: 0 0 auto;
}
.room-tab.active, .room-tab:hover {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(112,168,59,.35);
}

.room-panel { display: none; }
.room-panel.active { display: block; }

.room-gallery-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.room-main-img { border-radius: var(--radius-lg); overflow: hidden; }
.room-main-img img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: var(--bg-light);
  transition: transform .4s ease;
}
.room-main-img:hover img { transform: scale(1.03); }
.room-thumb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.room-thumb-grid a { border-radius: var(--radius-md); overflow: hidden; display: block; }
.room-thumb-grid img {
  width: 100%; aspect-ratio: 3/2; object-fit: cover;
  background: var(--bg-light);
  transition: transform .4s ease;
}
.room-thumb-grid a:hover img { transform: scale(1.06); }

.room-info { padding-left: 20px; }
.room-type-badge {
  display: inline-block;
  background: rgba(112,168,59,.12);
  color: var(--green);
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 4px 14px; border-radius: 20px;
  margin-bottom: 14px;
}
.room-title { font-size: 1.8rem; margin-bottom: 14px; }
.room-desc { color: var(--gray-text); font-size: .95rem; margin-bottom: 20px; }

.room-specs { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.spec-item { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 500; }
.spec-item i { color: var(--green); }

.room-amenities-list {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
  padding: 18px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}
.room-amenities-list span { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.room-amenities-list i { color: var(--green); width: 16px; }

.room-price-row { display: flex; align-items: center; justify-content: space-between; }
.room-price { font-size: .9rem; color: var(--gray-text); }
.room-price strong { font-family: var(--font-head); font-size: 2rem; color: var(--green); }
.room-price small { font-size: .8rem; }
.room-note { font-size: .8rem; color: var(--gray-text); margin-top: 14px; padding: 8px 12px; background: var(--bg-light); border-left: 3px solid var(--green); border-radius: 0 4px 4px 0; }
.room-note i { color: var(--green); }

/* ---- Booking ---- */
.booking-section { position: relative; overflow: hidden; background: var(--dark-section); }
.booking-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0d1a09 0%, #1e3510 60%, #0a1206 100%);
  opacity: .8;
}
/* .section-title/.section-desc heredan el color de texto por defecto
   (--black / --gray-text), pensado para fondos claros. Sobre el fondo
   oscuro de .booking-bg (reserva-directa.php) eso deja el título casi
   invisible — "garantizado" ya se lee bien porque usa .text-accent
   (var(--green)), pero "Mejor precio" y el subtítulo no. Contraste
   verificado ≥8.5:1 (subtítulo) y ≥13:1 (título) en todo el degradado. */
.booking-section .section-title { color: var(--white); }
.booking-section .section-desc { color: #cfcfcf; }
.booking-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.booking-promo {
  background: var(--green);
  padding: 50px 40px;
}
.booking-promo-inner { color: var(--white); }
.booking-eyebrow {
  font-size: .75rem; text-transform: uppercase;
  letter-spacing: 3px; font-weight: 600;
  color: rgba(255,255,255,.75); margin-bottom: 14px; display: block;
}
.booking-title { font-size: 2.4rem; color: var(--white); margin-bottom: 28px; line-height: 1.1; }
.booking-benefits { list-style: none; padding: 0; margin: 0 0 28px; }
.booking-benefits li {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; font-size: .9rem; color: rgba(255,255,255,.88);
}
.booking-benefits i { color: rgba(255,255,255,.9); margin-top: 2px; font-size: 1rem; }
.booking-trust { display: flex; flex-direction: column; gap: 10px; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: rgba(255,255,255,.75); }
.trust-item i { font-size: 1rem; }

.booking-form-col { padding: 50px 40px; }
.booking-form-title { font-size: 1.5rem; margin-bottom: 28px; }

/* ---- Services ---- */
.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--gray-light);
  height: 100%;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(112,168,59,.3); }
.service-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(112,168,59,.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  transition: background var(--transition);
}
.service-card:hover .service-icon { background: var(--green); }
.service-icon i { font-size: 1.6rem; color: var(--green); transition: color var(--transition); }
.service-card:hover .service-icon i { color: var(--white); }
.service-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.service-desc { font-size: .83rem; color: var(--gray-text); line-height: 1.5; }

/* Gallery section removed */

/* ---- Location ---- */
.location-points { display: flex; flex-direction: column; gap: 0; }
.location-point {
  display: flex; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--gray-light);
}
.location-point:last-child { border-bottom: none; }
.lp-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(112,168,59,.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lp-icon i { color: var(--green); font-size: 1.1rem; }
.lp-info h5, .lp-info .h5 { font-size: 1rem; margin-bottom: 4px; }
.lp-info p { font-size: .83rem; color: var(--gray-text); margin-bottom: 6px; }
.lp-distance { font-size: .78rem; color: var(--green); font-weight: 600; display: flex; align-items: center; gap: 4px; }

.transport-info {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.transport-title { font-size: 1rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.transport-items { display: flex; flex-direction: column; gap: 10px; }
.transport-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.t-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800;
  flex-shrink: 0;
}
.t-icon.metro { background: #003399; color: white; }
.t-icon.bus   { background: #ff6600; color: white; }
.t-icon.taxi  { background: #f0c020; color: black; }
.t-icon.cercanias { background: #009900; color: white; }

.map-wrapper { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.map-wrapper iframe { display: block; }

/* ---- Testimonials ---- */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tc-stars { display: flex; gap: 3px; margin-bottom: 16px; }
.tc-stars i { color: #f59e0b; font-size: .9rem; }
.tc-text { font-size: .9rem; color: var(--gray-text); font-style: italic; margin-bottom: 20px; flex: 1; line-height: 1.7; }
.tc-author { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tc-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tc-info { display: flex; flex-direction: column; }
.tc-info strong { font-size: .9rem; }
.tc-info span { font-size: .78rem; color: var(--gray-text); }
.tc-hostal {
  font-size: .75rem; font-weight: 700;
  color: var(--green); text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid var(--gray-light);
  padding-top: 12px;
  margin-top: auto;
}

.review-platforms {
  display: inline-flex; align-items: center; gap: 28px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 18px 36px;
}
.rp-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.rp-item i { font-size: 1.4rem; color: #4285f4; }
/* Logo SVG inline (Tripadvisor): misma caja y alineación que un icono bi-* */
.rp-icon-svg svg { display: inline-block; vertical-align: -.125em; }
.rp-item div { display: flex; flex-direction: column; }
.rp-item strong { font-size: 1rem; line-height: 1.2; }
.rp-item span { font-size: .72rem; color: var(--gray-text); }
.rp-logo-booking {
  width: 28px; height: 28px; border-radius: 6px;
  background: #003580; color: white;
  font-weight: 900; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.rp-divider { width: 1px; height: 36px; background: var(--gray-border); }

/* ---- FAQ ---- */
.faq-accordion { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1.5px solid var(--gray-light) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:has(.faq-button:not(.collapsed)) { border-color: var(--green) !important; }
.faq-button {
  background: var(--white) !important;
  color: var(--black) !important;
  font-weight: 600 !important;
  font-size: .95rem;
  padding: 18px 22px !important;
  box-shadow: none !important;
}
.faq-button::after { filter: none; }
.faq-button:not(.collapsed) { color: var(--green) !important; }
.faq-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2370A83B'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.faq-body { font-size: .9rem; color: var(--gray-text); padding: 18px 22px !important; line-height: 1.7; border-top: 1px solid var(--gray-light); }
.faq-body strong { color: var(--black); }

/* ---- Contact ---- */
.contact-info { display: flex; flex-direction: column; gap: 22px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.ci-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(112,168,59,.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ci-icon i { color: var(--green); font-size: 1.2rem; }
.ci-content h5 { font-size: .95rem; margin-bottom: 4px; }
.ci-content p, .ci-content a { font-size: .9rem; color: var(--gray-text); }
.ci-content a:hover { color: var(--green); }
.hostal-phones { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.hp-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; background: var(--bg-light); border-radius: 8px; }
.hp-label { font-size: .8rem; color: var(--gray-text); flex: 1; }
.hp-num { font-size: .9rem; font-weight: 600; color: var(--black); white-space: nowrap; text-decoration: none; letter-spacing: .02em; }
.hp-num:hover { color: var(--green); }
.contact-social { display: flex; gap: 12px; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-text);
  transition: all var(--transition);
}
.social-link:hover { background: var(--green); border-color: var(--green); color: var(--white); }
.social-link.whatsapp-social:hover { background: #25d366; border-color: #25d366; }

.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-light);
}

/* ---- Footer ---- */
.footer { background: var(--black); color: rgba(255,255,255,.7); }
.footer-top { padding: 70px 0 50px; }
.footer-brand { text-align: center; }
.footer-brand .footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-brand .logo-text { font-size: 1.4rem; }
.footer-desc { font-size: .875rem; color: rgba(255,255,255,.55); line-height: 1.7; margin-bottom: 20px; max-width: 320px; margin-left: auto; margin-right: auto; }
.footer-social { display: flex; gap: 10px; justify-content: center; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: rgba(255,255,255,.6);
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--green); border-color: var(--green); color: white; }

.footer-heading { font-size: .75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--white); margin-bottom: 18px; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; color: rgba(255,255,255,.55); transition: color var(--transition); }
.footer-links a:hover { color: var(--green); padding-left: 4px; }

.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.fc-item { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; color: rgba(255,255,255,.55); }
.fc-item i { color: var(--green); margin-top: 2px; flex-shrink: 0; }
.fc-item a { color: rgba(255,255,255,.55); }
.fc-item a:hover { color: var(--green); }
.fc-sub { font-size: .75rem; color: rgba(255,255,255,.35); margin-left: 2px; }

/* Newsletter removed */

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-legal-link { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-legal-link:hover { color: var(--green); }

/* ---- WhatsApp Float ---- */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 58px; height: 58px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 6px 24px rgba(37,211,102,.4);
  z-index: 900;
  transition: all var(--transition);
}
.whatsapp-float:hover {
  background: #1ebc5a;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,.5);
}
.wa-tooltip {
  position: absolute;
  right: 70px;
  background: var(--black);
  color: white;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.wa-tooltip::after {
  content: '';
  position: absolute; left: 100%; top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--black);
}
.whatsapp-float:hover .wa-tooltip { opacity: 1; }
.whatsapp-float::before {
  content: '';
  position: absolute; inset: -8px;
  border: 2px solid #25d366;
  border-radius: 50%;
  opacity: 0;
  animation: waPulse 2s ease infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ---- Back To Top ---- */
.back-to-top {
  position: fixed;
  bottom: 100px; right: 28px;
  width: 44px; height: 44px;
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--gray-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 800;
  box-shadow: var(--shadow-sm);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green); color: white; border-color: var(--green); }

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--black);
  border-top: 2px solid rgba(112,168,59,.3);
  z-index: 850;
  padding: 16px 0;
  transform: translateY(100%);
  transition: transform .5s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cookie-text { font-size: .85rem; color: rgba(255,255,255,.75); }
.cookie-text a { color: var(--green); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---- Forms ---- */
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(112,168,59,.2); }

/* ---- Alert overrides ---- */
.alert-success { background: rgba(112,168,59,.12); border-color: rgba(112,168,59,.3); color: var(--green-dark); }
.alert-danger  { background: rgba(220,53,69,.08);  border-color: rgba(220,53,69,.3);  color: #dc3545; }

/* ---- Disponibilidad en tiempo real (booking form) ---- */
.avail-result {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  border: 1.5px solid transparent;
  transition: all .25s ease;
}
.avail-checking {
  background: rgba(112,168,59,.06);
  border-color: rgba(112,168,59,.25);
  color: var(--gray-text);
}
.avail-ok {
  background: rgba(112,168,59,.12);
  border-color: rgba(112,168,59,.4);
  color: var(--green-dark);
}
.avail-ko {
  background: rgba(220,53,69,.07);
  border-color: rgba(220,53,69,.3);
  color: #c0392b;
}
.avail-info {
  background: rgba(100,149,237,.07);
  border-color: rgba(100,149,237,.3);
  color: #2c5282;
}
.avail-hint {
  font-size: .82rem;
  color: var(--gray-text);
  margin-top: 8px;
  margin-bottom: 0;
  padding: 7px 10px;
  background: var(--bg-light);
  border-radius: 6px;
  border-left: 3px solid var(--green);
}
.avail-hint i { color: var(--green); }

/* ---- Placeholders for missing images ---- */
.hostal-img[src=""],
.hostal-img:not([src]) {
  background: linear-gradient(135deg, #d4e6c0, #b8d49a);
  min-height: 200px;
}

/* ---- Recorte horizontal (clip-x) ----
   Secciones que contienen .row.g-5 (margen lateral -24px dentro de un
   .container con 12px de padding en móvil) o elementos AOS fade-left/right
   (translateX ±100px antes de animarse): sin esto la página mide 402-502px
   de ancho a 390px. overflow-x: clip recorta sin crear un contenedor de
   scroll (no rompe position: sticky, a diferencia de hidden) y no afecta
   al eje vertical. Está forzado en el CSS crítico (tools/critical). */
.clip-x { overflow-x: clip; }

/* ---- Animations ---- */
[data-aos] { opacity: 1 !important; }
/* Hasta que AOS.init marca los elementos con .aos-init, el CSS de AOS los deja
   desplazados (translate 100px): sin preloader eso se veía como un salto del
   hero y las tarjetas del primer pantallazo. Tras AOS.init la regla deja de
   aplicar y las animaciones de más abajo funcionan igual. Forzado en el CSS
   crítico (tools/critical). */
[data-aos]:not(.aos-init) { transform: none !important; }

/* =============================================
   RESPONSIVE
   ============================================= */

/* ── Tablet grande ── */
@media (max-width: 992px) {
  .section-padding { padding: 70px 0; }
  .page-header-offset.section-padding { padding-top: 120px; }
  .section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
  .hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); }

  .about-image-wrapper { padding-bottom: 40px; padding-right: 40px; }
  .about-accent-img { width: 45%; }

  .booking-promo { padding: 40px 30px; }
  .booking-form-col { padding: 40px 30px; }

  .room-info { padding-left: 0; margin-top: 24px; }

  .review-platforms { flex-direction: column; align-items: flex-start; gap: 16px; }
  .rp-divider { width: 100%; height: 1px; }
}

/* ── Tablet ── */
@media (max-width: 768px) {
  .section-padding { padding: 55px 0; }

  /* Availability */
  .availability-section { margin-top: -30px; }
  .availability-label-col { display: none; }

  /* Room tabs: wrap limpio en 2 filas */
  .room-tabs {
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-lg);
  }
  .room-tab {
    padding: 9px 18px;
    font-size: .83rem;
  }

  /* Room panel */
  .room-amenities-list { grid-template-columns: 1fr 1fr; }
  .room-price-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .room-price-row .btn { width: 100%; justify-content: center; }
  .room-gallery-grid { margin-bottom: 8px; }

  /* Booking */
  .booking-promo { display: none; }
  .booking-form-col { padding: 30px 24px; }

  /* About */
  .about-image-wrapper { padding-right: 30px; padding-bottom: 30px; }
  .about-accent-img { width: 40%; }

  /* Contact */
  .contact-form-wrapper { padding: 28px 20px; }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 260px; justify-content: center; }
  .hero-badges { gap: 10px; }

  /* Reviews */
  .review-platforms { padding: 18px 22px; }

  /* Hostal cards */
  .hostal-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── Prevención del zoom automático de iOS Safari ────────────────────────────
   iOS Safari hace zoom automático cuando un input tiene font-size < 16px.
   Al enfocar el campo la página se amplía y al enviar el formulario se queda
   con el ancho distorsionado. Solución: forzar exactamente 16px en todos
   los campos de formulario en móvil — el umbral exacto que evita el zoom. */
@media (max-width: 768px) {
  input,
  select,
  textarea,
  .form-control,
  .form-select,
  .form-control-custom,
  .form-select-custom {
    font-size: 16px !important;
  }
}

/* ── Móvil ── */
@media (max-width: 576px) {
  .section-padding { padding: 48px 0; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: .95rem; }
  .section-title { font-size: 1.75rem; }
  .hero-badges { flex-direction: column; align-items: center; }

  /* About - features expandidos en móvil */
  .about-features .col-6 { flex: 0 0 100%; max-width: 100%; }

  /* Availability */
  .availability-card { border-radius: var(--radius-md); }
  .availability-form .row { gap: 10px; }

  /* Room tabs: 2+3 sobre fondo blanco con bordes */
  .room-tabs {
    background: transparent;
    padding: 0;
    gap: 8px;
    justify-content: center;
  }
  .room-tab {
    padding: 9px 16px;
    font-size: .8rem;
    border: 1.5px solid var(--gray-border);
    border-radius: 30px;
  }
  .room-tab.active {
    border-color: var(--green);
    background: var(--green);
    color: var(--white);
    box-shadow: none;
  }

  /* Room panel: 1 columna limpia */
  .room-main-img img { aspect-ratio: 16/9; }
  .room-thumb-grid { grid-template-columns: 1fr 1fr; }
  .room-amenities-list { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .room-specs { gap: 14px; }
  .room-title { font-size: 1.5rem; }
  .room-price strong { font-size: 1.6rem; }

  /* Services */
  .service-card { padding: 22px 16px; }
  .service-title { font-size: .9rem; }

  /* About */
  .about-image-wrapper { padding-right: 20px; padding-bottom: 20px; }
  .about-accent-img { width: 38%; }
  .stat-num { font-size: 2rem; }

  /* Location */
  .location-point { gap: 12px; }
  .lp-info p { display: none; } /* Oculta descripción larga en móvil */
  .map-wrapper iframe { height: 280px; }

  /* Hostales */
  .hostal-body { padding: 16px; }
  .hostal-name { font-size: 1.1rem; }

  /* Testimonials */
  .review-platforms { padding: 16px; gap: 16px; }

  /* FAQ */
  .faq-button { font-size: .88rem !important; padding: 14px 16px !important; }

  /* Contact */
  .contact-form-wrapper { padding: 20px 16px; }
  .ci-icon { width: 40px; height: 40px; }

  /* Booking */
  .booking-form-col { padding: 24px 16px; }

  /* Footer */
  .footer-bottom .col-md-6:last-child { margin-top: 8px; }
  .footer-top { padding: 50px 0 36px; }

  /* Floating buttons */
  .whatsapp-float { bottom: 20px; right: 16px; width: 50px; height: 50px; font-size: 1.4rem; }
  .back-to-top { right: 16px; }
}

/* Print */
@media print {
  .header, .whatsapp-float, .back-to-top, .cookie-banner { display: none !important; }
  .hero { min-height: auto; padding: 60px 0 40px; }
}
