/* =========================
   PERREA MADRID — Styles (clean)
   ========================= */

:root{
  --bg:#07070b;
  --panel:#0e0e16;
  --panel2:#111120;
  --line:rgba(255,255,255,.12);

  --text:#f3f3f7;
  --muted:rgba(243,243,247,.70);

  --pink:#ff2ea6;
  --lime:#7cff37;
  --cyan:#33e6ff;

  --radius:16px;

  --glow-pink: 0 0 22px rgba(255,46,166,.35);
  --glow-lime: 0 0 22px rgba(124,255,55,.30);
}

/* Base */
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(900px 600px at 20% 0%, rgba(255,46,166,.12), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(124,255,55,.10), transparent 60%),
    var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Hero logo (fuera del header) */
.hero-logo{
  display:flex;
  justify-content:center;
  padding: 4px 0;
  margin: 0;
  line-height: 0;
}

.logo-img{
  height: 56px;
  width: auto;
  display:block;
  filter: drop-shadow(0 0 22px rgba(255,46,166,.55));
}

/* Header (solo controles) */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;

  display:flex;
  align-items:center;
  justify-content:center;

  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,7,11,.75);
  backdrop-filter: blur(10px);
}

/* Controls (tabs container) */
.controls{
  display:flex;
  align-items:center;
  justify-content:center;
  width: min(980px, 100%);

  gap:10px;
  flex-wrap:wrap;

  padding: 10px 10px;
  border-radius: 18px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);
}

/* Tabs */
.type-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}

.tab{
  -webkit-appearance:none;
  appearance:none;

  border-radius:999px;
  padding:10px 14px;

  background: rgba(0,0,0,.88);
  border: 2px solid var(--lime);
  color: var(--lime);

  font-weight:900;
  line-height:1;
  cursor:pointer;
}

.tab.active{
  background: var(--lime);
  color: #0b0b0f;
  box-shadow: 0 0 18px rgba(124,255,55,.55);
}

/* Layout desktop */
.layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  height: calc(100dvh - 74px);
}

.panel{
  border-right:1px solid var(--line);
  background: rgba(14,14,22,.92);
  overflow:auto;
}

.panel-head{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.hint{ color:var(--muted); font-size:12px; }

.list{
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.card{
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding:10px 12px;
  background: rgba(17,17,32,.92);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{
  border-color: rgba(255,46,166,.45);
  box-shadow: var(--glow-pink);
  transform: translateY(-1px);
}
.card h3{
  margin:0 0 4px 0;
  font-size:15px;
}
.meta{
  color:var(--muted);
  font-size:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  color:var(--muted);
  background: rgba(0,0,0,.18);
}

.map{ width:100%; height:100%; }

.foot{
  padding:10px 16px;
  color:var(--muted);
  border-top:1px solid var(--line);
}

/* Mobile: logo huge + topbar tiny, tabs in one scroll row (and topbar overlaps logo a bit) */
@media (max-width: 900px){
  /* Logo gigante */
  .logo-img{
    height: 280px;
    max-width: 94vw;
    object-fit: contain;
  }

  /* Quita aire alrededor del logo */
  .hero-logo{
    padding: 0;
    margin: 0;
    line-height: 0;
  }

  /* Topbar compacta */
  .topbar{
    padding: 2px 6px;
    margin-top: -70px; /* solapa un poco sobre el logo (ajusta si quieres) */
  }

  /* Controles compactos */
  .controls{
    width: 100%;
    padding: 6px 6px;
    border-radius: 14px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(8px);
  }

  /* Tabs en una sola fila con scroll */
  .type-tabs{
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;

    width: 100%;
    justify-content: flex-start;

    padding-bottom: 2px;
  }
  .type-tabs::-webkit-scrollbar{ display:none; }

  .tab{
    flex: 0 0 auto;
    padding: 8px 12px;
  }

  /* Layout móvil: lista 25% + mapa 75% */
  .layout{
    display:block;
    height:auto;
  }

  .panel{
    height: 25vh;
    max-height: 25vh;
    border-right:none;
    border-bottom:1px solid var(--line);
  }

  .map{
    height: 75vh;
    min-height: 75vh;
  }
}

/* Leaflet popups: clear + readable */
.leaflet-popup-content-wrapper{
  background: rgba(255,255,255,.97) !important;
  color: #0b0b0f !important;
  border: 2px solid rgba(255,46,166,.25) !important;
  border-radius: 14px !important;
}
.leaflet-popup-tip{
  background: rgba(255,255,255,.97) !important;
}
.leaflet-popup-content{
  color:#0b0b0f !important;
}
.leaflet-popup-content a{
  color:#0b0b0f !important;
  text-decoration: underline;
}.lang{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  margin-left: 6px;
}

.lang-link{
  color: var(--lime);
  text-decoration:none;
  opacity: .85;
}

.lang-link.active{
  opacity: 1;
  text-decoration: underline;
}

.lang-sep{
  color: rgba(243,243,247,.5);
}