﻿.route-detail-page {
  min-height: 100vh;
  padding: 0;
  background: #0d1011;
}

.route-detail-page .status-inner {
  min-height: 4.35rem;
}

.route-detail-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: #111518;
  color: var(--text);
}

.route-detail-hero {
  min-height: 19rem;
  padding: calc(var(--header-height) + clamp(1rem, 3vw, 2.5rem)) clamp(1rem, 2vw, 2.5rem) clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #171b1f;
}

.route-back {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #252a31;
  color: #fff;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.route-back-icon {
  position: relative;
  width: 1.1rem;
  height: 0.85rem;
}

.route-back-icon::before {
  content: "";
  position: absolute;
  top: 0.08rem;
  left: 0;
  width: 0.58rem;
  height: 0.58rem;
  border-bottom: 0.2rem solid currentColor;
  border-left: 0.2rem solid currentColor;
  transform: rotate(45deg);
}

.route-back-icon::after {
  content: "";
  position: absolute;
  top: 0.33rem;
  left: 0.1rem;
  width: 1rem;
  height: 0.2rem;
  border-radius: 999px;
  background: currentColor;
}

.route-back:hover,
.route-back:focus-visible {
  border-color: var(--accent);
  background: #30373e;
}

.route-back:focus-visible,
.route-navigate:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0.2rem;
}

.route-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.route-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
}

.route-type {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.route-grade {
  flex: 0 0 auto;
  min-width: 4.4rem;
  padding: 0.75rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: #252a31;
  text-align: center;
}

.route-grade strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.route-grade span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.route-location {
  margin: 0.65rem 0 0;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: #d8dde2;
  font-size: clamp(0.88rem, 2vw, 1rem);
  line-height: 1.45;
}

.route-location-name {
  min-width: 0;
}

.route-location-distance {
  flex: 0 0 auto;
  padding-left: 0.7rem;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}

.route-location-icon {
  position: relative;
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.15rem;
  border: 0.13rem solid var(--accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.route-location-icon::after {
  content: "";
  position: absolute;
  inset: 0.23rem;
  border-radius: 50%;
  background: var(--accent);
}

.route-detail-content {
  width: 100%;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 2vw, 2.5rem);
}

.route-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.route-fact {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--panel);
}

.route-fact dt {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.route-fact dd {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
}

.route-copy {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.route-copy h2 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}

.route-copy p {
  max-width: 52rem;
  margin: 0;
  color: #d2d6da;
  line-height: 1.65;
}

.route-navigate {
  width: min(100%, 20rem);
  min-height: 3.5rem;
  margin-top: 2rem;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: linear-gradient(180deg, #48a954 0%, #347f3d 100%);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.route-navigate:hover,
.route-navigate:focus-visible {
  background: linear-gradient(180deg, #56bd62 0%, #3c9146 100%);
  box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.25);
}

.route-navigation-icon {
  width: 0;
  height: 0;
  border-top: 0.45rem solid transparent;
  border-bottom: 0.45rem solid transparent;
  border-left: 0.95rem solid #fff;
  transform: rotate(-45deg);
}

@media (max-width: 680px) {
  .route-detail-page .status-inner {
    min-height: 4.15rem;
  }

  .route-detail-hero {
    min-height: 15rem;
    padding: calc(var(--header-height) + 1rem) 1rem 1rem;
  }

  .route-heading {
    gap: 0.8rem;
  }

  .route-heading h1 {
    font-size: 1.8rem;
  }

  .route-location-distance {
    grid-column: 2;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .route-location {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 0.3rem;
  }

  .route-grade {
    min-width: 3.7rem;
  }

  .route-detail-content {
    padding: 1rem;
  }

  .route-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .route-fact {
    min-height: 0;
    padding: 0.8rem;
  }

  .route-navigate {
    width: 100%;
  }
}

