*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

#page {
  background: rgba(255, 255, 255, 1) url('/applications/c2c/images/gear.png') repeat left top !important;
  background-color: #f9f9f9;
  background-size: auto;
  background-size: cover;
}

/* Dev mode */
body.dev-mode .road-svg path,
body.dev-mode .secondary-path {
  stroke: red !important;
  stroke-width: 8 !important;
}

body.dev-mode .svg-grid-overlay {
  stroke: rgba(0, 0, 255, 0.3);
  stroke-width: 1;
}

/* ── Timeline Stage: 300vw ── */
#timeline-stage {
  display: flex;
  flex-direction: row;
  width: 300vw;
  will-change: transform;
  position: relative;
}

#road-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image: url('/applications/c2c/images/roadway-horizontal.png');
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 0;
}

/* ── Each panel ── */
.roadway-container {
  position: relative;
  width: 100vw;
  min-width: 100vw;
  flex-shrink: 0;
  overflow: visible;
  z-index: 1;
}

/* ── Back button ── */
.back-btn {
  display: inline-block;		   
  background: #f59e0b;
  color: white;
  border: none;				 
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  margin-top: 16px;
  position: relative;
  z-index: 30;
  
  position: sticky;
  top: 12px;
  z-index: 200;
  display: inline-block;
  margin: 12px 16px;
}

.back-btn:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);			 
}


.back-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Top back button ── */
.back-btn-top {
  display: block;
}

.back-btn-bottom {
  display: block;
  margin-top: 24px;
  margin-bottom: 24px;
}

/* ── Secondary info block ── */
.headerInfo {
  position: absolute;
  top: 0;
  left: 10%;
  max-width: 700px;
  z-index: 25;
  padding-top: 20px;
  font-family: "Poppins", sans-serif;
}

.headerInfo h2 {
  font-weight: 700;
  line-height: 1.3;
  color: #006CB7;
  font-family: "Hepta Slab Black", serif;
  text-transform: uppercase;
  font-style: normal;
  font-weight: bold;
  text-decoration: none;
  font-size: 51pt;
}

.headerInfo .subheading {
  font-size: 48pt;
  color: #f59e0b;
  line-height: 1;
  margin-bottom: 8px;
}

.headerInfo p {
  font-size: 20px;
  color: #1a202c;
  line-height: 1.3;
  margin-bottom: 8px;
}

/* ── Road container ── */
.road-container {
  position: relative;
  width: 100%;
}

/* height spacer only — no background */
.road-bg {
  display: block;
  width: 100%;
  height: auto;
  padding-bottom: 19.74%;
  background: transparent;
  position: relative;
}

/* SVG overlay */
.road-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Road overlay */
.road-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Car ── */
.car {
  position: absolute;
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 9999;
  transform-origin: center center;
}

.car-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.car svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.car-motion-blur {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: linear-gradient(to right, rgba(231, 76, 60, 0.6), transparent);
  filter: blur(8px);
  pointer-events: none;
}

.car.car-takeoff {
  filter: drop-shadow(0 0 18px rgba(0, 108, 183, 0.7))
          drop-shadow(0 0 40px rgba(245, 158, 11, 0.5));
}

.car.car-takeoff .car-motion-blur {
  opacity: 0.7;
  background: linear-gradient(to right, rgba(0, 108, 183, 0.6), rgba(245, 158, 11, 0.4), transparent);
}

.car.car-landing {
  animation: carLandingPulse 0.6s ease-out;
}

.car-mobile-bottom {
  position: fixed !important;
  bottom: 12px !important;
  left: 50% !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  width: 120px !important;
  height: 120px !important;
  z-index: 9999 !important;
  pointer-events: none;
}

@keyframes carLandingPulse {
  0% {
    filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.8))
            drop-shadow(0 0 60px rgba(0, 108, 183, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 0px rgba(245, 158, 11, 0))
            drop-shadow(0 0 0px rgba(0, 108, 183, 0));
  }
}

/* ── SVG overlays ── */
.svg-grid-overlay,
.road-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.svg-grid-overlay {
  z-index: 15;
  display: block;
}

.svg-grid-overlay.active {
  display: block;
}

.road-svg {
  z-index: 10;
  opacity: 1;
}

/* Grid styles */
.grid-line        { stroke: rgba(0, 200, 0, 0.35); stroke-width: 1; }
.grid-line-major  { stroke: rgba(0, 200, 0, 0.6);  stroke-width: 3; }
.grid-label {
  fill: #000000;
  font-size: 60px;
  font-family: monospace;
  font-weight: bold;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 14px;
  stroke-linejoin: round;
}
.usable-zone      { fill: rgba(255,255,0,0.08); stroke: rgba(255,255,0,0.6); stroke-width: 4; stroke-dasharray: 10,5; }
.path-point    { fill: red;    stroke: white; stroke-width: 6; r: 14; }
.control-point { fill: orange; stroke: white; stroke-width: 6; }
.point-line    { stroke: rgba(255,165,0,0.7); stroke-width: 4; stroke-dasharray: 8,6; }


/* ── Timeline items overlay ── */
.timeline-items {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* ── Individual timeline item ── */
.timeline-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

/* ── Dot image wrapper ── */
.dot-img-wrap {
  position: relative;
  width: 340px;
  height: 250px;
  flex-shrink: 0;
  cursor: pointer;
  overflow: visible;
}

.dot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.35));
  transition: transform 0.2s ease, filter 0.2s ease;
  position: relative;
  z-index: 2;
}

.dot-img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 18px rgba(251,191,36,0.65));
}

/* ── Card ── */
.timeline-card {
  position: absolute;
  width: 250px;
  padding: 14px 16px;
  background: rgba(255,255,255,1);
  opacity: 0;
  pointer-events: auto;
  z-index: 5;
  border-radius: 5px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(251,191,36,0.15);
  transition: box-shadow 0.3s ease, background 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.6);
  border-top: none;
}

/* ── Colored top bar on primary view cards only ── */
#primaryTimelineItems .timeline-card::before {
  content: '';
  display: block;
  height: 5px;
  background: linear-gradient(90deg, #006cb7 0%, #f59e0b 100%);
  border-radius: 5px 5px 0 0;
  margin: -14px -16px 12px -16px;
}

.hero-header-section {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 1200px;
  padding: 20px;
  z-index: 10;
  text-align: center;
}

.hero-header-item {
  position: absolute !important;
  top: -220px;
  left: 100px !important;
  transform: none !important;
  width: auto !important;
  z-index: 10;
}

.hero-header-content {
  position: relative;
  width: 480px;
  padding: 20px;
  text-align: left;
}

.hero-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.3;
  color: #006CB7;
  text-transform: uppercase;
  font-size: 42pt;
  margin-bottom: 8px;
}

.hero-section-sub {
  font-size: 2.8rem;
  line-height: 2.4rem;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 15px;
}

.hero-section-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
}

.hero-header-item .timeline-card {
  display: none !important;
}

.timeline-card:hover {
  transform: translateY(-6px) translateX(-50%);
  background: rgba(255, 255, 255, 1);
  border-color: #fbbf24;
  filter: drop-shadow(0 4px 18px rgba(251,191,36,0.45)); 
}

.timeline-card.top {
  bottom: calc(100% + 12px);
}

.timeline-card.bottom {
  top: calc(100% + 12px);
}

.card-year-bl {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #006cb7;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-year-or {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f59e0b;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 5px;
  line-height: 1.3;
}

.timeline-card p {
  font-size: 15px;
  color: #1a202c;
  line-height: 1.5;
  margin-bottom: 8px;
  background: white;
  border-radius: 5px;
}

.card-links {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: content-box;
}

.card-link {
  font-size: 15px;
  font-weight: 600;
  color: #f59e0b;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.card-link:hover {
  color: #d97706;
  text-decoration: underline;
}

.timeline-card span.or { color: #f59e0b; }
.timeline-card span.yel { color: #ffda00; }

/* ── Video Modal ── */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal.active {
  opacity: 1;
}

.video-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 860px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  z-index: 1;
  height: auto;
}

.modal-content::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #006cb7 0%, #f59e0b 100%);
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.45);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 22px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10001;
}

.modal-close:hover {
  background: rgba(0,0,0,0.7);
  transform: scale(1.15);
}

.modal-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #000;
}

/* ═══════════════════════════════════════
   CONTENT MODAL
═══════════════════════════════════════ */
.content-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-modal.active {
  opacity: 1;
}

.content-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}

.content-modal-dialog {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px 12px 0 0;
  border: 2px solid #ffda00;
  border-top: none;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  z-index: 1;
  scroll-behavior: smooth;
}

.content-modal-dialog::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #006cb7 0%, #f59e0b 100%);
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 3;
}

.content-modal-hero-img {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
  margin-bottom: 0;
  margin-top: 0;
  display: block;
  flex-shrink: 0;
}

.content-modal-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.content-modal-hero-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
  pointer-events: none;
}

.content-modal-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: -44px 14px 0 0;
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 4;
}

.content-modal-close:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.1);
}

.content-modal-inner {
  padding: 0 28px 28px;
  clear: both;
}

.content-modal-year {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.content-modal-year.bl { color: #006cb7; }
.content-modal-year.or { color: #f59e0b; }

.content-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #006CB7;
  line-height: 1.3;
  margin-bottom: 16px;
}

.content-modal-hero-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.content-modal-hero-title {
  font-family: "Hepta Slab Black", serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #006CB7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.content-modal-hero-sub {
  font-size: clamp(16px, 2.2vw, 26px);
  color: #f59e0b;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 8px;
}

.content-modal-hero-desc {
  font-size: 15px;
  color: #4a5568;
  line-height: 1.5;
}

.content-modal-image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 16px;
  display: block;
}

.content-modal-body {
  font-size: 15px;
  color: #2d3748;
  line-height: 1.65;
  margin-bottom: 16px;
}

.content-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.content-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #006cb7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.content-modal-link:hover {
  background: #005a9e;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   READ MORE / CLAMPED TEXT
═══════════════════════════════════════ */
.card-text-wrap {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.card-text-wrap.clamped {
  max-height: 78px;
}

.card-text-wrap.clamped::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(to bottom, rgba(0,108,183,0) 0%, rgba(0,108,183,0.95) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.read-more-toggle {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #f59e0b;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
  transition: color 0.2s;
  user-select: none;
}

.read-more-toggle:hover {
  color: #d97706;
  text-decoration: underline;
}

.hero-read-more {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: #f59e0b;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 4px;
  transition: color 0.2s;
  user-select: none;
  align-self: flex-start;
}

.hero-read-more:hover {
  color: #d97706;
  text-decoration: underline;
}

/* ═══════════════════════════════════════
   SECONDARY GRID
═══════════════════════════════════════ */

#timeline-stage {
  overflow: visible !important;
}

.sec-grid-wrapper {
  position: absolute;
  top: 19.74%; /* matches the road-bg padding-bottom aspect ratio */
  left: 0;
  width: 100%;
  z-index: 2;
  padding: 24px 20px 40px;
  box-sizing: border-box;
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(var(--sec-grid-cols, 3), 1fr);
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
}

/* ── Individual secondary grid card ── */
.sec-grid-card {
  background: #fff;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(59, 130, 246, 0.8);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 108, 183, 0.07);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(245, 158, 11, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  cursor: pointer; 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* Ensure cards have a minimum width and don't collapse */
  min-width: 0;
}

.sec-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(245, 158, 11, 0.18);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(251,191,36,0.15);
}

/* Colored top bar */
.sec-grid-card::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #006cb7 0%, #f59e0b 100%);
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

/* ── Hero image inside card ── */
.sec-card-hero {
  width: 100%;
  height: 250px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.sec-card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.35s ease;
}

.sec-card-hero:hover img,
.sec-grid-card:hover .sec-card-hero img {
  transform: scale(1.05);
}

.sec-card-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
  pointer-events: none;
}

/* ── Card inner content ── */
.sec-card-inner {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Year label ── */
.sec-card-year {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sec-card-year.bl { color: #006cb7; }
.sec-card-year.or { color: #f59e0b; }

/* ── Title ── */
.sec-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #006CB7;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* ── Body text ── */
.sec-card-body {
  font-size: 14px;
  color: #2d3748;
  line-height: 1.65;
  margin-bottom: 10px;
  flex: 1;
}

.sec-card-body p,
.sec-card-body li {
  color: #303030;
}

.sec-card-body ul {
  padding-left: 18px;
}

.sec-card-body-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Read more button ── */

.sec-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: #006cb7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sec-card-read-more:hover {
  background: #005a9e;
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Video/action buttons ── */
.sec-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.sec-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: #006cb7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.sec-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: #006cb7;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sec-card-btn:hover {
  background: #005a9e;
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ══════════════════════════════════════
   DESKTOP (>1000px)
══════════════════════════════════════ */
@media (min-width: 1001px) {
  #timeline-stage {
    display: flex;
    flex-direction: row;
    width: 300vw;
    will-change: transform;
  }

  .roadway-container {
    width: 100vw;
    min-width: 100vw;
    flex-shrink: 0;
    overflow: visible;
  }
  .back-btn-top {
    position: sticky;
    top: 12px;
    z-index: 200;
  }
  
  /* Hide bottom button on desktop */
  .back-btn-bottom {
    display: none !important;
  }
}

/* ══════════════════════════════════════
   TABLET (601px – 1000px)
══════════════════════════════════════ */
@media (min-width: 601px) and (max-width: 1000px) {
  .sec-grid-wrapper {
    position: static !important;
    padding: 20px 16px 32px !important;
    width: 100% !important;
    top: auto !important;
  }

  .sec-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }

  .sec-card-hero {
    height: 160px;
  }
}

/* ══════════════════════════════════════
   MOBILE (≤1000px)
══════════════════════════════════════ */
@media (max-width: 1000px) {
	
  #timeline-stage {
    display: block;
    width: 100%;
    transform: none !important;
  }

  #road-strip {
    display: none;
  }

  .roadway-container {
    width: 100%;
    min-width: 100%;
  }

  #secondaryViewContainer {
    display: none;
  }
  
  #secondaryViewContainer.mobile-active,
  #primaryView {
    overflow: visible !important;
  }

  #secondaryViewContainer.mobile-active {
    display: block;
  }

  #primaryView.mobile-hidden {
    display: none;
  }

  .road-bg {
    display: none !important;
  }

  .svg-grid-overlay,
  .road-svg,
  .road-container svg {
    display: none !important;
  }

  .road-container {
    width: 100%;
	min-height: 300px;
    max-width: 1000px;
    margin: 0 auto;
    background-image: url("/applications/c2c/images/roadway-vertical.png");
    background-repeat: repeat-y;
    background-size: cover;
    background-position: center top;
	overflow: visible !important;
  }

  .timeline-items {
    position: static !important;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    pointer-events: auto;
    padding: 15px 12px 20px 12px;
  }

  .timeline-item {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    display: block;
    width: 100%;
    margin-bottom: 24px;
    opacity: 1 !important;
  }

  .dot-img-wrap {
    width: 100%;
    height: auto;
    margin-bottom: 12px;
  }

  .dot-img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
  }

  .timeline-card {
    position: static !important;
    width: calc(100% - 16px) !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 8px !important;
    opacity: 1 !important;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  }

  #primaryTimelineItems .timeline-card::before {
    border-radius: 10px 10px 0 0;
    margin: -14px -16px 12px -16px;
  }

  .timeline-card.top,
  .timeline-card.bottom {
    position: static !important;
  }

  .headerInfo {
    position: static;
    left: auto;
    top: auto;
    padding: 20px 16px 0;
    max-width: 100%;
  }

  .back-btn {
    display: inline-block !important;
    position: sticky;
    top: 10px;
    margin: 10px 16px;
    z-index: 200;
  }
  
  .back-btn-bottom {
    display: block;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }

  .hero-header-content {
    width: 250px;
    padding: 15px;
  }

  .hero-header-item {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    padding: 24px 20px 16px;
    box-sizing: border-box;
  }

  .hero-header-item .hero-header-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
    .hero-header-item {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: 100% !important;
    padding: 20px 16px 12px !important;
    box-sizing: border-box !important;
  }

  .hero-header-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .hero-section-title { font-size: 2.4rem !important; }
  .hero-section-sub   { font-size: 2.1rem !important; }

  .car {
    position: fixed;
  }

  .car.car-mobile-bottom {
    display: block !important;
  }

  .content-modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .content-modal-dialog::before {
    border-radius: 0;
  }

  .content-modal-hero-img {
    height: 150px;
  }

  /* Mobile grid: always single column */
  .sec-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Mobile: grid wrapper flows in document — NOT absolute */
  .sec-grid-wrapper {
    position: static !important;
    top: auto !important;
    padding: 20px 16px 32px !important;
    width: 100% !important;
  }

  .sec-card-hero {
    height: 140px;
  }

  .wpb-wrapper {
    visible: ;
  }
  
}

/* Mobile: hide the road container entirely on secondary view */
@media (max-width: 1000px) {
	
  #secondaryRoadContainer {
    display: none !important;
  }	
  
  .back-btn-top {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 200;
  }
	
  .sec-grid-wrapper {
    background-image: url('/applications/c2c/images/roadway-vertical.png');
    background-repeat: repeat-y;
    background-size: cover;
    background-position: center top;
  }

@media (max-width: 480px) {
  .card-year-bl,
  .card-year-or {
    font-size: 16px;
  }

  .timeline-card h3 {
    font-size: 13px;
  }

  .timeline-card p {
    font-size: 12px;
  }

  .card-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .sec-grid-card-hero {
    height: 140px;
  }

  .sec-grid-card-title {
    font-size: 16px;
  }

  .sec-grid-card-body {
    font-size: 13px;
  }
}


#secondaryViewContainer {
  overflow: visible;
  position: relative;
}