/* ─── HOTEL FICHA — Hero (Ski Tours Style) ───────────────────────────────── */
.hf-hero {
  position: relative;
  background: var(--ski-blue-dark, #0a1628) no-repeat center/cover;
  padding: 80px 0 60px;
  color: #fff;
}
.hf-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  z-index: 1;
}
.hf-hero__wrap {
  position: relative;
  z-index: 2;
}

/* Breadcrumb */
.hf-hero__breadcrumb {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.hf-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.hf-hero__breadcrumb a:hover {
  color: var(--walking-lime, #b4e040);
}
.hf-hero__breadcrumb-sep {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 2px;
}
.hf-hero__breadcrumb-current {
  color: #fff;
  font-weight: 600;
}

/* Badges */
.hf-hero__badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.chip--lime { background: var(--walking-lime, #b4e040); color: #0a1628; }
.chip--blue { background: rgba(255, 255, 255, 0.2); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }

/* Título */
.hf-hero__title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
}

/* Subtítulo con precio */
.hf-hero__subtitle {
  font-size: 1.1rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}
.hf-hero__price {
  color: var(--walking-lime, #b4e040);
  font-size: 1.2rem;
}

/* ─── TABS NAV ───────────────────────────────────────────────────────────── */
.hf-tabs-nav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(13, 31, 60, .06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hf-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
}

.hf-tabs::-webkit-scrollbar {
  display: none;
}

.hf-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: #0D1F3C;
  text-decoration: none;
  text-align: center;
  flex: 1 1 100px;
  max-width: 240px;
  background: transparent;
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  transition: background .2s, border-color .2s, color .2s;
}

.hf-tab:hover {
  background: #ecfab0;
  border-color: #d8f754;
  color: #0D1F3C;
}

.hf-tab--active,
.hf-tab--active:hover {
  background: #d8f754;
  border-color: #d8f754;
  color: #0D1F3C;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(216, 247, 84, .45);
}

@media (max-width: 600px) {
  .hf-tabs {
    padding: 10px 12px;
  }

  .hf-tab {
    padding: 7px 12px;
    font-size: 14px;
    flex-basis: 100px;
  }
}


/* ─── CONTENT SECTION ────────────────────────────────────────────────────── */
.hf-section { padding: 40px 0 60px; }

.hf-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }

/* Main column */
.hf-block { margin-bottom: 36px; }
.hf-block__title { font-size: 1.2rem; font-weight: 700; color: var(--ski-blue, #1a3a6e);
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--walking-lime, #b4e040); }
.hf-richtext { font-size: .96rem; line-height: 1.7; color: #374151; }
.hf-richtext h2 { font-size: 1.2rem; font-weight: 700; color: var(--ski-blue, #1a3a6e);
  margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--walking-lime, #b4e040); }
.hf-richtext p { margin-bottom: .8em; }
.hf-richtext ul, .hf-richtext ol { padding-left: 1.4em; margin-bottom: .8em; }
.hf-richtext li { margin-bottom: .3em; }

/* Tables in richtext */
.hf-richtext table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hf-richtext thead {
  background: linear-gradient(135deg, #0a1628 0%, #1a3a6e 100%);
  color: #fff;
}

.hf-richtext th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.hf-richtext th:last-child {
  border-right: none;
}

.hf-richtext td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.hf-richtext tr:last-child td {
  border-bottom: none;
}

.hf-richtext tbody td:last-child {
  border-right: none;
}

.hf-richtext tbody tr {
  transition: background-color 0.2s ease;
}

.hf-richtext tbody tr:hover {
  background-color: #f9fafb;
}

.hf-richtext tbody tr:nth-child(even) {
  background-color: #f3f4f6;
}

.hf-richtext tbody tr:nth-child(even):hover {
  background-color: #eff2f5;
}

/* Sidebar */
.hf-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}
.hf-sidebar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Header with title */
.hf-sb-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.hf-sb-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ski-blue, #1a3a6e);
  margin: 0;
}

/* Info list with checkmarks */
.hf-sb-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.hf-sb-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 1rem;
}
.hf-sb-check {
  color: #84cc16;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
/* Centro y distancia: el valor va debajo del título, alineado con el texto */
.hf-sb-item--stack {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: start;
}
.hf-sb-item--stack .hf-sb-check {
  grid-row: 1 / 3;
}
.hf-sb-item--stack .hf-sb-label {
  grid-column: 2;
  grid-row: 1;
}
.hf-sb-item--stack .hf-sb-value {
  grid-column: 2;
  grid-row: 2;
}
.hf-sb-label {
  color: #6b7280;
  flex: 0 0 auto;
}
.hf-sb-value {
  color: #111827;
  font-weight: 500;
}
.hf-sb-stars {
  color: #f59e0b;
  font-weight: 600;
}

/* Prices section */
.hf-sb-prices-section {
  margin-bottom: 16px;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}
.hf-sb-prices-label {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  display: block;
}
.hf-sb-price-display {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
}
.hf-sb-price-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ski-blue, #1a3a6e);
  display: block;
}
.hf-sb-price-detail {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hf-sb-option {
  font-weight: 600;
  color: #374151;
  position: relative;
}
.hf-sb-option-ref {
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 4px;
}
.hf-sb-cobro {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Buttons group */
.hf-sb-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.hf-sb-btn-primary,
.hf-sb-btn-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.hf-sb-btn-primary {
  background: var(--walking-lime, #b4e040);
  color: #0a1628;
  text-transform: uppercase;
}

.hf-sb-btn-primary:hover {
  background: #a4d639;
}

.btn-secondary,
.hf-sb-btn-secondary {
  background: #d1d5db;
  color: #374151;
}

.btn-secondary:hover,
.hf-sb-btn-secondary:hover {
  background: #9ca3af;
}

/* Ratings section */
.hf-sb-ratings {
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}
.hf-sb-ratings-text {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 8px;
}
.hf-sb-stars-rating {
  display: flex;
  justify-content: center;
  gap: 2px;
}
.hf-sb-star {
  color: #d1d5db;
  font-size: 1rem;
}
.hf-sb-star.active {
  color: #f59e0b;
}
.hf-sb-star.half {
  background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── FOTOS GRID ─────────────────────────────────────────────────────────── */
.hf-fotos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hf-foto-item { display: block; border-radius: 8px; overflow: hidden; cursor: pointer; }
.hf-foto-item img { width: 100%; height: 220px; object-fit: cover; display: block;
  transition: transform .3s; }
.hf-foto-item:hover img { transform: scale(1.04); }

/* Lightbox */
.hf-lb { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 9999;
  display: flex; align-items: center; justify-content: center; }
.hf-lb__wrap { max-width: 90vw; max-height: 85vh; }
.hf-lb__wrap img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.hf-lb__close { position: fixed; top: 20px; right: 24px; background: transparent; border: none;
  color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1; z-index: 10000; }
.hf-lb__arrow { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15);
  border: none; color: #fff; font-size: 2.5rem; cursor: pointer; padding: 10px 16px;
  border-radius: 4px; z-index: 10000; transition: background .2s; }
.hf-lb__arrow:hover { background: rgba(255,255,255,.3); }
.hf-lb__arrow--prev { left: 16px; }
.hf-lb__arrow--next { right: 16px; }

/* ─── MAPA ───────────────────────────────────────────────────────────────── */
.hf-mapa-wrap { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,.1); }
#hf-map { height: 500px; width: 100%; }

/* ─── OPINIONES ──────────────────────────────────────────────────────────── */
.hf-opiniones-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.hf-opinion { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; }
.hf-opinion__header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.hf-opinion__autor { font-size: .95rem; color: var(--ski-blue, #1a3a6e); }
.hf-opinion__score { color: #f59e0b; font-size: .95rem; }
.hf-opinion__fecha { font-size: .8rem; color: #9ca3af; margin-left: auto; }
.hf-opinion__titulo { font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
.hf-opinion__texto { font-size: .9rem; color: #4b5563; margin: 0; line-height: 1.6; }

/* ─── TRIPADVISOR ────────────────────────────────────────────────────────── */
.hf-ta-wrap { width: 100%; }
.hf-ta-iframe { width: 100%; min-height: 600px; border: none; display: block; }
.hf-ta-link { text-align: center; padding: 40px 0; }

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */
.hf-empty { text-align: center; color: #6b7280; font-size: 1rem; padding: 48px 0; }

/* ─── SLIDER DE FOTOS ─────────────────────────────────────────────────────── */
.ficha-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #e5e7eb;
  line-height: 0;
}
.ficha-slider__track {
  display: flex;
  transition: transform 0.35s ease;
}
.ficha-slider__slide {
  min-width: 100%;
  flex-shrink: 0;
}
.ficha-slider__slide img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}
.ficha-slider__slide img:hover {
  opacity: 0.9;
}
.ficha-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 4px;
  z-index: 10;
  transition: background 0.2s;
}
.ficha-slider__btn:hover {
  background: rgba(255, 255, 255, 0.4);
}
.ficha-slider__btn--prev {
  left: 16px;
}
.ficha-slider__btn--next {
  right: 16px;
}
.ficha-slider__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.ficha-slider__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.ficha-slider__dot.active {
  background: #fff;
}
.ficha-slider__dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* ─── MODAL CONSULTAS ────────────────────────────────────────────────────── */
.hf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: auto;
}

.hf-modal[hidden] {
  display: none;
}

.hf-modal__dialog {
  background: white;
  margin: 50px auto;
  padding: 0;
  width: 750px;
  max-width: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hf-modal__header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hf-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.hf-modal__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.hf-modal__close:hover {
  color: #666;
}

.hf-modal__body {
  padding: 20px;
}

.hf-modal__subtitle {
  margin-top: 0;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hf-layout { grid-template-columns: 1fr; }
  .hf-sidebar { order: -1; }
  .hf-sidebar-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .hf-sb-btn { grid-column: 1/-1; }
  .hf-fotos-grid { grid-template-columns: repeat(2, 1fr); }
  .hf-opiniones-grid { grid-template-columns: 1fr; }
  .hf-hero__slider, .hf-hero__placeholder img { height: 280px; }
  #hf-map { height: 350px; }
  .ficha-slider__slide img { height: 280px; }
}
@media (max-width: 600px) {
  .hf-hero__info-inner { flex-direction: column; gap: 16px; }
  .hf-fotos-grid { grid-template-columns: 1fr 1fr; }
  .hf-foto-item img { height: 160px; }
  .hf-hero__name { font-size: 1.35rem; }
  .ficha-slider__slide img { height: 220px; }
}

.cf-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #dc2626;
}

.cf-field.is-invalid input,
.cf-field.is-invalid select,
.cf-field.is-invalid textarea {
  border-color: #dc2626;
}

.hf-swal {
  z-index: 10000;
}
/* Buscador dentro del hero del hotel */
.hf-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 2rem;
}
.hf-hero__search {
    display: none;
}

/* Buscador de una línea entre .hf-hero y .hf-tabs: la mitad de la barra queda en el hero
   y la otra mitad en los tabs. Los tabs reciben padding-top para que sus enlaces queden
   debajo de la barra; mientras los tabs están pegados arriba, ese padding se quita. */
.hf-buscador-linea {
    position: relative;
    z-index: 150;
    height: 0;
}
.hf-buscador-linea .hero-new__search-bar {
    transform: translateY(-50%);
}
.hf-buscador-linea .hero-new__search-bar {
    width: 80%;
    margin: 0 auto;
    margin-bottom: 0;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    background: var(--ski-blue);
}
.hf-buscador-linea .search-field label {
    color: #fff;
    opacity: 1;
}
.hf-buscador-linea .search-btn--text {
    width: auto;
    min-width: 140px;
    height: 44px;
    color: #000;
}
.hf-buscador-linea + .hf-tabs-nav {
    padding-top: 84px;
}
.hf-buscador-linea + .hf-tabs-nav.is-stuck {
    padding-top: 0;
}

/* Móvil: barra al 100% y campos uno debajo del otro */
@media (max-width: 768px) {
    /* El buscador va debajo del hero, sin solaparse: no se sube ni se reserva espacio para los tabs */
    .hf-buscador-linea {
        height: auto;
        z-index: auto;
        padding: 16px 0;
        background: #fff;
    }
    .hf-buscador-linea .hero-new__search-bar {
        width: 100%;
        transform: none;
        flex-direction: column;
        align-items: stretch;
    }
    .hf-buscador-linea + .hf-tabs-nav,
    .hf-buscador-linea + .hf-tabs-nav.is-stuck {
        padding-top: 0;
    }
    .hf-buscador-linea .search-field {
        width: 100%;
        min-width: 0;
    }
    .hf-buscador-linea .search-btn--text {
        width: 100%;
    }
}

/* El calendario de jQuery UI va al final del body: debe quedar sobre los tabs sticky (z-index 100) y la barra (150) */
.ui-datepicker {
    z-index: 1000 !important;
}

/* El popover de pax sale por encima de los tabs sticky (z-index 100) */
.hf-hero__inner:has(.pax-popover:not([hidden])) {
    z-index: 200;
}

/* El popover es blanco: el texto hereda blanco del hero */
.hf-hero .pax-popover {
    color: var(--inghams-charcoal, #1f2937);
}
@media (max-width: 768px) {
    .hf-hero__inner {
        grid-template-columns: 1fr;
    }
    .hf-tabs-nav {
        position: static;
    }
    .hf-sidebar {
        position: static;
    }
    .hf-sidebar-card {
        grid-template-columns: 1fr;
    }
}
