/* Shared country-route pages retain their Elementor body inside the native article frame. */
body.csn-native-country-route .csn-country-route-page .elementor {
  width: 100%;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content > .elementor > .elementor-section:first-child {
  margin-top: 0;
}

/* The legacy first heading duplicates the native Hero H1 and is removed server-side. */
body.csn-native-country-route .csn-country-route-page .elementor-widget-heading:has(.elementor-widget-container:empty) {
  display: none;
}

/* Some older route pages use the theme's Section Head widget rather than
   Elementor's native Heading widget. Once its duplicated page title is
   removed in PHP, hide the now-empty widget as well so it cannot create a
   blank gap below the new article hero. */
body.csn-native-country-route .csn-country-route-page .elementor-widget-section-head:has(.section-title:empty) {
  display: none;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-section {
  max-width: 100%;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-container > h2.elementor-heading-title {
  color: #163e5b;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-container > h2.elementor-heading-title[id] {
  scroll-margin-top: 184px;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-text-editor,
body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-text-editor p {
  color: #4c6c81;
}

/* Route pricing / transit tables ------------------------------------------------
   Older Elementor entries sometimes carry a fixed table width from their
   original full-width layout. Inside the 7:3 article frame that leaves a
   blank strip to the right, so the presentation layer owns the table width. */
body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-container:has(> table),
body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-text-editor:has(table),
body.csn-native-country-route .csn-country-route-page .csn-route-content figure.wp-block-table {
  max-width: 100%;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content table {
  display: table !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 40px 0 !important;
  overflow: visible !important;
  border: 1px solid #c3dbe2 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: #42657b;
  table-layout: fixed;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content table th,
body.csn-native-country-route .csn-country-route-page .csn-route-content table td {
  width: auto !important;
  min-width: 0 !important;
  padding: 18px 20px !important;
  border: 0 !important;
  border-right: 1px solid #c3dbe2 !important;
  border-bottom: 1px solid #c3dbe2 !important;
  color: #42657b;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content table th {
  color: #163e5b;
  background: #e4f1f4;
  font-weight: 800;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content table tr > *:last-child {
  border-right: 0 !important;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content table tbody tr:last-child > * {
  border-bottom: 0 !important;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content table tbody tr:nth-child(even) > * {
  background: #f5fafb;
}

/* Give common four-column freight-rate tables a deliberate, readable ratio. */
body.csn-native-country-route .csn-country-route-page .csn-route-content table tr > :first-child:nth-last-child(4) { width: 35% !important; }
body.csn-native-country-route .csn-country-route-page .csn-route-content table tr > :nth-child(2):nth-last-child(3) { width: 17% !important; }
body.csn-native-country-route .csn-country-route-page .csn-route-content table tr > :nth-child(3):nth-last-child(2) { width: 30% !important; }
body.csn-native-country-route .csn-country-route-page .csn-route-content table tr > :last-child:nth-child(4) { width: 18% !important; }

/* Newer editorial route pages use this dedicated wrapper. It must own the
   available row width instead of allowing the browser to size the table from
   its content, which is what caused the blank band on the right. */
body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-table {
  width: 100%;
  max-width: 100%;
  margin: 36px 0;
  overflow: hidden;
  border: 1px solid #c3dbe2;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(11, 53, 70, .045);
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-table > table {
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0;
}

/* Route FAQs -------------------------------------------------------------------
   Re-skin the legacy accordion as a clear enterprise Q&A pattern while
   leaving its existing Bootstrap toggle behaviour and editable copy intact. */
body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper {
  margin-top: 30px;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .accordion {
  display: grid;
  gap: 12px;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #c6dce3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(11, 53, 70, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card:hover,
body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card:has(.collapse.show) {
  border-color: #81bcc9;
  box-shadow: 0 14px 30px rgba(11, 53, 70, .085);
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-border:last-child {
  border-bottom: 1px solid #c6dce3;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header,
body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: center;
  padding: 20px 22px !important;
  color: #163e5b;
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.48;
  text-decoration: none;
  text-transform: none;
  transition: color .16s ease, background-color .16s ease;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a:hover,
body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a[aria-expanded="true"] {
  color: #0d728b;
  background: #f3fbfc;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a > span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 50%;
  color: #0a718a;
  background: #dff1f3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a i {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  color: #d68a24;
  font-size: 17px;
  text-align: center;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-body {
  padding: 0 74px 23px !important;
  border-top: 1px solid #d9e8eb;
  color: #4c6c81;
  background: #f8fcfc;
  font-size: 16px;
  line-height: 1.72;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-body p {
  margin: 19px 0 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Dedicated FAQ markup used by the current route-guide pages. */
body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-faq {
  display: grid;
  gap: 13px;
  margin: 30px 0 8px;
  counter-reset: csn-route-details;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa {
  overflow: hidden;
  border: 1px solid #c6dce3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(11, 53, 70, .045);
  transition: border-color .18s ease, box-shadow .18s ease;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa:hover,
body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa[open] {
  border-color: #81bcc9;
  box-shadow: 0 14px 30px rgba(11, 53, 70, .085);
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  min-height: 79px;
  padding: 18px 22px;
  cursor: pointer;
  color: #163e5b;
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.48;
  list-style: none;
  transition: color .16s ease, background-color .16s ease;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa > summary::-webkit-details-marker {
  display: none;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa > summary::before {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  content: counter(csn-route-details, decimal-leading-zero);
  counter-increment: csn-route-details;
  border-radius: 50%;
  color: #0a718a;
  background: #dff1f3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa > summary::after {
  display: flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  content: '+';
  border-radius: 50%;
  color: #c77d1d;
  background: #fff3df;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa:hover > summary,
body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa[open] > summary {
  color: #0d728b;
  background: #f3fbfc;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa[open] > summary::after {
  content: '\2212';
  color: #fff;
  background: #0f7891;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa-a {
  padding: 0 24px 23px 74px;
  border-top: 1px solid #d9e8eb;
  color: #4c6c81;
  background: #f8fcfc;
  font-size: 16px;
  line-height: 1.72;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa-a p {
  margin: 19px 0 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* A few legacy routes store FAQ questions as a simple list instead of the
   accordion widget. Give that exact adjacent FAQ list the same visual rhythm. */
body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-section-head:has(h2[id*="faq"]) + .elementor-widget-text-editor ul {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: csn-route-faq;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-section-head:has(h2[id*="faq"]) + .elementor-widget-text-editor li {
  position: relative;
  margin: 10px 0 0;
  padding: 17px 20px 17px 61px;
  border: 1px solid #c6dce3;
  border-radius: 7px;
  color: #254e69;
  background: #fff;
  box-shadow: 0 7px 18px rgba(11, 53, 70, .04);
  counter-increment: csn-route-faq;
  font-weight: 700;
  line-height: 1.5;
}

body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-section-head:has(h2[id*="faq"]) + .elementor-widget-text-editor li::before {
  position: absolute;
  top: 50%;
  left: 17px;
  display: flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  content: counter(csn-route-faq, decimal-leading-zero);
  transform: translateY(-50%);
  border-radius: 50%;
  color: #0a718a;
  background: #dff1f3;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 1023px) {
  body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-section {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-container:has(> table),
  body.csn-native-country-route .csn-country-route-page .csn-route-content .elementor-widget-text-editor:has(table),
  body.csn-native-country-route .csn-country-route-page .csn-route-content figure.wp-block-table,
  body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content table {
    min-width: 680px !important;
    margin: 24px 0 !important;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content table th,
  body.csn-native-country-route .csn-country-route-page .csn-route-content table td {
    padding: 14px 15px !important;
    font-size: 14px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 17px 16px !important;
    font-size: 15px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-header h5 a > span {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .faq-wrapper .card-body {
    padding: 0 17px 19px !important;
    font-size: 15px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-table {
    margin: 25px 0;
    border-radius: 6px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-table > table {
    min-width: 680px !important;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa > summary {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    gap: 11px;
    min-height: 0;
    padding: 17px 16px;
    font-size: 15px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa > summary::before {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  body.csn-native-country-route .csn-country-route-page .csn-route-content .tjc-rt-qa-a {
    padding: 0 17px 19px;
    font-size: 15px;
  }
}
