/* ==========================================================================
   Maqueta · Ilustre Municipalidad de Pica
   location.css — Nuestra Comuna · Ubicación: mapa con sus límites alrededor,
   poblamiento y Pica hoy. El explorador está en explorer.css.
   ========================================================================== */

.location-hint {
  color: var(--pm-text-soft);
  font-size: .9rem;
}

/* Mapa enmarcado por los cuatro límites de la comuna */
.location-frame {
  position: relative;
  width: min(100%, 480px);
  margin-inline: auto;
  padding: 2.2rem 2rem;
  border: 1px solid var(--commune-line);
  border-radius: 20px;
  background:
    radial-gradient(60% 50% at 45% 45%, rgba(41, 191, 203, .16) 0%, transparent 70%),
    var(--pm-navy-950);
}

.location-frame .explorer-map {
  width: 100%;
}

.location-limit {
  position: absolute;
  z-index: 1;
  color: var(--pm-gold-300);
  font-family: var(--pm-font-condensed);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.location-limit small {
  color: var(--pm-blue-300);
  font-size: .7rem;
  letter-spacing: .14em;
}

.location-limit--north {
  top: .75rem;
  left: 50%;
  translate: -50% 0;
}

.location-limit--south {
  bottom: .75rem;
  left: 50%;
  translate: -50% 0;
}

.location-limit--west,
.location-limit--east {
  top: 50%;
  writing-mode: vertical-rl;
}

.location-limit--west {
  left: .6rem;
  rotate: 180deg;
  translate: 0 50%;
}

.location-limit--east {
  right: .6rem;
  translate: 0 -50%;
}

.location-compass {
  position: absolute;
  top: .6rem;
  right: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--pm-gold-500);
  font-family: var(--pm-font-condensed);
  font-weight: 700;
}

.location-compass i {
  font-size: 1.2rem;
}

/* Límites también como lista, bajo las tarjetas */
.location-limits {
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(247, 209, 56, .4);
  border-left: 5px solid var(--pm-gold-500);
  border-radius: 14px;
  background: rgba(247, 209, 56, .07);
}

.location-limits__title {
  margin-bottom: .75rem;
  color: var(--pm-gold-400);
  font-size: 1.05rem;
  font-weight: 700;
}

.location-limits dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem 1.5rem;
  margin: 0;
}

.location-limits dt {
  color: var(--pm-blue-300);
  font-family: var(--pm-font-condensed);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.location-limits dd {
  margin: 0;
  color: var(--pm-text);
}

/* --------------------------------------------------------------------------
   Poblamiento y Pica hoy
   -------------------------------------------------------------------------- */
.location-story {
  padding: 3.5rem 0 4rem;
  border-top: 1px solid var(--pm-line);
  background: linear-gradient(180deg, var(--pm-navy-850) 0%, var(--pm-navy-900) 100%);
}

.location-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
}

.location-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.75rem;
  list-style: none;
}

.location-timeline::before {
  content: "";
  position: absolute;
  top: .4rem;
  bottom: .4rem;
  left: .45rem;
  width: 2px;
  background: linear-gradient(180deg, var(--pm-gold-500), var(--pm-blue-400));
}

.location-timeline li {
  position: relative;
  display: grid;
  gap: .2rem;
}

.location-timeline li::before {
  content: "";
  position: absolute;
  top: .3rem;
  left: -1.75rem;
  width: 16px;
  height: 16px;
  border: 3px solid var(--pm-gold-500);
  border-radius: 50%;
  background: var(--pm-navy-850);
}

.location-timeline__year {
  color: var(--pm-gold-400);
  font-family: var(--pm-font-condensed);
  font-size: 1.15rem;
  font-weight: 700;
}

.location-timeline__text {
  color: var(--pm-text);
  font-size: .95rem;
  line-height: 1.6;
}

.location-today {
  position: sticky;
  top: calc(var(--commune-sticky-top) + 1.5rem);
  padding: 1.6rem 1.6rem 1.1rem;
  border: 3px solid var(--pm-blue-500);
  border-radius: 16px;
  background: var(--pm-navy-850);
}

.location-today__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: .9rem;
  border-radius: 50%;
  background: var(--pm-gold-500);
  color: var(--pm-navy-900);
  font-size: 1.3rem;
}

.location-today__title {
  margin-bottom: .75rem;
  color: var(--pm-gold-400);
  font-size: 1.4rem;
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   Tablet y celular
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .location-story__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .location-today {
    position: static;
  }

  /* El mapa queda fijo y compacto arriba: límites más chicos */
  .location-frame {
    width: min(78%, 300px);
    padding: 1.5rem 1.4rem;
  }

  .location-limit {
    font-size: .62rem;
  }

  .location-limit small {
    display: none;
  }

  .location-compass {
    font-size: .7rem;
  }

  .location-compass i {
    font-size: .9rem;
  }
}

@media (max-width: 575.98px) {
  /* El mapa es alto: más angosto para que no tape las tarjetas */
  .location-frame {
    width: min(58%, 210px);
    padding: 1.3rem 1.15rem;
  }

  .location-limit {
    font-size: .56rem;
  }

  .location-limit--north,
  .location-compass {
    top: .4rem;
  }

  .location-limit--south {
    bottom: .4rem;
  }

  .location-limit--west {
    left: .3rem;
  }

  .location-limit--east {
    right: .3rem;
  }

  .location-limits dl {
    grid-template-columns: minmax(0, 1fr);
  }
}
