/* Extracted page styles from how-it-works.php */

/* =========================================================
   HOW IT WORKS PAGE - PHP + TSX STYLE + INTERACTIVE
========================================================= */

.kt-hiw-page {
  --hiw-cyan: #06b6d4;
  --hiw-cyan-dark: #0891b2;
  --hiw-blue: #0e3f6c;
  --hiw-blue-2: #123f68;
  --hiw-text: var(--text, #0f172a);
  --hiw-muted: var(--text-muted, #64748b);
  --hiw-bg: var(--bg, #ffffff);
  --hiw-bg-2: var(--bg-2, rgba(241, 245, 249, 0.45));
  --hiw-card: var(--card-bg, #ffffff);
  --hiw-border: var(--border, rgba(148, 163, 184, 0.28));

  min-height: 100vh;
  padding-top: var(--nav-h, 80px);
  background: var(--hiw-bg);
  color: var(--hiw-text);
  overflow: hidden;
}

[data-theme="dark"] .kt-hiw-page {
  --hiw-text: #f8fafc;
  --hiw-muted: rgba(226, 232, 240, 0.78);
  --hiw-bg: #0e3f6c;
  --hiw-bg-2: #123f68;
  --hiw-card: rgba(255, 255, 255, 0.08);
  --hiw-border: rgba(255, 255, 255, 0.16);

  background:
    radial-gradient(circle at 12% 10%, rgba(6, 182, 212, 0.18), transparent 32%),
    radial-gradient(circle at 86% 26%, rgba(255, 255, 255, 0.08), transparent 26%),
    #0e3f6c;
}

.kt-hiw-page * {
  box-sizing: border-box;
}

.kt-hiw-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* Thin animated cyan separator */
.kt-hiw-line {
  position: relative;
  height: 1px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(6, 182, 212, 0.36),
    transparent
  );
}

.kt-hiw-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    #06b6d4,
    #67e8f9,
    transparent
  );
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.9);
  animation: ktHiwLineMove 3.8s linear infinite;
}

@keyframes ktHiwLineMove {
  0% { left: -35%; }
  100% { left: 100%; }
}

/* Buttons */
.kt-hiw-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  transition: 0.25s ease;
}

.kt-hiw-btn.primary {
  background: var(--hiw-cyan-dark);
  color: #fff !important;
  border: 1px solid var(--hiw-cyan-dark);
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.18);
}

.kt-hiw-btn.primary:hover {
  transform: translateY(-2px);
  background: var(--hiw-cyan);
  border-color: var(--hiw-cyan);
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.22);
}

.kt-hiw-btn.ghost {
  background: transparent;
  color: var(--hiw-text) !important;
  border: 1px solid var(--hiw-border);
}

.kt-hiw-btn.ghost:hover {
  transform: translateY(-2px);
  color: var(--hiw-cyan) !important;
  border-color: rgba(6, 182, 212, 0.55);
}

/* Hero */
.kt-hiw-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 9vw, 132px) 0 clamp(78px, 8vw, 112px);
  border-bottom: 1px solid var(--hiw-border);
}

.kt-hiw-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.kt-hiw-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  display: block;
}

.kt-hiw-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--hiw-bg) 0%,
    rgba(255, 255, 255, 0.92) 54%,
    rgba(255, 255, 255, 0.38) 100%
  );
}

[data-theme="dark"] .kt-hiw-hero-bg img {
  opacity: 0.35;
}

[data-theme="dark"] .kt-hiw-hero-bg::after {
  background: linear-gradient(
    90deg,
    #0e3f6c 0%,
    rgba(14, 63, 108, 0.92) 54%,
    rgba(14, 63, 108, 0.52) 100%
  );
}

.kt-hiw-hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.kt-hiw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--hiw-cyan);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kt-hiw-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--hiw-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}

.kt-hiw-hero h1 {
  max-width: 900px;
  margin: 0 0 24px;
  color: var(--hiw-text);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.kt-hiw-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--hiw-muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.kt-hiw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Overview strip */
.kt-hiw-overview {
  padding: 48px 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(6, 182, 212, 0.08), transparent 30%),
    var(--hiw-bg-2);
  border-bottom: 1px solid var(--hiw-border);
}

.kt-hiw-overview-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.kt-hiw-overview-grid::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 9%;
  right: 9%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(6, 182, 212, 0.45),
    transparent
  );
  z-index: 0;
}

.kt-hiw-overview-step {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
  padding: 0;
  color: var(--hiw-text);
}

.kt-hiw-overview-img {
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid var(--hiw-cyan);
  background: #0e3f6c;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kt-hiw-overview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.kt-hiw-overview-step:hover .kt-hiw-overview-img,
.kt-hiw-overview-step.is-active .kt-hiw-overview-img {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.48);
}

.kt-hiw-overview-step:hover .kt-hiw-overview-img img,
.kt-hiw-overview-step.is-active .kt-hiw-overview-img img {
  transform: scale(1.08);
}

.kt-hiw-overview-step strong {
  display: block;
  color: var(--hiw-cyan);
  font-size: 0.8rem;
  line-height: 1;
  margin-bottom: 6px;
}

.kt-hiw-overview-step span {
  display: block;
  color: var(--hiw-text);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.3;
}

/* Steps Timeline */
.kt-hiw-steps {
  padding: clamp(76px, 9vw, 112px) 0;
  background: var(--hiw-bg);
}

.kt-hiw-step-list {
  display: grid;
  gap: clamp(72px, 10vw, 112px);
}

.kt-hiw-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(38px, 6vw, 76px);
  align-items: center;
  scroll-margin-top: 120px;
}

.kt-hiw-step:nth-child(even) .kt-hiw-step-content {
  order: 2;
}

.kt-hiw-step:nth-child(even) .kt-hiw-step-media {
  order: 1;
}

.kt-hiw-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  color: var(--hiw-cyan);
  background: rgba(6, 182, 212, 0.10);
  border: 1px solid rgba(6, 182, 212, 0.18);
  font-size: 0.86rem;
  font-weight: 900;
}

.kt-hiw-step-pill span:first-child {
  opacity: 0.68;
}

.kt-hiw-step h2 {
  margin: 0 0 18px;
  color: var(--hiw-text);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.kt-hiw-step p {
  max-width: 680px;
  margin: 0 0 30px;
  color: var(--hiw-muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.75;
}

.kt-hiw-features {
  display: grid;
  gap: 13px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.kt-hiw-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hiw-text);
  font-size: 0.96rem;
  font-weight: 750;
  opacity: 0;
  transform: translateY(10px);
}

.kt-hiw-step.is-visible .kt-hiw-features li {
  animation: ktHiwFeatureIn 0.45s ease forwards;
}

.kt-hiw-step.is-visible .kt-hiw-features li:nth-child(1) { animation-delay: 0.05s; }
.kt-hiw-step.is-visible .kt-hiw-features li:nth-child(2) { animation-delay: 0.10s; }
.kt-hiw-step.is-visible .kt-hiw-features li:nth-child(3) { animation-delay: 0.15s; }
.kt-hiw-step.is-visible .kt-hiw-features li:nth-child(4) { animation-delay: 0.20s; }
.kt-hiw-step.is-visible .kt-hiw-features li:nth-child(5) { animation-delay: 0.25s; }

@keyframes ktHiwFeatureIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kt-hiw-features li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.10);
  color: var(--hiw-cyan);
  font-size: 0.72rem;
  font-weight: 950;
}

[data-theme="dark"] .kt-hiw-features li::before {
  background: rgba(255, 255, 255, 0.10);
}

.kt-hiw-step-media {
  perspective: 900px;
}

.kt-hiw-img-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--hiw-border);
  background: #0e3f6c;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
  transform-style: preserve-3d;
  transition: transform 0.22s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.kt-hiw-step.is-focused .kt-hiw-img-card {
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 26px 70px rgba(6, 182, 212, 0.18);
}

.kt-hiw-img-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.75s ease;
}

.kt-hiw-img-card:hover img {
  transform: scale(1.055);
}

.kt-hiw-img-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(14, 63, 108, 0.65), transparent 58%),
    radial-gradient(circle at 18% 18%, rgba(6, 182, 212, 0.20), transparent 28%);
  pointer-events: none;
}

.kt-hiw-img-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
}

.kt-hiw-img-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  border: 2px solid var(--hiw-cyan);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.86rem;
  font-weight: 950;
}

[data-theme="dark"] .kt-hiw-img-num {
  background: rgba(14, 63, 108, 0.82);
  color: #f8fafc;
}

.kt-hiw-img-caption strong {
  display: block;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.2;
}

.kt-hiw-img-caption span {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Journey Banner */
.kt-hiw-journey {
  padding: 64px 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(6, 182, 212, 0.08), transparent 30%),
    var(--hiw-bg-2);
}

.kt-hiw-journey-card {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--hiw-border);
  background: #0e3f6c;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

.kt-hiw-journey-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.7s ease;
}

.kt-hiw-journey-card:hover img {
  transform: scale(1.045);
}

.kt-hiw-journey-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--hiw-bg) 0%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

[data-theme="dark"] .kt-hiw-journey-card::after {
  background: linear-gradient(
    90deg,
    #0e3f6c 0%,
    rgba(14, 63, 108, 0.78) 50%,
    rgba(14, 63, 108, 0.10) 100%
  );
}

.kt-hiw-journey-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: clamp(28px, 5vw, 48px);
}

.kt-hiw-journey-content h3 {
  margin: 0 0 14px;
  color: var(--hiw-text);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.14;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.kt-hiw-journey-content p {
  margin: 0 0 26px;
  color: var(--hiw-muted);
  line-height: 1.72;
}

/* CTA */
.kt-hiw-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(76px, 9vw, 112px) 0;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.24), transparent 28%),
    #0e3f6c;
}

.kt-hiw-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.kt-hiw-cta .kt-hiw-container {
  position: relative;
  z-index: 1;
}

.kt-hiw-cta h2 {
  max-width: 780px;
  margin: 0 auto 16px;
  color: #ffffff;
  font-size: clamp(1.9rem, 3.7vw, 3rem);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.kt-hiw-cta p {
  max-width: 620px;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1rem;
  line-height: 1.7;
}

.kt-hiw-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.kt-hiw-cta .kt-hiw-btn.ghost {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24);
}

.kt-hiw-cta .kt-hiw-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff !important;
}

/* Reveal animation */
.kt-hiw-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.kt-hiw-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .kt-hiw-overview-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }

  .kt-hiw-overview-grid::before {
    display: none;
  }

  .kt-hiw-overview-img {
    width: 68px;
    height: 68px;
  }

  .kt-hiw-step,
  .kt-hiw-step:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .kt-hiw-step:nth-child(even) .kt-hiw-step-content,
  .kt-hiw-step:nth-child(even) .kt-hiw-step-media {
    order: initial;
  }
}

@media (max-width: 760px) {
  .kt-hiw-page {
    padding-top: var(--nav-h, 72px);
  }

  .kt-hiw-container {
    width: min(100% - 28px, 1180px);
  }

  .kt-hiw-hero {
    padding: 64px 0 70px;
  }

  .kt-hiw-hero-bg::after {
    background: linear-gradient(
      90deg,
      var(--hiw-bg) 0%,
      rgba(255, 255, 255, 0.96) 72%,
      rgba(255, 255, 255, 0.75) 100%
    );
  }

  [data-theme="dark"] .kt-hiw-hero-bg::after {
    background: linear-gradient(
      90deg,
      #0e3f6c 0%,
      rgba(14, 63, 108, 0.94) 72%,
      rgba(14, 63, 108, 0.78) 100%
    );
  }

  .kt-hiw-hero h1 {
    font-size: clamp(2.1rem, 10vw, 3.3rem);
  }

  .kt-hiw-overview {
    padding: 38px 0;
  }

  .kt-hiw-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kt-hiw-overview-step:last-child {
    grid-column: 1 / -1;
  }

  .kt-hiw-steps {
    padding: 58px 0;
  }

  .kt-hiw-step-list {
    gap: 76px;
  }

  .kt-hiw-actions,
  .kt-hiw-cta-actions {
    flex-direction: column;
  }

  .kt-hiw-btn {
    width: 100%;
  }

  .kt-hiw-journey-content {
    padding: 28px;
  }

  .kt-hiw-journey-card {
    min-height: 360px;
  }

  .kt-hiw-journey-card::after {
    background: linear-gradient(
      90deg,
      var(--hiw-bg) 0%,
      rgba(255, 255, 255, 0.92) 78%,
      rgba(255, 255, 255, 0.70) 100%
    );
  }

  [data-theme="dark"] .kt-hiw-journey-card::after {
    background: linear-gradient(
      90deg,
      #0e3f6c 0%,
      rgba(14, 63, 108, 0.92) 78%,
      rgba(14, 63, 108, 0.76) 100%
    );
  }
}

@media (max-width: 460px) {
  .kt-hiw-overview-grid {
    grid-template-columns: 1fr;
  }

  .kt-hiw-overview-step:last-child {
    grid-column: auto;
  }

  .kt-hiw-overview-step {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 12px;
    border: 1px solid var(--hiw-border);
    border-radius: 16px;
    background: var(--hiw-card);
  }

  .kt-hiw-overview-img {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kt-hiw-line::before,
  .kt-hiw-reveal,
  .kt-hiw-features li,
  .kt-hiw-img-card,
  .kt-hiw-overview-step,
  .kt-hiw-overview-img,
  .kt-hiw-journey-card img {
    animation: none !important;
    transition: none !important;
  }

  .kt-hiw-reveal,
  .kt-hiw-features li {
    opacity: 1 !important;
    transform: none !important;
  }
}
