/* ==========================================================
   Gestión de Espacios — estilos
   Paleta neutra: petróleo, piedra y arena
   ========================================================== */
:root {
  --petroleo: #24343A;
  --petroleo-hover: #18252A;
  --tinta: #17201B;
  --texto: #3D4842;
  --texto-suave: #5C6660;
  --piedra: #F3F4F0;
  --blanco: #FFFFFF;
  --arena: #CDBF9C;
  --arena-claro: #E4DED0;
  --arena-icono: #9C8A5E;
  --linea: #DDE1DA;
  --oscuro: #17201B;
  --placeholder: #DCE1D9;

  --f-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;

  --container: 1240px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--piedra);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--petroleo); }
a:hover { color: var(--petroleo-hover); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
input, select, textarea, button { font: inherit; }
:focus-visible { outline: 2px solid var(--arena-icono); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--blanco); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Imágenes que aún no existen: dejan un hueco gris rayado en vez de un icono roto */
.img-missing {
  background-color: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(23,32,27,.06) 0 12px, transparent 12px 24px);
}
.hero__bg.img-missing { background: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--dark { background: var(--petroleo); color: var(--blanco); }
.btn--dark:hover { background: var(--petroleo-hover); color: var(--blanco); }
.btn--white { background: var(--blanco); color: #1B2427; }
.btn--white:hover { background: var(--piedra); color: #1B2427; }
.btn--sand { background: var(--arena); color: #1B2427; min-height: 46px; }
.btn--sand:hover { background: #D9CDAE; color: #1B2427; }
.btn--ghost-light { border: 1.5px solid rgba(255,255,255,.8); color: var(--blanco); background: transparent; }
.btn--ghost-light:hover { background: rgba(255,255,255,.12); color: var(--blanco); }
.btn--outline { border: 1.5px solid var(--tinta); color: var(--tinta); background: transparent; }
.btn--outline:hover { background: var(--blanco); color: var(--tinta); }
.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 56px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--texto-suave);
}
.eyebrow--sand { color: #D9C9A3; }
.kicker {
  margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #6A746E;
}
.h-section {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(28px, 3.4vw, 41px); letter-spacing: -.02em; line-height: 1.05;
}
.h-small {
  margin-top: 48px; font-family: var(--f-display); font-weight: 700;
  font-size: 22px; letter-spacing: -.01em;
}

/* ---------- Secciones ---------- */
.section { padding: 88px 0; }
.section--stone { background: var(--piedra); margin-top: 24px; }
.section--white { background: var(--blanco); }
.section--line { border-top: 1px solid var(--linea); }
.section--dark { background: var(--oscuro); color: #EEF1EC; }

/* ==========================================================
   HERO
   ========================================================== */
.hero-wrap { max-width: 1392px; margin: 0 auto; padding: 16px 16px 0; }
.hero {
  position: relative; overflow: hidden; border-radius: 32px;
  min-height: 620px; display: flex; flex-direction: column; color: var(--blanco);
  background-color: #33413F;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14,20,22,.72) 0%, rgba(14,20,22,.35) 55%, rgba(14,20,22,.15) 100%);
}
.topbar {
  position: relative; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px; padding: 22px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--blanco); text-decoration: none; }
.brand:hover { color: var(--blanco); }
.brand__name { font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.topbar__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; font-weight: 500; }
.topbar__nav a { color: var(--blanco); text-decoration: none; padding: 10px 0; }
.topbar__nav a:hover { color: var(--arena); }

.hero__body {
  position: relative; flex: 1; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 32px; padding: 32px 48px 128px;
}
.hero__text { flex: 1 1 520px; min-width: 0; max-width: 660px; display: flex; flex-direction: column; gap: 22px; }
.hero__text h1 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(36px, 5vw, 66px); line-height: 1; letter-spacing: -.03em;
}
.hero__text p { font-size: 16px; color: rgba(255,255,255,.88); max-width: 480px; }

.hero-cards {
  position: relative; list-style: none; padding: 0;
  margin: -96px 32px 0; max-width: 860px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.hero-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  height: 160px; padding: 14px; border-radius: 18px; border: 4px solid var(--piedra);
  overflow: hidden; color: var(--blanco); text-decoration: none; background: #33413F;
}
.hero-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hero-card:hover img { transform: scale(1.04); }
.hero-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(14,20,22,.75) 0%, rgba(14,20,22,0) 65%);
}
.hero-card__info {
  position: relative; z-index: 1; display: flex; align-items: flex-end;
  justify-content: space-between; gap: 12px;
}
.hero-card__info > span { display: flex; flex-direction: column; gap: 2px; }
.hero-card strong { font-family: var(--f-display); font-weight: 700; font-size: 17px; line-height: 1.1; }
.hero-card small { font-size: 11px; color: rgba(255,255,255,.8); }
.hero-card em { font-style: normal; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); }

/* ==========================================================
   QUIÉNES SOMOS + PARA QUIÉN
   ========================================================== */
.about { display: flex; flex-wrap: wrap; gap: 24px 64px; padding-bottom: 8px; }
.about .eyebrow { flex: 0 0 200px; padding-top: 8px; }
.about__body { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about__lead {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; letter-spacing: -.015em;
}
.about__body p { max-width: 720px; line-height: 1.6; color: var(--texto); }

.audience {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; padding-top: 24px;
}
.audience__card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; background: var(--blanco); border-radius: 20px;
}
.audience__icon {
  /* Icono = forma del PNG; el color lo pone background-color (cámbialo aquí) */
  display: block; width: 48px; height: 48px;
  background-color: var(--arena-icono);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.audience__icon--colegios { --icon: url(../img/iconos/colegios.png); }
.audience__icon--grupos { --icon: url(../img/iconos/grupos.png); }
.audience__icon--empresas { --icon: url(../img/iconos/empresas.png); }
.audience__icon--campamentos { --icon: url(../img/iconos/campamentos.png); }
.audience__card h3 { margin-top: 12px; font-size: 17px; font-weight: 600; }
.audience__card p { font-size: 13px; color: var(--texto); }

/* ==========================================================
   NUESTROS ALBERGUES
   ========================================================== */
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 32px;
}
.section-head__text { max-width: 440px; color: var(--texto); }

.hostels { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.hostels__list { flex: 1 1 260px; max-width: 100%; display: flex; flex-direction: column; gap: 12px; }
.hostels__panels {
  flex: 999 1 600px; min-width: 0;
  background: var(--piedra); border: 1px solid #E3E6E0; border-radius: 28px;
  padding: 28px; display: flex; flex-direction: column; gap: 28px;
}

.hostel-tab {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 96px; padding: 14px 14px 14px 20px;
  border: 1.5px solid transparent; border-radius: 20px; background: var(--piedra);
  text-align: left; cursor: pointer; color: var(--tinta);
  transition: background-color .15s, box-shadow .15s, border-color .15s;
}
.hostel-tab:hover { background: #ECEEE9; }
.hostel-tab[aria-selected="true"] {
  background: var(--blanco); border-color: var(--petroleo);
  box-shadow: 0 10px 30px rgba(36,52,58,.10);
}
.hostel-tab > span { display: flex; flex-direction: column; gap: 4px; }
.hostel-tab strong { font-family: var(--f-display); font-weight: 600; font-size: 15px; line-height: 1.15; }
.hostel-tab[aria-selected="true"] strong { font-weight: 700; }
.hostel-tab small { font-size: 11px; color: #4A554F; }
.hostel-tab img {
  flex: 0 0 auto; width: 76px; height: 68px; border-radius: 14px; object-fit: cover;
  background: var(--placeholder);
}

.hostel__main { display: flex; flex-wrap: wrap; gap: 32px; }
.gallery { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.gallery__stage { position: relative; height: 340px; border-radius: 22px; overflow: hidden; background: var(--placeholder); }
.gallery__stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery__count {
  position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(14,20,22,.6); color: var(--blanco); font-size: 12px; font-weight: 600;
}
.gallery__nav { display: flex; align-items: center; gap: 6px; }
.gallery__nav .icon-btn { flex: 0 0 auto; }
.gallery__thumbs {
  flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto;
  padding: 2px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.gallery__thumbs .thumb { flex: 0 0 auto; scroll-snap-align: start; }

/* Piedralaves: albergue en construcción, sin fotos todavía */
.soon {
  flex: 1 1 340px; min-width: 0; min-height: 340px; border-radius: 22px; padding: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  color: var(--blanco); background-color: var(--petroleo);
}
.soon__mark { margin-bottom: 8px; }
.soon__title { font-family: var(--f-display); font-weight: 700; font-size: 22px; }
.soon__text { max-width: 280px; color: rgba(255,255,255,.8); }
.hero-card__soon {
  position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 9px; border-radius: 999px;
  background: var(--arena); color: var(--tinta); font-size: 11px; font-weight: 600;
}
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--petroleo);
}
.icon-btn:hover { background: rgba(36,52,58,.08); }
.thumb {
  width: 56px; height: 48px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; opacity: .7; background: var(--placeholder);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--petroleo); opacity: 1; }

.hostel__info { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hostel__info h3 {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(24px, 2.6vw, 33px); letter-spacing: -.02em; line-height: 1.05; color: var(--petroleo);
}
.hostel__info > p { font-size: 14px; line-height: 1.6; color: var(--texto); }
.hostel__info .btn { align-self: flex-start; margin-top: auto; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--petroleo); background: var(--arena-claro); padding: 5px 10px; border-radius: 999px;
}
.tag--outline { color: var(--tinta); background: transparent; border: 1.5px solid var(--tinta); padding: 3.5px 9px; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.facts > div { background: var(--blanco); border-radius: 14px; padding: 14px; }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-suave); }
.facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.facts dd small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--texto-suave); }

.others { background: var(--blanco); border-radius: 20px; padding: 20px; }
.others__title { margin-bottom: 14px; font-size: 12px; font-weight: 600; color: var(--texto); }
.others__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.other {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px;
  border: 1px solid var(--linea); border-radius: 14px; background: var(--blanco);
  text-align: left; cursor: pointer; color: var(--tinta);
}
.other:hover { border-color: var(--petroleo); }
.other img { flex: 0 0 auto; width: 52px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--placeholder); }
.other span { display: flex; flex-direction: column; gap: 2px; }
.other strong { font-size: 12px; font-weight: 600; }
.other small { font-size: 11px; color: #4A554F; }

/* ==========================================================
   TAMBIÉN GESTIONAMOS TU ESPACIO
   ========================================================== */
.owners { display: flex; flex-wrap: wrap; gap: 56px; }
.owners__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.h-owners {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(31px, 4.3vw, 52px); letter-spacing: -.03em; line-height: 1;
}
.owners__eyebrow { margin-top: -12px; }
.owners__lead { color: #C9D1CB; max-width: 540px; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.service { border: 1px solid #34443A; border-radius: 16px; padding: 20px; }
.service h3 { margin-bottom: 6px; font-size: 15px; font-weight: 600; color: var(--blanco); }
.service p { font-size: 13px; line-height: 1.5; color: #B9C3BC; }

.owners__form {
  flex: 1 1 380px; min-width: 0; background: #EEF1EC; color: var(--tinta);
  border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.owners__form h3 { font-family: var(--f-display); font-weight: 700; font-size: 22px; }
.owners__form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.owners__form input[type="text"], .owners__form input[type="email"], .owners__form select, .owners__form textarea {
  min-height: 46px; padding: 0 14px; border: 1px solid #B8C0B9; border-radius: 10px; background: var(--blanco); color: var(--tinta);
}
.owners__form textarea { padding: 12px 14px; resize: vertical; }
.owners__form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.owners__form .check input { margin-top: 2px; width: 18px; height: 18px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row label { flex: 1 1 160px; }

/* ==========================================================
   GALERÍA (collage)
   ========================================================== */
#galeria { overflow: hidden; padding-bottom: 72px; }
.gallery-head { text-align: center; display: flex; flex-direction: column; gap: 10px; margin: 0 auto 100px; max-width: 560px; }
.collage { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.collage__col { display: flex; flex-direction: column; gap: 14px; }
.collage__col--low { margin-top: 120px; }
.collage__col--high { margin-top: -40px; }
.collage__col--higher { margin-top: -60px; }
.collage img { border-radius: 6px; object-fit: cover; background: var(--placeholder); }
.c-s  { width: 130px; height: 120px; }
.c-s2 { width: 130px; height: 140px; }
.c-m1 { width: 170px; height: 180px; }
.c-m2 { width: 170px; height: 170px; }
.c-m3 { width: 170px; height: 160px; }
.c-m4 { width: 170px; height: 150px; }
.c-l1 { width: 210px; height: 250px; }
.c-l2 { width: 210px; height: 190px; }

/* ==========================================================
   CONTACTO + PIE
   ========================================================== */
.contact { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.contact__text { flex: 1 1 420px; min-width: 0; }
.contact__text p { margin-top: 12px; color: var(--texto); max-width: 520px; }
.contact__actions { flex: 0 1 400px; display: flex; flex-direction: column; gap: 12px; }
.contact__phone { text-align: center; font-size: 13px; color: var(--texto-suave); }

.footer { border-top: 1px solid #D5D9D2; }
.footer__inner {
  padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 16px; font-size: 12px; color: #4A554F;
}
.footer__brand { font-family: var(--f-display); font-weight: 700; color: var(--tinta); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__nav a { color: #4A554F; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 960px) {
  .topbar__nav { order: 3; width: 100%; }
  .hero-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  /* Tablet: tarjetas en 2x2 en vez de 3 + 1 suelta */
  .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Lista de albergues en 2x2 para que la ficha quede más arriba */
  .hostels__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* Collage en rejilla de 4 columnas (2 filas) */
  .collage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .collage__col { display: contents; }
  .collage__col--low, .collage__col--high, .collage__col--higher { margin-top: 0; }
  .collage img { width: 100% !important; height: auto !important; aspect-ratio: 4 / 5; }
  .gallery-head { margin-bottom: 48px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding: 64px 0; }
  .hero-wrap { padding: 8px 8px 0; }
  .hero { border-radius: 22px; min-height: 0; }
  .topbar { padding: 16px 20px; }
  /* En móvil: logo + botón en una fila; el menú se oculta (la página se recorre bajando) */
  .topbar__nav { display: none; }
  .topbar .btn--sand { min-height: 40px; padding: 0 16px; font-size: 13px; }
  .hero__body { padding: 16px 20px 112px; }
  .hero-cards { margin: -88px 16px 0; gap: 8px; }
  .hero-card { height: 150px; padding: 10px; }
  .hero-card strong { font-size: 14px; }
  .hero-card small { display: block; margin-top: 2px; line-height: 1.3; }
  .hero-card__soon { top: 8px; left: 8px; font-size: 10px; }
  .hostels__panels { padding: 16px; border-radius: 22px; }
  .gallery__stage { height: 240px; }
  .soon { min-height: 240px; }
  .facts { grid-template-columns: 1fr; }
  .owners__form { padding: 24px; }
  .gallery-head { margin-bottom: 48px; }
  .collage__col--low, .collage__col--high, .collage__col--higher { margin-top: 0; }
  .audience, .services, .hostels__list { grid-template-columns: 1fr; }
  /* Collage en móvil: rejilla limpia de 2 columnas */
  .collage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .collage__col { display: contents; }
  .collage img { width: 100% !important; height: auto !important; aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Formulario: antispam y estado del envío ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.form-status.is-ok { background: #E3EEE6; color: #1F4D33; }
.form-status.is-error { background: #F6E3E0; color: #7A2A1F; }

/* ---------- Páginas legales ---------- */
.legal-top { background: var(--blanco); border-bottom: 1px solid var(--linea); }
.legal-top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand--dark .brand__name { color: var(--petroleo); }
.legal-top__back { font-size: 14px; font-weight: 600; }
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 80px; }
.legal h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.02em; color: var(--petroleo); }
.legal__date { margin-top: 8px; font-size: 13px; color: var(--texto-suave); }
.legal h2 { margin-top: 36px; font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--petroleo); }
.legal p, .legal li { margin-top: 12px; color: var(--texto); line-height: 1.65; }
.legal ul { padding-left: 20px; }

/* ---------- Logo ---------- */
.brand__logo { display: block; height: 62px; width: auto; }
.brand__logo--sm { height: 52px; }
.footer__logo { display: block; height: 48px; width: auto; }
@media (max-width: 640px) { .brand__logo { height: 48px; } }
