/* ========================================================= */
/* RESET Y BASE                                             */
/* ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #1a1a1a;
  line-height: 1.5;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* ========================================================= */
/* SECCIÓN Y CABECERA                                        */
/* ========================================================= */
.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.section-kicker {
  display: block;
  color: #ffb703;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  color: #023047;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================================= */
/* GRID PRINCIPAL                                           */
/* ========================================================= */
.map-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .map-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================= */
/* MAP CARD                                                */
/* ========================================================= */
.map-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.premium-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.premium-card-header .tag {
  display: inline-block;
  font-size: 0.8rem;
  background-color: #ffd200;
  color: #023047;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.premium-card-header h3 {
  font-size: 1.4rem;
  color: #023047;
}

/* ========================================================= */
/* MAP TOOLBAR                                             */
/* ========================================================= */
.map-toolbar {
  display: flex;
  gap: 1rem;
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.map-btn {
  border: none;
  background: #eee;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.map-btn.is-active,
.map-btn:hover {
  background-color: #023047;
  color: #fff;
}

/* ========================================================= */
/* MAP STAGE                                               */
/* ========================================================= */
.premium-map-shell {
  position: relative;
  width: 100%;
  padding-top: 140%; /* Mantiene relación de aspecto del SVG */
}

.map-stage-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ========================================================= */
/* CONNECTION LINES                                        */
/* ========================================================= */
.map-lines-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-connection-line {
  stroke: url(#premiumConnectionGradient);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.25;
  transition: all 0.3s ease;
}

.map-connection-line.is-active {
  opacity: 1;
  stroke-width: 4;
}

/* ========================================================= */
/* HOTSPOTS                                               */
/* ========================================================= */
.map-hotspot {
  position: absolute;
  border-radius: 50%;
  border: none; /* solo el borde */
  background: none;           /* quitamos el fondo */
  cursor: pointer;
  transition: transform 0.2s ease; /* ya no necesitamos background en la transición */
  transform: translate(-50%, -50%); /* Centrar en coordenadas */
}

.map-hotspot:hover,
.map-hotspot:focus {
  transform: translate(-50%, -50%) scale(1.3);
}

/* ========================================================= */
/* ETIQUETAS                                               */
/* ========================================================= */
.map-label {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(2, 48, 71, 0.85);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.map-label.is-active {
  opacity: 1;
}

/* ========================================================= */
/* TOOLTIP                                                */
/* ========================================================= */
.map-tooltip {
  position: absolute;
  background: rgba(255,255,255,0.95);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  pointer-events: none;
  width: 280px;
  font-size: 0.9rem;
  color: #023047;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map-tooltip.is-visible {
  opacity: 1;
}

/* ========================================================= */
/* PANEL LATERAL                                           */
/* ========================================================= */
.side-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.side-card .dept-chip {
  display: inline-block;
  margin: 0.25rem 0.25rem 0 0;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 20px;
  background: #eee;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dept-chip.is-active,
.dept-chip:hover {
  background-color: #ffb703;
  color: #023047;
}

.panel-animado {
  animation: panelFade 0.3s ease;
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================= */
/* LEYENDA                                                */
/* ========================================================= */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #023047;
}





/*  Header  */


/* HEADER */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: linear-gradient(90deg, #0b2a4a, #163f6b);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-size: 24px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: white;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* MENU MOBILE */

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}


/* FOOTER */

footer {
    background: #0b2a4a;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 40px;
}

/* RESPONSIVE TABLET */

@media(max-width:900px) {

    header {
        padding: 20px;
    }

}

/* RESPONSIVE MOVIL */

@media(max-width:700px) {

    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #0b2a4a;
        display: none;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }

    nav.active {
        display: block;
    }


}