/* Programmatic SEO Route Page Styles — Task 04 */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ink: #102033;
  --muted: #52677d;
  --line: #d8e4ed;
  --lime: #b7ef2a;
  --teal: #007f7b;
  --soft: #f4f8fb;
  --white: #fff;
  --card-bg: #ffffff;
  --gold: #b38600;
  --badge-green: #00875a;
  --badge-bg-green: #e3fcef;
}

.route-page-hero {
  padding: 48px 0 36px;
  background: linear-gradient(135deg, #eef9f8, #f8fce9);
  border-bottom: 1px solid var(--line);
}

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span.sep {
  margin: 0 8px;
  color: var(--muted);
}

.breadcrumbs span.current {
  color: var(--ink);
  font-weight: 600;
}

.route-page-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 960px;
}

.route-page-hero .lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  line-height: 1.5;
  max-width: 820px;
  margin: 0;
}

/* Main content layout */
.route-content-layout {
  padding: 40px 0 60px;
}

.route-sections-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .route-sections-grid {
    grid-template-columns: 1fr;
  }
}

/* Primary cards */
.route-card-box {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(16, 32, 51, 0.04);
}

.route-card-box h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--ink);
}

/* Current Price Hero Box */
.price-overview-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: #f0f8fb;
  border-radius: 14px;
  border: 1px solid #d0e4ee;
  margin-bottom: 24px;
}

.price-main-display {
  display: flex;
  flex-direction: column;
}

.price-main-display .price-tag {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 850;
  color: var(--ink);
  line-height: 1;
}

.price-main-display .price-subtext {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.travel-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  background: #e8f4fa;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
}

.travel-date-badge strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.travel-date-val {
  font-weight: 750;
  color: var(--teal);
}

.stat-above-median {
  color: #b35900;
  font-weight: 750;
}

.price-meta-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

@media (max-width: 600px) {
  .price-meta-display {
    text-align: left;
  }
}

.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.freshness-badge.fresh {
  background: var(--badge-bg-green);
  color: var(--badge-green);
}

.freshness-badge.aging {
  background: #fff0b3;
  color: var(--gold);
}

.price-disclaimer {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0 0;
}

/* Deal Score Box */
.deal-score-badge-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fbfd;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.deal-score-circle {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
  flex-shrink: 0;
}

.deal-score-labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deal-score-labels strong {
  font-size: 18px;
  color: var(--ink);
}

.deal-score-labels span {
  font-size: 14px;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

@media (max-width: 650px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.stat-box dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-box dd {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.stat-box dd small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Deals table */
.deals-table-wrapper,
.deals-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}

.deals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.deals-table th {
  background: var(--soft);
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.deals-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.deals-table tr:last-child td {
  border-bottom: none;
}

.deals-table .fare-cell {
  font-weight: 750;
  color: var(--ink);
}

.deals-table .btn-book {
  display: inline-block;
  padding: 6px 14px;
  background: var(--teal);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.deals-table .btn-book:hover {
  background: #006966;
}

/* Route facts */
.facts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .facts-list {
    grid-template-columns: 1fr;
  }
}

.fact-item {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
}

.fact-item dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}

.fact-item dd {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
}

/* Sidebar */
.cta-sidebar-card {
  position: sticky;
  top: 92px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(16, 32, 51, 0.04);
}

.cta-sidebar-card h3 {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--ink);
}

.cta-sidebar-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 18px;
}

.btn-primary-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  background: var(--lime);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: transform 0.15s ease;
}

.btn-primary-cta:hover {
  transform: translateY(-1px);
}

.btn-secondary-link {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 0;
}

.btn-secondary-link:hover {
  text-decoration: underline;
}

/* Related routes */
.related-routes-section {
  margin-top: 50px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.related-routes-section h2 {
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 6px;
}

.related-routes-section .route-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 20px;
}

.related-routes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .related-routes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .related-routes-grid {
    grid-template-columns: 1fr;
  }
}

.related-route-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.related-route-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(0, 127, 123, 0.08);
}

.related-route-card .route-title {
  font-weight: 750;
  font-size: 16px;
  color: var(--ink);
}

.related-route-card .route-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 14px;
}

.related-route-card .route-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.related-route-card .from-price {
  font-weight: 800;
  color: var(--teal);
  font-size: 15px;
}

.related-route-card .score-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--soft);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 6px;
}
