/* =========================================
   MODAL DISTANCIAS
========================================= */

/* ===============================
   OVERLAY
================================ */

#distanciaModal.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  z-index: 1000;
}

/* ===============================
   CAJA MODAL
================================ */

#distanciaModal .modal-content {
  width: min(920px, 92vw);

  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 16px;

  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);

  padding: 28px 26px 32px;

  position: relative;
}

/* ===============================
   BOTON CERRAR
================================ */

#distanciaModal .close-modal {
  position: absolute;

  top: 12px;
  right: 14px;

  width: 28px;
  height: 28px;

  border-radius: 50%;

  border: 1px solid var(--adn-border);

  background: rgba(0, 0, 0, 0.25);

  color: #fff;

  display: grid;
  place-items: center;

  font-size: 18px;

  cursor: pointer;

  transition: all 0.2s ease;
}

#distanciaModal .close-modal:hover {
  background: rgba(0, 0, 0, 0.45);
}

/* ===============================
   TITULO
================================ */

#distanciaModal .modal-title {
  margin: 4px 0 26px;

  font-family: "Inter", "Montserrat", system-ui, sans-serif;

  font-weight: 700;

  letter-spacing: 0.08em;

  font-size: clamp(22px, 2vw, 28px);

  color: #f5f1e8;

  text-align: center;

  text-transform: uppercase;
}

/* ===============================
   GRID
================================ */

#distanciaModal .grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 18px;
}

@media (min-width: 900px) {
  #distanciaModal .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===============================
   CARD DISTANCIA
================================ */

.card-distancia {
  background-image: url("/assets/img/llanquin3.jpeg");
  background-size: cover;
  background-position: center;

  border: 1px solid var(--adn-border);

  border-radius: 14px;

  padding: 26px 20px;

  cursor: pointer;

  position: relative;

  overflow: hidden;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* overlay oscuro */

.card-distancia::before {
  content: "";

  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.45);

  z-index: 0;
}

/* hover */

.card-distancia:hover {
  transform: translateY(-6px);

  border-color: var(--adn-accent);

  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

/* contenido encima overlay */

.card-distancia * {
  position: relative;

  z-index: 1;

  font-family: "Inter", "Montserrat", system-ui, sans-serif;
}

/* ===============================
   TITULO DISTANCIA
================================ */

.card-distancia h2 {
  margin: 4px 0 14px;

  font-size: clamp(22px, 2vw, 36px);

  font-weight: 800;

  letter-spacing: 0.08em;

  color: var(--adn-accent);

  text-transform: uppercase;
}

/* ===============================
   DESCRIPCION
================================ */

.card-distancia .descripcion {
  font-size: 0.9rem;

  color: rgba(255, 255, 255, 0.8);

  margin-bottom: 20px;

  line-height: 1.5;
}

/* ===============================
   FOOTER CARD
================================ */

.distancia-footer {
  display: flex;

  justify-content: space-between;

  align-items: center;
}

.precio {
  font-size: 1.1rem;

  font-weight: 700;

  color: #f5f1e8;
}

.cta {
  font-size: 0.75rem;

  letter-spacing: 0.15em;

  text-transform: uppercase;

  color: var(--adn-accent);
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 768px) {
  #distanciaModal .grid {
    grid-template-columns: 1fr;

    gap: 14px;
  }

  .card-distancia {
    padding: 22px 18px;
  }

  .card-distancia h2 {
    font-size: 1.7rem;
  }
}

/* ================================
   SWEET ALERT TRAIL
================================ */

.trail-swal-popup {
  background: var(--color-bg); /* usa tu verde del theme */

  border-radius: 20px;

  padding: 48px 40px;

  color: #f5f1e8;

  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

/* contenedor */

.trail-alert {
  text-align: center;
  background: var(--color-bg);
}

/* logo */

.trail-alert-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.trail-alert-logo img {
  width: 90px;

  height: auto;

  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  animation: logoPop 0.5s ease;
}

@keyframes logoPop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* titulo */

.trail-alert-title {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin-bottom: 34px;
  text-transform: uppercase;
}

/* distancia destacada */

.trail-alert-title span {
  display: block;
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--color-accent);
  margin: 8px 0;
}

/* barra progreso */

.trail-progress {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  margin-bottom: 16px;
}

#bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), #e0b04a);
  transition: width 0.25s ease;
}

/* texto */

.trail-alert-text {
  font-size: 0.9rem;
  opacity: 0.75;
}
