/* ================================================================
   OUR JOURNEY — Stylesheet (updated)
   Matches the supplied screenshot: white rounded cards, plain bold
   red year text, circular icon outline, soft shadow, faint
   grayscale industrial-photo backdrop.
   ================================================================ */

.journey-section {
  --jr-red: #d81f26;
  --jr-red-dark: #a8151b;
  --jr-ink: #1a1a1a;
  --jr-body: #5b5b5b;
  --jr-line: #e3e3e3;
  --jr-card-bg: #ffffff;
  --jr-shadow: 0 10px 30px rgba(20, 20, 20, 0.08);
  --jr-shadow-hover: 0 24px 48px rgba(20, 20, 20, 0.16);
  --jr-font-display: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --jr-font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --jr-cards-visible: 3;
  --jr-gap: 30px;

  position: relative;
  font-family: var(--jr-font-body);
  /* background: #ffffff; */
  padding: clamp(56px, 7vw, 8px) 0;
  overflow: hidden;
  isolation: isolate;
}

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@400;500;600&display=swap");

/* ---------- Faint grayscale industrial backdrop ----------
   Approximated with layered CSS gradients since no source photos
   were supplied. To use the real photography from the screenshot,
   replace this rule's background-image with your image URLs, e.g.:
   background-image:
     linear-gradient(90deg, rgba(255,255,255,.86), rgba(255,255,255,.94) 45%, rgba(255,255,255,.86)),
     url("/images/cnc-machine.jpg"), url("/images/hydraulic-pumps.jpg");
------------------------------------------------------------------ */
.journey-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.9;
  background-image:
    radial-gradient(ellipse 32% 60% at 6% 45%, rgba(60, 60, 60, 0.10), transparent 70%),
    radial-gradient(ellipse 34% 65% at 95% 40%, rgba(60, 60, 60, 0.09), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.025) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0 2px, transparent 2px 26px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 75%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 75%, transparent 100%);
}

.journey-section .container {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- Heading ---------- */
.journey-section .section-title-new {
  font-family: var(--jr-font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 44px);
  color: var(--jr-ink);
  letter-spacing: -0.01em;
  margin: 0 0 clamp(36px, 5vw, 60px);
}
.journey-section .section-title-new span {
  color: var(--jr-red);
}

/* ---------- Stage: arrows + viewport ---------- */
.journey-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.journey-viewport {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 6px 0 8px;
}

/* ---------- Static timeline rail + animated progress fill ---------- */
.journey-line {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: 2px;
  background: var(--jr-line);
  border-radius: 2px;
  z-index: 0;
  pointer-events: none;
}
.journey-line-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--jr-red), var(--jr-red-dark));
  transition: width 0.2s linear;
}

/* ---------- Track ---------- */
.journey-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--jr-gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-y;
  cursor: grab;
  padding: 4px 4px 10px;
}
.journey-wrapper::-webkit-scrollbar { display: none; }
.journey-wrapper.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.journey-wrapper:focus-visible {
  outline: 2px solid var(--jr-red);
  outline-offset: 6px;
  border-radius: 12px;
}

/* ---------- Arrows ---------- */
.journey-arrow {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--jr-ink);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  z-index: 2;
}
.journey-arrow svg { width: 20px; height: 20px; }
.journey-arrow:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 30px rgba(20, 20, 20, 0.2);
  color: var(--jr-red);
}
.journey-arrow:active { transform: translateY(-1px) scale(0.97); }
.journey-arrow:focus-visible { outline: 2px solid var(--jr-red); outline-offset: 3px; }

/* ---------- Cards ---------- */
.journey-item {
  position: relative;
  flex: 0 0 calc((100% - (var(--jr-cards-visible) - 1) * var(--jr-gap)) / var(--jr-cards-visible));
  scroll-snap-align: start;
  background: var(--jr-card-bg);
  border-radius: 20px;
  padding: 34px 30px 32px;
  box-shadow: var(--jr-shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  min-height: 380px;
}

/* gradient top border */
.journey-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--jr-red), var(--jr-red-dark));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.journey-item:hover,
.journey-item:focus-within {
  transform: translateY(-8px);
  box-shadow: var(--jr-shadow-hover);
}
.journey-item:hover::before,
.journey-item:focus-within::before,
.journey-item.is-active::before {
  opacity: 1;
}

.journey-item.is-active {
  box-shadow: var(--jr-shadow-hover);
}

/* ---------- Icon: circular outline badge ---------- */
.journey-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 18px;
  border-radius: 50%;
  border: 2px solid var(--jr-ink);
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.journey-icon svg { width: 26px; height: 26px; }
.journey-item:hover .journey-icon {
  border-color: var(--jr-red);
  box-shadow: 0 0 0 6px rgba(216, 31, 38, 0.12);
  transform: scale(1.06) rotate(-4deg);
}

/* ---------- Year, title, copy ---------- */
.journey-item .year {
  display: block;
  font-family: var(--jr-font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--jr-red);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: text-shadow 0.3s ease;
}
.journey-item:hover .year,
.journey-item.is-active .year {
  text-shadow: 0 0 18px rgba(216, 31, 38, 0.35);
}

.journey-item h4 {
  font-family: var(--jr-font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--jr-ink);
  margin: 0 0 12px;
  line-height: 1.3;
}

.journey-item p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--jr-body);
  margin: 0;
}

/* ---------- Responsive: cards visible per breakpoint ---------- */
/* Desktop: 3 cards (default above) */

@media (max-width: 1200px) {
  .journey-section { --jr-cards-visible: 2.5; --jr-gap: 26px; }
}

@media (max-width: 900px) {
  .journey-section { --jr-cards-visible: 2; --jr-gap: 20px; }
  .journey-arrow { width: 46px; height: 46px; }
}

@media (max-width: 600px) {
  .journey-section { --jr-cards-visible: 1.08; --jr-gap: 16px; }
  .journey-stage { gap: 8px; }
  .journey-arrow { width: 40px; height: 40px; }
  .journey-arrow svg { width: 16px; height: 16px; }
  .journey-item { padding: 28px 22px 26px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .journey-item,
  .journey-arrow,
  .journey-icon {
    transition: none;
  }
  .journey-wrapper { scroll-behavior: auto; }
}
