/* ============================================================
   how-it-works.css — Process page styles
   ============================================================ */

/* ── PAGE HERO ──
   IMAGE: images/hiw-hero.jpg → search "cargo loading ship port"
── */
.page-hero.hiw-hero {
  background-image: url('https://res.cloudinary.com/dwaxgussx/image/upload/v1773956838/hiw-hero_lvfz88.avif');
  min-height: 420px;
  display: flex;
  align-items: center;
}

/* ── INTRO SECTION ── */
.hiw-intro {
  background: var(--white);
  padding: 100px 0;
}

.hiw-intro__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hiw-intro__content h2 { color: var(--navy); margin-bottom: 8px; }

.hiw-intro__content p {
  font-size: 1.02rem;
  color: var(--gray-500);
  line-height: 1.85;
  margin-bottom: 20px;
}

/* Mode badges */
.mode-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  transition: background 0.2s, border-color 0.2s;
}

.mode-badge:hover {
  background: rgba(232,93,4,0.08);
  border-color: rgba(232,93,4,0.3);
  color: var(--orange);
}

.mode-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--orange);
}

/* Right: diagram card */
.hiw-intro__diagram {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-xl);
}

.diag-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.diag-row:last-child { border-bottom: none; }

.diag-row__icon {
  width: 40px;
  height: 40px;
  background: rgba(232,93,4,0.12);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diag-row__icon svg {
  width: 20px;
  height: 20px;
  fill: var(--orange);
}

.diag-row__text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.diag-arrow {
  padding: 4px 0 4px 56px;
  opacity: 0.4;
}

.diag-arrow svg {
  width: 14px;
  height: 14px;
  fill: var(--orange);
}

/* ── MAIN TIMELINE ── */
.process-timeline {
  background: var(--off-white);
  padding: 100px 0;
}

.process-timeline__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 80px;
}

.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

/* Central vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: linear-gradient(to bottom,
    var(--orange),
    rgba(232,93,4,0.15) 90%,
    transparent
  );
}

.tl-item {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  margin-bottom: 56px;
  position: relative;
}

.tl-item:last-child { margin-bottom: 0; }

/* Content columns */
.tl-left  { padding-right: 40px; text-align: right; }
.tl-right { padding-left: 40px;  text-align: left; }

/* Alternate which side shows content */
.tl-item:nth-child(odd)  .tl-left  { /* shows card */ }
.tl-item:nth-child(odd)  .tl-right { /* empty */ }
.tl-item:nth-child(even) .tl-left  { order: 3; text-align: left; padding-right: 0; padding-left: 40px; }
.tl-item:nth-child(even) .tl-center { order: 2; }
.tl-item:nth-child(even) .tl-right { order: 1; padding-left: 0; padding-right: 40px; text-align: right; }

/* Step badge in center */
.tl-center {
  display: flex;
  justify-content: center;
  z-index: 1;
}

.tl-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid var(--off-white);
  box-shadow: 0 0 0 3px var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  flex-shrink: 0;
}

/* Timeline card */
.tl-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--orange);
}

.tl-card__icon {
  width: 36px;
  height: 36px;
  background: var(--navy);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* Icon alignment on right-text cards */
.tl-left .tl-card__icon,
.tl-item:nth-child(even) .tl-left .tl-card__icon {
  margin-left: auto;
}

.tl-right .tl-card__icon { margin-left: 0; }
.tl-item:nth-child(even) .tl-left .tl-card__icon { margin-left: auto; }

.tl-card__icon svg {
  width: 18px;
  height: 18px;
  fill: var(--orange);
}

.tl-card h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}

.tl-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ── MODE PATHS ── */
.mode-paths {
  background: var(--navy);
  padding: 100px 0;
}

.mode-paths__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.mode-paths__header h2 { color: var(--white); }
.mode-paths__header p  { color: rgba(255,255,255,0.55); }

.mode-paths__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mode-card {
  background: var(--navy-mid);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s, transform 0.2s;
}

.mode-card:hover {
  border-color: rgba(232,93,4,0.4);
  transform: translateY(-4px);
}

.mode-card__header {
  background: rgba(232,93,4,0.9);
  padding: 24px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode-card__header svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
  flex-shrink: 0;
}

.mode-card__header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: 1.5px;
}

.mode-steps {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.mode-step {
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
  position: relative;
}

.mode-step:last-child { padding-bottom: 0; }

.mode-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.08);
}

.mode-step__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  z-index: 1;
  margin-top: 2px;
}

.mode-step:last-child .mode-step__dot {
  background: rgba(255,255,255,0.2);
}

.mode-step h5 {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 3px;
}

.mode-step p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* ── FAQ ── */
.hiw-faq {
  background: var(--off-white);
  padding: 100px 0;
}

.hiw-faq__header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--r-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item.open { box-shadow: var(--shadow-md); }

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  cursor: pointer;
  gap: 16px;
}

.faq-item__q h5 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--navy);
  line-height: 1.4;
}

.faq-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(232,93,4,0.1);
  border: 1px solid rgba(232,93,4,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--orange);
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s, background 0.2s;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  background: var(--orange);
  color: var(--white);
}

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-item__a { max-height: 240px; }

.faq-item__a p {
  padding: 4px 24px 22px;
  font-size: 0.92rem;
  color: var(--gray-500);
  line-height: 1.75;
  border-top: 1px solid var(--gray-100);
  padding-top: 16px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hiw-intro__inner { grid-template-columns: 1fr; gap: 48px; }
  .mode-paths__grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Collapse timeline to left-aligned single column */
  .timeline::before { left: 27px; }

  .tl-item {
    grid-template-columns: 54px 1fr;
    gap: 0;
  }

  .tl-left { display: none; }
  .tl-item:nth-child(even) .tl-left { display: none; }

  .tl-center { order: 1 !important; }

  .tl-right,
  .tl-item:nth-child(even) .tl-left {
    order: 2 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  .tl-badge { width: 44px; height: 44px; font-size: 1rem; }
}

/* ── Timeline card hover lift ── */
.tl-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              opacity 0.65s ease, /* reveal */
           /* reveal */
}

.tl-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* ── FAQ item open transition ── */
.faq-item {
  transition: box-shadow 0.25s ease;
}

/* ── Mode step dot pulse on card hover ── */
.mode-card:hover .mode-step__dot:first-child {
  animation: pulseRing 1.5s ease-out infinite;
}
