/* Portada: el mapa es el escenario; lista y vista previa flotan encima como en una app de mapas. */
.home-stage { position: relative; height: calc(100dvh - var(--nav-alto)); min-height: 600px; overflow: hidden; background: var(--panel-3); }
#home-map { position: absolute; inset: 0; }
.home-rail {
  position: absolute;
  top: .9rem;
  bottom: .9rem;
  left: .9rem;
  z-index: 800;
  display: flex;
  flex-direction: column;
  width: 392px;
  overflow: hidden;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  background: var(--panel);
  box-shadow: var(--sombra-flotante);
}
.interactive-intro { padding: 1.1rem 1.1rem .9rem; border-bottom: 1px solid var(--linea); }
.interactive-intro h1 { margin-bottom: .4rem; font-size: 1.875rem; letter-spacing: -.03em; }
.interactive-intro > p { margin-bottom: .75rem; color: var(--texto-2); font-size: .9375rem; }
.trip-search > div { display: flex; gap: .4rem; }
.trip-search input { flex: 1; min-width: 0; }
.discovery { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.discovery-toolbar { padding: .75rem 1.1rem 0; }
.discovery-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.discovery-title h2 { font-size: .9375rem; }
.surprise { min-height: 30px; padding: .15rem .5rem; border-color: transparent; background: transparent; color: var(--marca); font-size: .8125rem; }
.discovery-filters { display: flex; gap: .3rem; margin: .4rem -1.1rem 0; padding: 0 1.1rem .1rem; overflow-x: auto; scrollbar-width: none; }
.discovery-filters::-webkit-scrollbar { display: none; }
.discovery-filters button { flex: none; min-height: 30px; padding: .15rem .6rem; border-color: var(--linea); color: var(--texto-2); font-size: .8125rem; white-space: nowrap; }
.discovery-filters button[aria-pressed="true"] { border-color: var(--texto); background: var(--texto); color: var(--panel); }
.discovery-filters button[aria-pressed="true"]:hover:not(:disabled) { background: var(--texto); color: var(--panel); }
.discovery-board, .discovery-list { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.discovery-board[hidden] { display: none !important; }
.discovery-list-heading { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem 1.1rem .35rem; color: var(--texto-3); font-family: var(--fuente-mono); font-size: .75rem; }
.discovery-list-heading a { font-family: var(--fuente); font-size: .8125rem; font-weight: 500; }
.discovery-cards { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--linea); }
.discovery-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  justify-content: start;
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 68px;
  padding: .5rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--linea);
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.discovery-card:not(:has(img))::before { content: ''; width: 56px; height: 56px; border-radius: var(--radio-s); background: var(--panel-3); }
.discovery-card img { width: 56px; height: 56px; border-radius: var(--radio-s); object-fit: cover; filter: var(--filtro-foto); }
.discovery-card > span { display: flex; flex-direction: column; min-width: 0; }
.discovery-card strong { font-size: .9375rem; font-weight: 600; }
.discovery-card small { color: var(--texto-3); font-size: .8125rem; font-weight: 400; }
.discovery-card[aria-pressed="true"] { background: var(--marca-suave); box-shadow: inset 3px 0 var(--marca); }
.list-controls { display: flex; align-items: center; gap: .4rem; padding: .4rem 1.1rem; border-top: 1px solid var(--linea); }
.list-controls p { flex: 1; overflow: hidden; color: var(--texto-3); font-family: var(--fuente-mono); font-size: .6875rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.list-controls button { width: 34px; min-height: 34px; padding: 0; }
#discovery-empty { margin: .75rem 1.1rem; }

.place-preview {
  position: absolute;
  top: .9rem;
  right: 3.75rem;
  z-index: 800;
  width: 340px;
  max-height: calc(100% - 1.8rem);
  overflow-y: auto;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  background: var(--panel);
  box-shadow: var(--sombra-flotante);
}
.preview-visual { position: relative; height: 190px; background: var(--panel-3); }
.preview-visual img, .preview-visual iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.preview-visual img { filter: var(--filtro-foto); }
#preview-placeholder { display: grid; place-items: center; height: 100%; color: var(--texto-3); font-size: .875rem; }
.preview-modes { position: absolute; top: .5rem; left: .5rem; display: flex; overflow: hidden; border: 1px solid var(--linea); border-radius: var(--radio-s); background: var(--panel); }
.preview-modes button { min-height: 30px; padding: .1rem .55rem; border: 0; border-radius: 0; font-size: .75rem; }
.preview-modes button[aria-pressed="true"] { background: var(--texto); color: var(--panel); }
.preview-modes button[aria-pressed="true"]:hover:not(:disabled) { background: var(--texto); color: var(--panel); }
.preview-copy { padding: .85rem .95rem .95rem; }
.preview-label { color: var(--marca); font-size: .75rem; font-weight: 600; }
.preview-copy h3 { margin: .1rem 0 .3rem; font-size: 1.125rem; font-weight: 600; }
#preview-description { display: -webkit-box; overflow: hidden; color: var(--texto-2); font-size: .875rem; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.preview-heading { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-top: .7rem; }
.preview-heading .boton { min-height: 36px; font-size: .8125rem; }

.home-features { width: min(1120px, 100%); margin: 0 auto; padding: 2.5rem 1.25rem 0; }
.home-features > h2 { margin-bottom: 1rem; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); letter-spacing: -.028em; }
.home-features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--linea-fuerte); }
.home-features-grid a { display: block; padding: 1rem 1.25rem 1.25rem 0; color: var(--texto); text-decoration: none; }
.home-features-grid a + a { padding-left: 1.25rem; border-left: 1px solid var(--linea); }
.home-features-grid a:hover strong { color: var(--acento); }
.home-features-grid span { display: block; margin-bottom: .6rem; color: var(--texto-3); font-family: var(--fuente-mono); font-size: .75rem; }
.home-features-grid strong { display: block; margin-bottom: .2rem; font-size: 1rem; font-weight: 600; }
.home-features-grid p { color: var(--texto-2); font-size: .875rem; }
.home-features-cta { margin-top: 1.25rem; font-size: .9375rem; }

@media (max-width: 1080px) {
  .place-preview { top: auto; right: .9rem; bottom: .9rem; width: 300px; max-height: 60%; }
  .preview-visual { height: 130px; }
}

@media (max-width: 860px) {
  /* En móvil se apilan: búsqueda, mapa, selección y vista previa. */
  .home-stage { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; background: var(--fondo); }
  .home-rail { display: contents; }
  .interactive-intro { order: 1; background: var(--panel); }
  .interactive-intro h1 { font-size: 1.625rem; }
  #home-map { position: relative; inset: auto; order: 2; height: 42dvh; min-height: 260px; }
  .discovery { order: 3; background: var(--panel); }
  .surprise, .discovery-filters button, .list-controls button, .preview-modes button { min-height: 44px; }
  .list-controls button { width: 44px; }
  .discovery-cards { display: flex; flex: none; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
  .discovery-card { flex: 0 0 78%; border-right: 1px solid var(--linea); scroll-snap-align: start; }
  .place-preview { position: static; order: 4; width: auto; max-height: none; border-width: 1px 0; border-radius: 0; box-shadow: none; }
  .preview-visual { height: 190px; }
  .preview-heading .boton { min-height: 44px; }
  .home-features { padding: 1.75rem 1rem 0; }
  .home-features-grid { grid-template-columns: minmax(0, 1fr); }
  .home-features-grid a, .home-features-grid a + a { padding: .9rem 0; border-left: 0; border-bottom: 1px solid var(--linea); }
}

.home-cerca { margin-top: .6rem; font-size: .875rem; font-weight: 500; }
