/**
 * Dynamic outstation route pages (outstationcabs/index.php)
 * css_v2 shell + legacy fare/content compatibility overrides
 *
 * Legacy BS3 (bootstrap.min.css) sets html { font-size: 10px }, so rem-based
 * sizes render ~37% smaller than fleet css_v2 pages. Use px for body copy here.
 */

/* Restore 16px rem root (fleet pages never load legacy BS3) */
html:has(body.route-page) {
  font-size: 16px;
}

/* ── Page base: force light theme (BS5 + legacy) ── */
.route-page {
  --route-hero-min-h: clamp(280px, 42vw, 420px);
  background: #fff !important;
  color: var(--text, #374151);
}

.route-page main#main-content {
  background: #fff;
  padding-top: var(--header-h, 80px);
}

/* ── Header: always readable (not transparent-over-light-breadcrumb) ── */
.route-page .site-header {
  position: fixed;
  top: 0;
  z-index: 1000;
  background: rgba(47, 52, 48, 0.94) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.route-page .site-header .logo img {
  filter: none !important;
}

.route-page .site-header .site-nav > ul > li > a,
.route-page .site-header .nav-dropdown__trigger {
  color: #fff !important;
  text-shadow: none !important;
}

.route-page .site-header .site-nav > ul > li > a:hover,
.route-page .site-header .nav-dropdown__trigger:hover,
.route-page .site-header .nav-dropdown[open] .nav-dropdown__trigger {
  color: var(--green, #39b54a) !important;
}

.route-page .site-header .nav-toggle {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ── Breadcrumb ── */
.route-breadcrumb {
  padding: 0.75rem 0 0;
  background: var(--bg-light, #eef3f8);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.route-breadcrumb .breadcrumb {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 16px;
}

.route-breadcrumb .breadcrumb a {
  color: var(--green-dark, #2e7d32);
}

.route-breadcrumb .breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--muted, #6b7280);
}

/* ── Hero ── */
.route-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.55)),
    url("/images/outsation_bg.webp") center/cover no-repeat;
  color: #fff;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.route-hero__inner {
  display: grid;
  gap: 1rem;
}

.route-h1 {
  color: #fff;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.route-h1--lg { font-size: clamp(28px, 4vw, 36px); }
.route-h1--md { font-size: clamp(24px, 3.5vw, 30px); }
.route-h1--sm { font-size: clamp(20px, 3vw, 24px); }

.route-hero__subtitle {
  margin: 0;
  font-size: 18px;
  opacity: 0.92;
}

.route-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 16px;
}

.route-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.route-hero__promo {
  margin: 0.5rem 0 0;
  font-size: 16px;
  line-height: 1.55;
}

.route-hero__promo a {
  color: #b8f5a8;
  text-decoration: underline;
}

/* ── Legacy fare panel ── */
.route-fare-legacy {
  background: var(--bg-light, #eef3f8);
  padding: 1.5rem 0 2rem;
}

.route-fare-legacy .tj-wrapper {
  float: none;
  overflow: visible;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.route-fare-legacy .tj-booking-frm {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}

.route-fare-legacy .desktop-list-banner {
  display: none !important;
}

.route-fare-legacy .container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  float: none;
}

.route-fare-legacy .row {
  margin: 0;
  float: none;
}

.route-fare-legacy .smobile {
  width: 100%;
  float: none;
  margin-top: 0 !important;
}

.route-fare-legacy .trip-type-tabs {
  margin-bottom: 1rem;
}

.route-fare-legacy .trip-type-tabs .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border: none;
}

.route-fare-legacy .trip-type-tabs .nav-tabs > li {
  float: none;
  width: auto;
}

.route-fare-legacy .trip-type-tabs .nav-tabs > li > a {
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
}

.route-fare-legacy .trip-type-tabs .nav-tabs > li.active > a {
  background: var(--green, #39b54a) !important;
  color: #fff !important;
  border-color: var(--green, #39b54a) !important;
}

.route-fare-legacy .carousel-description,
.route-fare-legacy .tj-post-holder,
.route-fare-legacy .text-box {
  float: none;
  width: 100%;
}

.route-fare-legacy .panel {
  background: #fff !important;
  border: 1px solid var(--card-border, #e7ecf2) !important;
  border-radius: 16px !important;
  box-shadow: var(--card-shadow, 0 16px 40px rgba(15, 23, 42, 0.08)) !important;
  margin: 0 !important;
  overflow: hidden;
}

.route-fare-legacy .panel-header,
.route-fare-legacy .panel-heading {
  background: #fff !important;
  color: var(--primary, #111827) !important;
  border-bottom: 1px solid #e5e7eb;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.route-fare-legacy .price-details,
.route-fare-legacy .price-details span,
.route-fare-legacy .price-details .col-md-5 {
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--primary, #111827) !important;
}

.route-fare-legacy .price-details .btn {
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 0.55rem 0.85rem !important;
  min-width: 88px !important;
  width: auto !important;
}

.route-fare-legacy .price-details a {
  font-size: 16px !important;
}

.route-fare-legacy .tj-booking-frm .tab-content {
  background: #fff !important;
  height: auto !important;
  min-height: 0 !important;
}

.route-fare-legacy .price-details {
  margin-left: 0 !important;
  width: 100% !important;
  padding-bottom: 0 !important;
}

.route-fare-legacy .price-details .row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.route-fare-legacy .price-details button {
  width: auto !important;
  min-width: 88px;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 0.55rem 0.85rem !important;
}

.route-fare-legacy .modal {
  z-index: 10050;
}

.route-fare-legacy .modal-backdrop {
  z-index: 10040;
}

/* ── Legacy SEO content body ── */
.route-legacy-content {
  background: #fff;
  color: var(--text, #374151);
  padding: 0;
}

.route-legacy-content .tj-wrapper {
  float: none;
  overflow: visible;
}

.route-legacy-content .tj-welcome,
.route-legacy-content .tj-aboutus,
.route-legacy-content .tj-cta-section,
.route-legacy-content .tj-cal-to-action {
  float: none;
  width: 100%;
  background: #fff !important;
  padding: 2.5rem 0 !important;
}

.route-legacy-content .tj-welcome .container,
.route-legacy-content .tj-aboutus .container,
.route-legacy-content .tj-cta-section .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.route-legacy-content .about-info,
.route-legacy-content .privacy-info {
  color: var(--text, #374151);
}

/* Match fleet .content-prose (17px body / 22px h2) — px beats legacy 15px rules */
.route-legacy-content .about-info p,
.route-legacy-content .privacy-info p,
.route-legacy-content .text-box p,
.route-legacy-content .about-info li,
.route-legacy-content .privacy-info li,
.route-legacy-content .text-box li,
.route-legacy-content .about-info td,
.route-legacy-content .privacy-info td {
  color: var(--text, #374151) !important;
  line-height: 1.75 !important;
  font-size: 17px !important;
  margin-bottom: 1rem !important;
}

.route-legacy-content h2,
.route-legacy-content .about-info h2,
.route-legacy-content .privacy-info h2 {
  color: var(--primary, #111827) !important;
  font-family: var(--font, "Plus Jakarta Sans", sans-serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(22px, 2.5vw, 28px) !important;
}

.route-legacy-content h3,
.route-legacy-content .fare-subsection-title,
.route-legacy-content .text-box h3,
.route-legacy-content .privacy-info .fare-subsection-title {
  color: var(--primary, #111827) !important;
  font-family: var(--font, "Plus Jakarta Sans", sans-serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(20px, 2.2vw, 24px) !important;
}

.route-legacy-content a {
  color: var(--green-dark, #2e7d32);
}

.route-legacy-content a:hover {
  color: var(--green, #39b54a);
}

.route-legacy-content .welcome-banner {
  float: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow, 0 16px 40px rgba(15, 23, 42, 0.08));
}

.route-legacy-content .welcome-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Legacy fare tables in SEO body */
.route-legacy-content .main-table,
.route-legacy-content #customers,
.route-legacy-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--text, #374151);
  font-size: 15px;
}

.route-legacy-content .table-scroll,
.route-legacy-content .table-wrap,
.route-legacy-content #table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.route-legacy-content .main-table th,
.route-legacy-content .main-table td,
.route-legacy-content #customers th,
.route-legacy-content #customers td {
  border: 1px solid #e5e7eb;
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  color: var(--text, #374151) !important;
  background: #fff !important;
}

.route-legacy-content .main-table thead th,
.route-legacy-content #customers th {
  background: var(--bg-light, #eef3f8) !important;
  color: var(--primary, #111827) !important;
  font-weight: 600;
}

.route-legacy-content .fixed-side a {
  color: var(--green-dark, #2e7d32) !important;
}

/* ── Collapsible route index (footer area) ── */
.route-routes-index {
  padding: 3rem 0;
}

.route-routes-index .section__header {
  margin-bottom: 1.5rem;
}

.route-routes-index .routes-collapse-panel {
  margin-top: 0;
}

.route-routes-index .routes-collapse-panel[open] .route-routes-grid {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding-right: 4px;
}

.route-routes-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.route-routes-grid .prices {
  display: block;
  float: none;
  width: auto;
  margin: 0;
  border: none;
}

.route-routes-grid .prices a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--primary, #111827) !important;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}

.route-routes-grid .prices a:hover {
  border-color: var(--green, #39b54a);
  background: var(--green-pale, #ecfdf3);
  color: var(--green-dark, #2e7d32) !important;
}

/* ── Float actions ── */
.route-page .float-actions {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.route-page .float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.route-page .float-btn--wa { background: #25d366; }
.route-page .float-btn--call { background: var(--green, #39b54a); }

/* Hide legacy call rings if any remain */
.route-page .ring,
.route-page .whatsapp-ring,
.route-page .coccoc-alo-phone {
  display: none !important;
}

@media (min-width: 768px) {
  .route-hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .route-legacy-content .tj-welcome .row {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

@media (max-width: 767px) {
  .route-page main#main-content {
    padding-top: calc(var(--header-h, 80px) - 8px);
  }

  .route-routes-grid {
    grid-template-columns: 1fr;
  }

  .route-routes-grid .prices a {
    font-size: 15px;
    padding: 11px 12px;
  }

  .route-fare-legacy .trip-type-tabs .nav-tabs > li > a {
    font-size: 14px;
    padding: 0.5rem 0.75rem;
  }
}
