/*
 * Hawaii Audio Routes hub.
 * Product-style route explorer for /routes, layered on top of the shared
 * planning hub hero without changing route manifest data.
 */

.hg-routes-hub {
  --route-ink: #172131;
  --route-muted: #657181;
  --route-line: #dce5e7;
  --route-maui: #1866b4;
  --route-oahu: #f27a24;
  --route-kauai: #1d9771;
  --route-big-island: #c3232f;
  background: #f5f9f8;
  color: var(--route-ink);
  padding: 34px 0 64px;
}

.hg-routes-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.ph-hero .ph-hero-img,
.ph-hero .ph-hero-video {
  z-index: 0;
}

.ph-hero .ph-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  pointer-events: none;
  transform: translateZ(0);
}

.ph-hero .ph-hero-content {
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .ph-hero .ph-hero-video {
    display: none;
  }
}

.hg-routes-panel {
  background: #fff;
  border: 1px solid rgba(23, 33, 49, .1);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(23, 33, 49, .08);
  overflow: hidden;
}

.hg-routes-explorer-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(7, 31, 40, .96), rgba(19, 74, 73, .92)),
    url("https://cdn.hawaiiguide.io/images/jcogs_img/cache/road-to-hana-curves_1_-_abcdef_-_c0cfb6769e62e7da02cbeed13f4f52ca4d8f443c.jpg") center/cover;
  color: #fff;
}

.hg-routes-kicker {
  color: #9ed6c0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.hg-routes-title {
  color: #fff;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.02;
  margin: 0 0 12px;
}

.hg-routes-copy {
  color: rgba(255, 255, 255, .88);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 680px;
}

.hg-routes-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.hg-routes-stat {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 12px;
}

.hg-routes-stat strong {
  display: block;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  margin-bottom: 4px;
}

.hg-routes-stat span {
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.hg-routes-system-card {
  background: rgba(255, 255, 255, .94);
  border-radius: 8px;
  color: var(--route-ink);
  padding: 18px;
  min-height: 240px;
}

.hg-routes-system-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .7px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.hg-routes-system-list {
  display: grid;
  gap: 10px;
}

.hg-routes-system-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) 84px minmax(0, 1.3fr);
  gap: 12px;
  align-items: center;
  background: #f6faf9;
  border: 1px solid #dde8e9;
  border-left: 5px solid var(--route-maui);
  border-radius: 8px;
  padding: 12px 13px;
}

.hg-routes-system-row[data-island="oahu"] { border-left-color: var(--route-oahu); }
.hg-routes-system-row[data-island="kauai"] { border-left-color: var(--route-kauai); }
.hg-routes-system-row[data-island="big-island"] { border-left-color: var(--route-big-island); }

.hg-routes-system-island {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
}

.hg-routes-system-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--route-maui);
  box-shadow: 0 0 0 3px #fff, 0 1px 5px rgba(23, 33, 49, .22);
}

.hg-routes-system-row[data-island="oahu"] .hg-routes-system-dot { background: var(--route-oahu); }
.hg-routes-system-row[data-island="kauai"] .hg-routes-system-dot { background: var(--route-kauai); }
.hg-routes-system-row[data-island="big-island"] .hg-routes-system-dot { background: var(--route-big-island); }

.hg-routes-system-row strong {
  color: #162332;
  font-size: 16px;
  line-height: 1.1;
}

.hg-routes-system-row > span:last-child {
  color: #586677;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.hg-routes-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--route-line);
}

.hg-routes-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hg-routes-filter {
  border: 1px solid #cdd9db;
  background: #fff;
  border-radius: 999px;
  color: #344050;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  min-height: 38px;
  padding: 10px 15px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.hg-routes-filter:hover,
.hg-routes-filter.is-active {
  background: #123d44;
  border-color: #123d44;
  color: #fff;
}

.hg-routes-count {
  color: var(--route-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hg-routes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.hg-route-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #fff;
  border: 1px solid rgba(23, 33, 49, .1);
  border-radius: 8px;
  color: var(--route-ink);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(23, 33, 49, .07);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.hg-route-card:hover,
.hg-route-card:focus-visible {
  border-color: rgba(18, 61, 68, .35);
  box-shadow: 0 18px 38px rgba(23, 33, 49, .14);
  color: var(--route-ink);
  text-decoration: none;
  transform: translateY(-3px);
}

.hg-route-card.is-hidden {
  display: none;
}

.hg-route-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #dfe8e7;
  overflow: hidden;
}

.hg-route-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.hg-route-card:hover .hg-route-card-media img {
  transform: scale(1.04);
}

.hg-route-card-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 26, 34, .86);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .55px;
  padding: 7px 10px;
  text-transform: uppercase;
}

.hg-route-card-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(23, 33, 49, .12);
  border-radius: 999px;
  color: #6b4b12;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .45px;
  padding: 7px 10px;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(23, 33, 49, .16);
}

.hg-route-card-badge .fa {
  color: #d19a20;
}

.hg-route-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 17px;
}

.hg-route-card h3 {
  color: var(--route-ink);
  font-size: 21px;
  line-height: 1.18;
  margin: 0 0 9px;
}

.hg-route-card-desc {
  color: #4e5b69;
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.48;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hg-route-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.hg-route-card-meta span {
  background: #f3f7f7;
  border: 1px solid #e1e9ea;
  border-radius: 8px;
  color: #263342;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 8px;
  text-align: center;
}

.hg-route-card-path {
  color: #657181;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 16px;
}

.hg-route-card-cta {
  align-items: center;
  color: #14775c;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  gap: 7px;
  margin-top: auto;
}

.hg-route-card-cta .fa {
  font-size: 13px;
}

.hg-routes-empty {
  display: none;
  color: var(--route-muted);
  font-size: 15px;
  font-weight: 700;
  padding: 0 22px 24px;
  text-align: center;
}

.hg-routes-empty.is-visible {
  display: block;
}

.hg-routes-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.hg-routes-step {
  background: #fff;
  border: 1px solid rgba(23, 33, 49, .1);
  border-radius: 8px;
  padding: 18px;
}

.hg-routes-step h3 {
  align-items: center;
  color: var(--route-ink);
  display: flex;
  font-size: 17px;
  gap: 9px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.hg-routes-step p {
  color: #566475;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 980px) {
  .hg-routes-explorer-head,
  .hg-routes-grid,
  .hg-routes-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hg-routes-hub {
    padding-top: 22px;
  }
  .hg-routes-shell {
    width: min(100% - 20px, 1180px);
  }
  .hg-routes-explorer-head,
  .hg-routes-grid,
  .hg-routes-workflow {
    grid-template-columns: 1fr;
  }
  .hg-routes-explorer-head,
  .hg-routes-controls,
  .hg-routes-grid {
    padding: 16px;
  }
  .hg-routes-copy {
    padding-right: 54px;
  }
  .hg-routes-stats,
  .hg-route-card-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hg-routes-system-card {
    min-height: 0;
  }
  .hg-routes-system-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .hg-routes-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .hg-routes-filter {
    flex: 1 1 auto;
  }
}
