:root{
  --accent:#ffffff;
  --chip:#121216;
  --chipBorder:#2a2a32;
  --bg:#0e0e12;
  --panel:#0f0f13;
  --pill:#121217;
  --text:#f5f6f8;
  --muted:#a7a8af;
  --btn:#ffffff; --btnText:#0b0b10;
  --btnOutline:#2b2b33;
  --radius:18px;

  /* Colores de los clusters personalizables */
  --cluster-small:#ff6fa8;
  --cluster-medium:#ffb75e;
  --cluster-large:#6ef2b2;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Inter,system-ui,sans-serif;background:#000;}
#map {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* 🧭 Barra superior de búsqueda */
.topbar{
  position:absolute;top:18px;left:18px;right:18px;z-index:30;
  display:flex;justify-content:center;pointer-events:none;
}
.searchwrap{
  pointer-events:auto;display:flex;gap:10px;align-items:center;
  background:#0b0b10;border:1px solid #222531;box-shadow:0 12px 40px rgba(0,0,0,.35);
  border-radius:15px;padding:10px 12px;max-width:1180px;width:90%;margin-left:-40px;
}

/* En desktop, “aplanamos” este contenedor para que select y botón
   queden al mismo nivel que el input, como en tu diseño original */
@media (min-width: 641px){
  .search-actions{display:contents;}
}
@media (min-width: 1000px){
  .searchwrap {
    flex-flow: row-reverse;
  }
  .search-actions{
    display: flex;
  }
}

.select{
  background:#13141b;border:1px solid #232530;color:#e9eaf0;border-radius:8px;
  padding:12px 14px;appearance:none;min-width:100px;
  outline: grey;
}
.input-wrap{position:relative; flex:1}
.input{
  width:100%;background:#12131a;border:1px solid #232530;color:#fff;
  padding:12px 42px 12px 16px;border-radius:8px;outline:0;
}
.clear-btn{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border-radius:50%; border:1px solid #2b2d39;
  background:#14141b; color:#c9cad1; cursor:pointer; display:none;
}
.input:focus + .clear-btn, .input:not(:placeholder-shown) + .clear-btn { display:block; }

/* 🔍 Botón de búsqueda con icono de lupa */
.btn{
  background:#fff; color:#0b0b10; border:1px solid #e6e6ea;
  padding:12px 16px;border-radius:8px;font-weight:800;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .2s ease, transform .15s ease;
}
.btn:hover{background:#f0f0f0;transform:translateY(-1px)}
.btn svg{width:20px;height:20px;}
.btn-text { display:inline; }
.btn-icon { display:none; }

/* 🌈 Botones mapa */
.map-btn{
  position:absolute;right:12px;z-index:40;background:#0b0b10;border:1px solid #222531;color:#fff;
  border-radius:10px;padding:7px 10px;cursor:pointer;box-shadow:0 8px 28px rgba(0,0,0,.25)
}
#btn3d{bottom:24px;right:55px}
#btnTheme{bottom:24px;}
/* Botón "Volver arriba" */
#btnTop {
   bottom: 24px;
   right: 124px;
   padding: 0px;
}
#btnTop img{
    width: 35px;
    height: 28px;
}

/* 🎯 Popup elegante */
.mapboxgl-popup-content{
  width:clamp(420px, 56vw, 600px);
  max-height:72vh;overflow:auto;
  padding:0;background:#0b0b10;border:1px solid #21222b;border-radius:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.55); 
}
.mapboxgl-popup { z-index: 9999 !important; }
.mapboxgl-popup-close-button{
  color:#fff; font-size:22px; line-height:1;
  right:10px; top:10px; background:transparent; border:0;
}
.card-head{height:170px;background-size:cover;background-position:center;}
.card-body{padding:22px;}
.card-title{font-size:26px;font-weight:900;margin:0 0 8px; color: white;}
.card-sub{font-size:18px;color:#a9aab2;margin-bottom:12px;}
.chips{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px; color: white;}
.chip{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;background:var(--chip);border:1px solid var(--chipBorder);}
.chip img{width:16px;height:16px}
.actions{display:flex;gap:16px}
.btn-solid,.btn-ghost{flex:1;border-radius:14px;padding:14px 18px;font-weight:800;text-align:center;text-decoration: none;}
.btn-solid{background:#fff;color:#0b0b10;border:1px solid #e6e6ea}
.btn-ghost{background:#121217;color:#fff;border:1px solid #2c2e39;}
.btn-ghost:hover{background:#15161d}

/* 💠 Filtros modal */
.filters-fab{
  position:absolute; left:24px; bottom:24px; z-index:40;
  background:#0b0b10; color:#fff; border:1px solid #222531;
  border-radius:20px; padding:12px 16px; font-weight:800; cursor:pointer;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.filters-modal {
  position: absolute;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}
.filters-card {
  position: relative;
  z-index: 10001;
  width: min(720px, 92vw);
  max-height: 78vh;
  overflow: auto;
  background: #0b0b10;
  color: #fff;
  border: 1px solid #21222b;
  border-radius: 22px;
  padding: 18px 16px 22px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}
button:hover:not(.btn-solid):not(.btn-ghost):not(.filters-close) {
  background-color: #333 !important;
  transition: background-color 0.2s ease;
  color: white;
}
.mapboxgl-ctrl button:not(:disabled):hover{ background:black!important; }
.mapboxgl-ctrl button:not(:disabled):hover:hover span{ filter:invert() !important; }
#geoYes:hover{ color:white!important; }
.filters-head{display:flex;align-items:center;justify-content:space-between;margin:2px 8px 14px}
.filters-close{ background:transparent;color:#fff;border:0;font-size:22px;cursor:pointer; }

/* 🎨 Grid general */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
  justify-content: center;
}

/* 🧩 Card de filtro */
.filter-item { position: relative; }
.filter-item input { display:none; }
.filter-item label{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; padding:18px 10px; border-radius:18px; background:#11131a; border:1px solid #202230;
  color:#fff; text-align:center; cursor:pointer; transition:all .25s ease; box-shadow:0 0 0 rgba(255,255,255,0);
}
.filter-item label img{ width:100px; height:100px; object-fit:contain; border-radius:50%; transition:transform .3s ease; }
.filter-item label span{ font-size:14px; font-weight:500; line-height:1.2; }
.filter-item label:hover{ background:#191b24; transform:translateY(-2px); }
.filter-item input:checked + label{
  border-color:#ED0A7E; box-shadow:0 0 12px rgba(237,10,126,.45); background:#14161e; transform:translateY(-2px);
}
.filter-item input:checked + label img{ transform:scale(1.08); }
.filter-item img{ width:100%; }

/* 🔘 Botones de acción (Cómo llegar / Llamar) */
.actions{ display:flex; gap:14px; margin-top:16px; }
.btn-solid,.btn-ghost{
  flex:1;border-radius:14px;padding:14px 18px;font-weight:700;text-align:center;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #ccc;background:#fff;color:#000;transition:all .25s ease;text-decoration:none;
}
.btn-solid:hover,.btn-ghost:hover{ background:#000; color:#fff; border-color:#555; }
.btn-solid svg,.btn-ghost svg{ width:18px; height:18px; stroke-width:2; }

/* === Layout general === */
.layout { display:flex; width:100%; height:100vh; overflow:hidden; }

/* Zona del mapa */
.map-area { flex:1 1 auto; position:relative; transition:flex .4s ease; }

/* Franja lateral */
.scroll-hint-bar{
  width:50px; background:linear-gradient(180deg,#0e0e12 0%,#1a1a20 100%); border-left:1px solid #2a2a32;
  display:flex; flex-direction:column; align-items:center; justify-content:space-between; padding:40px 0;
  position:relative; transition:all .4s ease; cursor:ns-resize;
}
.scroll-hint-bar{
  z-index: 1;
}
.scroll-hint-bar:hover{ width:110px; background:linear-gradient(180deg,#14141a 0%,#20212a 100%); border-left-color:#444; }

/* Estado claro del scroll-bar lateral */
.scroll-hint-bar.light, .scroll-hint-bar.light:hover {
  background:#fff; border-left:1px solid #fff;
}

/* Flechas */
.scroll-arrow{ width:0; height:0; border-left:7px solid transparent; border-right:7px solid transparent; opacity:.6; transition:all .3s ease; }
.scroll-arrow:first-child{ border-bottom:10px solid #ff2d96; animation:arrowUp 2s ease-in-out infinite; }
.scroll-arrow:last-child{ border-top:10px solid #ff2d96; animation:arrowDown 2s ease-in-out infinite; }
.scroll-hint-bar:hover .scroll-arrow:first-child{ border-bottom-color:#ff58ae; }
.scroll-hint-bar:hover .scroll-arrow:last-child{ border-top-color:#ff58ae; }
@keyframes arrowUp{ 0%,100%{transform:translateY(0);opacity:.4} 50%{transform:translateY(-8px);opacity:1} }
@keyframes arrowDown{ 0%,100%{transform:translateY(0);opacity:.4} 50%{transform:translateY(8px);opacity:1} }

/* Barra vertical */
.scroll-track{ width:3px; height:70%; background:rgba(255,255,255,.1); border-radius:2px; overflow:hidden; position:relative; transition:width .4s ease; }
.scroll-thumb{ width:100%; height:25%; background:#ff2d96; border-radius:2px; animation:moveScroll 2.4s ease-in-out infinite; transition:all .4s ease; }
.scroll-hint-bar:hover .scroll-thumb{ animation-duration:1.4s; background:#ff58ae; }
@keyframes moveScroll{ 0%,100%{transform:translateY(0);opacity:.5} 50%{transform:translateY(300%);opacity:1} }

.mapboxgl-ctrl-top-right{ top:20px !important }

/* 🌐 Ajustes para móvil */
@media (max-width: 640px) {
  /* layout móvil del buscador */
  .searchwrap{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    margin-left:0;
   width: 90%;
        left: -5%;
        max-width: 720px;
        position: relative;
  }
  .search-actions{
    display:flex;
    gap:10px;
    order:2;
  }
  .search-actions .select{ flex:1; }
  .search-actions .btn{
    padding:10px 12px;
    min-width:auto;
  }

  /* En móvil solo mostramos el icono de la lupa */
  .btn-text { display:none; }
  .btn-icon { display:inline; width:22px; height:22px; }

  /* Ocultar franja de scroll */
  .scroll-hint-bar{ display:none; }

  /* Mapa un poco más bajo para dejar ver el footer */
  #map{ height:90vh !important; }

  /* Topbar y controles un poco más bajos */
  .topbar{ top:72px; }
  .mapboxgl-ctrl-top-right{ top:68px !important; }
}

/* Controles y atribución */
.mapboxgl-ctrl-bottom-right,
.mapboxgl-ctrl-bottom-left {
  opacity: .3; transform: scale(.85); margin-bottom:4px; transition: opacity .3s ease;
}
.mapboxgl-ctrl-bottom-right:hover,
.mapboxgl-ctrl-bottom-left:hover { opacity:.7; }
.mapboxgl-ctrl-attrib { font-size:11px !important; color:#888 !important; background:transparent !important; padding:4px 8px !important; text-align:right; }
.mapboxgl-ctrl-attrib a { color:#aaa !important; text-decoration:none; }
.mapboxgl-ctrl-attrib a:hover { color:#fff !important; }

/* Evita el zoom automático al enfocar inputs en móvil */
@media (max-width: 768px) {
  input, select, textarea, button { font-size:16px !important; }
  .input, .select { padding:10px 14px; }
}

/* 🔹 Asegura que el mapa y sus marcadores están en su propio contexto */
#map-section { position:relative; z-index:1; overflow:visible; }
#map { position:relative; z-index:2; }
.mapboxgl-marker { position:absolute !important; z-index:5 !important; pointer-events:auto !important; transform-origin:center center; will-change:transform; }
.mapboxgl-marker img { transition: transform .25s ease, opacity .25s ease; transform-origin:center; }

/* El hero o header no deben bloquear eventos del mapa */
.site-header, .hero { pointer-events:none; }
.hero * { pointer-events:auto; }

/* Marcadores y popups por encima del mapa */
#map { position:relative; overflow:visible !important; z-index:1; }
.mapboxgl-marker, .mapboxgl-popup { z-index:10; }

/* Overlay animado del pin grande */
#map img[style*="position: absolute"] { pointer-events:none; will-change:transform; transform-origin:bottom center; }

/* Evita que header o footer bloqueen los eventos del mapa */
.site-header, .hero, .footer-redken { position:relative; z-index:10; overflow: hidden;}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{ border-bottom-color:#000 !important; }
.mapboxgl-popup{ position:absolute !important; z-index:1000 !important; will-change:transform; transform-origin:bottom center; }
#map, .mapboxgl-canvas-container, .mapboxgl-map { overflow:visible !important; }
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{ border-top-color:#0f0f12 !important; }
.mapboxgl-popup-content{
  background-color:#0f0f12 !important;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 40px rgba(0,0,0,.3);
  transform:translateY(-10px);
  animation:popupEnter .25s ease-out;
}
@keyframes popupEnter{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(-10px);} }

.card-social {
  display: flex;
  align-items: center;
  margin: 10px 0;
  gap: 10px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a1a1d;
  color: #fff;
  transition: background 0.3s ease, transform 0.2s ease;
}

.social-icon:hover {
  background: #ff9ac7; /* rosa Redken */
  transform: scale(1.05);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}


/* 🧭 Consejo de interacción solo para desktop */
/*.map-tip {
    position: absolute;
    bottom: 10px;
    left: 390px;
    height: 32px;
    transform: translateX(-50%);
    background: rgba(20, 20, 24, 0.85);
    color: #f1f1f1;
    display: flex;
    font-size: 14px;
    font-family: 'Inter', system-ui, sans-serif;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 20000000;
    align-items: center;
    transition: opacity 0.4s ease;
}*/

.map-tip {
  position: absolute;
  bottom: 10px;
  /*left: 150px;*/
  left: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 20, 24, 0.9);
  color: #f1f1f1;
  font-size: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  padding: 10px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  z-index: 9999;
  white-space: nowrap;
  cursor: default;
  transition: width 0.4s ease, padding 0.4s ease, background 0.3s ease;
  overflow: hidden;
  width: 40px; /* solo icono visible */
  justify-content: flex-start;
}

/* ✨ Sutil entrada */
.map-tip .tip-text {
  opacity: 0;
  font-size: 12px;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* Al pasar el ratón → expandir */
.map-tip:hover {
  width: 380px; /* se expande mostrando el texto */
  justify-content: flex-start;
  padding: 10px 18px;
}

.map-tip:hover .tip-text {
  opacity: 1;
  transform: translateX(0);
}
/* 🚫 Ocultar en móvil */
@media (max-width: 768px) {
  .map-tip {
    display: none;
  }
}
