/* Rentas Tulum v10 — portada: título + mosaico de destacadas → recorrido por zonas → catálogo.
   · Mosaico pequeño y sutil de 6 propiedades destacadas arriba a la derecha, junto al título (sustituye la burbuja
     del opening y el carril de Destacadas). En el teléfono es una tira deslizable bajo el buscador.
   · Teléfono y tablet (≤1023 px): el recorrido por las 11 zonas es un carrusel horizontal de una sola pantalla,
     sin tarjetas fijas que se encimen; barra ‹ 3/11 · Zona › justo encima del dock.
   · Pantallas de 320 px: botones que pueden partir su texto y tarjetas de tipos de renta sin recortes. */

/* ——— Opening: mosaico de destacadas ——— */
.hero-feat { pointer-events: auto; min-width: 0; }
.hf-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.hf-title { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; color: var(--gold-ink); }
@media (max-width: 1199px) { .hf-t1 { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } } /* en pantallas medianas y en el teléfono se lee «Destacadas» */
.hf-all {
  display: inline-flex; align-items: center; gap: .15em; min-height: 32px; padding: 0 .15em 0 .45em; border-radius: 8px;
  font-size: .8125rem; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.hf-all svg { width: 1.05em; height: 1.05em; stroke-width: 2.2; }
.hf-all:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hf-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hf-grid > li { min-width: 0; }
.hf-tile {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; isolation: isolate;
  border-radius: 14px; background: var(--sand); color: #fff; text-decoration: none; box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.hf-skel { box-shadow: none; background: linear-gradient(100deg, var(--sand) 35%, #f2ece2 50%, var(--sand) 65%) 0 0 / 300% 100%; animation: hfShimmer 1.4s linear infinite; }
@keyframes hfShimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.hf-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 500ms var(--ease), transform 900ms var(--ease); }
.hf-tile.ok img { opacity: 1; }
.hf-tile:not(.hf-skel)::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(28, 21, 15, .9) 0%, rgba(28, 21, 15, .62) 30%, rgba(28, 21, 15, 0) 64%);
}
.hf-cap { position: absolute; inset: auto 0 0; z-index: 2; display: grid; gap: 1px; padding: 6px 8px 7px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.hf-cap b { font-size: .78rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-cap small { font-size: .6875rem; font-weight: 600; color: #f6ecd9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-tile:focus-visible { outline: none; box-shadow: var(--focus); }
@media (hover: hover) and (pointer: fine) {
  .hf-tile:not(.hf-skel):hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .hf-tile:hover img { transform: scale(1.06); }
}

/* Escritorio: el título a la izquierda y el mosaico (3 × 2) arriba a la derecha, a la altura del título */
@media (min-width: 1024px) {
  .hero-inner {
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 400px);
    column-gap: clamp(2rem, 1rem + 3vw, 4.5rem); align-content: center; align-items: start;
  }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-feat {
    grid-column: 2; grid-row: 1; padding: 12px; border-radius: var(--r-lg);
    background: rgba(251, 250, 247, .86); border: 1px solid rgba(255, 255, 255, .75); box-shadow: var(--shadow-2);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  }
  .hf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) and (max-width: 1279px) { .hf-cap { padding-inline: 6px; } .hf-cap b { font-size: .75rem; } }
/* Teléfono y tablet: tira deslizable bajo el buscador (en tablet caben las 6 sin deslizar) */
@media (max-width: 1023px) {
  .hero-feat { padding: 10px 10px 12px; border-radius: 22px; background: rgba(251, 250, 247, .94); border: 1px solid rgba(255, 255, 255, .75); box-shadow: var(--shadow-2); }
  .hf-head { padding-inline: 4px; margin-bottom: 6px; }
  .hf-grid {
    grid-auto-flow: column; grid-auto-columns: minmax(116px, 1fr);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: -10px; padding: 2px 10px; scroll-padding-inline: 10px;
  }
  .hf-grid::-webkit-scrollbar { display: none; }
  .hf-grid > li { scroll-snap-align: start; }
  .hf-tile { aspect-ratio: 5 / 4; border-radius: 12px; }
}
@media (min-width: 641px) and (max-width: 1023px) { .hf-grid { grid-auto-columns: minmax(100px, 1fr); } } /* tablet: las 6 sin deslizar */

/* ——— Recorrido en el teléfono y la tablet: carrusel horizontal de una sola pantalla ——— */
.tour-ctl { display: none; }
@media (max-width: 1023px) {
  /* Al soltar el dedo con el carrusel casi en pantalla, tour.js acomoda la página para que lo llene (borde inferior del
     recorrido = borde inferior de la pantalla): la tarjeta y su barra quedan siempre sobre el dock */
  .tour { position: relative; --ctl-h: 52px; --ctl-gap: 10px; }
  .tour-nav { display: none !important; } /* la barra del carrusel hace de índice */
  .tour-track {
    --sw: min(calc(100vw - 2 * var(--gutter) - 20px), 560px);
    position: relative; display: flex; align-items: stretch; gap: 10px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-inline: calc((100vw - var(--sw)) / 2);
  }
  .tour-track::-webkit-scrollbar { display: none; }
  .tour-track > .interlude {
    flex: 0 0 var(--sw); width: var(--sw); max-width: none; margin: 0;
    min-height: 100vh; min-height: 100svh;
    padding: calc(var(--topbar-h) + env(safe-area-inset-top) + var(--s4)) 0
             calc(var(--dock-h) + 12px + var(--ctl-gap) * 2 + var(--ctl-h) + env(safe-area-inset-bottom));
    display: flex; align-items: flex-end; justify-content: center;
    scroll-snap-align: center;
  }
  .tour-track .il-card { position: relative; bottom: auto; width: 100%; max-width: none; }
  .tour-track .il-card .kicker { font-size: .75rem; letter-spacing: .12em; }
  .tour-track .il-actions .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: .55em; }
  /* en el carrusel las tarjetas no "suben" al entrar: ya están en su lugar */
  html.w3d-rise .tour-track .il-card.rise { opacity: 1; transform: none; transition: none; }
  /* sin WebGL cada zona es una foto real con su tarjeta encima */
  html.w3d-nogl .tour-track > .interlude { min-height: 100vh; min-height: 100svh; margin: 0; border-radius: 26px; padding-inline: var(--s3); background-color: var(--sand); }

  .tour-ctl {
    position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--dock-h) + 12px + var(--ctl-gap) + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 4px;
    width: min(calc(100% - 2 * var(--gutter)), 440px); height: var(--ctl-h); padding: 4px; overflow: hidden;
    border-radius: var(--r-pill); background: rgba(251, 250, 247, .96); border: 1px solid rgba(255, 255, 255, .7); box-shadow: var(--shadow-2);
  }
  .tc-btn {
    flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: var(--ink); color: #fff; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    transition: background-color var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
  }
  .tc-btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
  .tc-btn:active { transform: scale(.94); }
  .tc-btn:focus-visible { outline: none; box-shadow: var(--focus); }
  .tc-btn[aria-disabled="true"] { background: var(--bg-2); color: var(--muted); cursor: default; }
  .tc-now { flex: 1; min-width: 0; margin: 0; display: flex; align-items: baseline; justify-content: center; gap: .5em; font-size: .9375rem; line-height: 1.2; white-space: nowrap; }
  .tc-count { flex: none; font-size: .8125rem; font-weight: 700; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
  .tc-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
  .tc-bar { position: absolute; left: 56px; right: 56px; bottom: 5px; height: 2px; border-radius: 2px; background: rgba(42, 33, 25, .08); overflow: hidden; }
  .tc-bar i { position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--tn-p, 0)); transition: transform 420ms var(--ease); }
}
/* Pantallas bajas: menos texto en la tarjeta para que el mundo 3D se siga viendo arriba */
@media (max-width: 1023px) and (max-height: 640px) { .tour-track .il-devs { display: none; } }

/* ——— Pantallas angostas: nada se recorta ni se sale ——— */
@media (max-width: 1023px) {
  .rt-cards, .faq-list { grid-template-columns: minmax(0, 1fr); }
}
.rt-card .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: .55em; }

@media (prefers-reduced-motion: reduce) {
  .hf-skel { animation: none; }
  .hf-tile, .hf-tile img, .tc-btn, .tc-bar i { transition: none; }
}
