@charset "UTF-8";

/* ===== SECCIÓN ===== */
.map-editorial-section {
  position: relative;
  background: #050505;
  padding: 0 20px 120px;
}

/* ===== CONTENEDOR ===== */
.map-editorial-container {
  max-width: 1000px;
  margin: 60px auto 0;
  text-align: center;
}

/* ===== CONTROLES ===== */
.map-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.map-btn {
  background: white;
  border: 1px solid #555;
  color: black;
  padding: 8px 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.map-btn.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}
.map-btn:hover {
    transform: scale(1.05);
    background: var(--accent-gold);
    color: #000;
}


/* ===== MAPA ===== */
.map-wrapper {
  position: relative;
  margin: 0 auto 25px;
}

.spain-map {
  width: 100%;
  max-width: 900px;
  height: auto;
}

/* Comunidades */
.ccaa {
  fill: #111;
  stroke: #333;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.2s, stroke 0.2s;
}

.ccaa:hover {
  fill: var(--accent-cyan);
  stroke: var(--accent-cyan);
}

.ccaa.total   { fill: var(--accent-gold); }
.ccaa.anular  { fill: var(--accent-ring); }
.ccaa.parcial { fill: #444; }

/* ===== TOOLTIP ===== */
.map-tooltip {
  position: fixed; /* 🔴 antes: absolute */
  pointer-events: none;
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid #333;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 9999;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== LEYENDA ===== */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: #aaa;
  font-size: 0.9rem;
}

.legend-item {
  position: relative;
  padding-left: 22px;
}

.legend-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: #555;
}

.legend-item.total::before   { background: var(--accent-gold); }
.legend-item.anular::before  { background: var(--accent-ring); }
.legend-item.parcial::before { background: #555; }

/* ===== PANEL LATERAL ===== */
.ccaa-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 360px;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-left: 1px solid #222;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

.ccaa-panel.open {
  transform: translateX(0);
}

.ccaa-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #222;
}

.ccaa-panel-header h3 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0;
}

#ccaa-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
}

#ccaa-close:hover {
  color: #fff;
}

.ccaa-panel-content {
  padding: 20px;
  color: #bbb;
  font-size: 0.95rem;
  line-height: 1.6;
}
.ccaa-panel-content a {
    color: var(--accent-cyan);
}  
.ccaa-info {
    display: none;
}

.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{
  margin-top: 2.5rem;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.leaflet-popup-content-wrapper {
  background: rgba(5, 5, 5, 0.92);
  color: var(--text-primary);
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255,255,255,0.03);
  backdrop-filter: blur(8px);
}
.leaflet-popup-tip {
  background: rgba(5, 5, 5, 0.92);
  border: 1px solid var(--glass-border);
}
.leaflet-popup-content {
  margin: 16px 20px;
  font-family: var(--body-font-family);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}
.leaflet-popup-content strong,
.leaflet-popup-content h3 {
  display: block;
  border-bottom: 1px solid;
  font-family: var(--title-font-family);
  font-size: 1.2rem;
  text-transform: uppercase;
}
.leaflet-container a.leaflet-popup-close-button {
  color: var(--text-secondary);
  font-size: 18px;
}

.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus-visible {
  color: var(--accent-cyan);
}
.leaflet-fade-anim .leaflet-popup {
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(4px);
}

.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
  transform: translateY(0);
}


.leaflet-marker-icon {
  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.12))
    drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
}






.leaflet-popup-content-wrapper {
  background: rgba(15, 18, 25, 0.95);
  color: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 0;
}
.leaflet-popup-content-wrapper {
  background: rgba(15, 18, 25, 0.95);
  color: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 0;
}.leaflet-popup-content h3 {
  margin: 0 0 8px;
  font-family: var(--title-font-family, 'Rajdhani');
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.leaflet-popup-content p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.85);
}

.leaflet-popup-content p:nth-of-type(2),
.leaflet-popup-content p:nth-of-type(3) {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}
.leaflet-popup-content p b {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.coordenadas{
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: monospace;
}

.leaflet-popup-tip {
  background: rgba(15, 18, 25, 0.95);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.7);
}

.leaflet-popup-close-button {
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  top: 6px;
  right: 8px;
}

.leaflet-popup-close-button:hover {
  color: #ffffff;
}

.leaflet-popup-content .gmaps {
  /* margin-top: 12px; */
  /* padding: 6px 16px; */
  font-size: 0.85rem;
  font-weight: 500;
  /* background: rgba(255, 255, 255, 0.08); */
  /* border: 1px solid rgba(255, 255, 255, 0.25); */
  border-radius: 20px;
  cursor: pointer;
  display: inline-block;
  backdrop-filter: blur(6px);
}
.leaflet-popup-content a{
  color: #ffffff;
  text-decoration: none;
}


.leaflet-overlay-pane path {
  display: none !important;
}

.leaflet-popup-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Título */
.leaflet-popup-content h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Ubicación */
.leaflet-popup-content .location {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.leaflet-popup-content .location i {
  margin-right: 6px;
  color: var(--accent-cyan);
}

/* Bloques de información */
.leaflet-popup-content .aforo,
.leaflet-popup-content .horario,
.leaflet-popup-content .plazas-parking,
.leaflet-popup-content .transporte {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.88rem;
}

/* Iconos */
.leaflet-popup-content i {
  margin-right: 6px;
  color: var(--accent-gold);
}

/* Transporte párrafos */
.leaflet-popup-content .transporte p {
  margin: 2px 0 0 22px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}


.link a{
  text-decoration: underline;
}

/* Botón enlace */
.leaflet-popup-content .enlace {
  margin-top: 8px;
}

.leaflet-popup-content .enlace a,
.leaflet-popup-content .gmaps-link {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 30px;
  background: var(--accent-gold);
  color: #000;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.leaflet-popup-content .enlace a:hover,
.leaflet-popup-content .gmaps-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

/* Coordenadas discretas */
.leaflet-popup-content .coordenadas {
  font-size: 0.75rem;
  opacity: 0.5;
  border-top: 1px dashed rgba(255,255,255,0.15);
  padding-top: 6px;
}