/* ============================================================
   WAGate.app — Integration pages (/integrations/*)
   SEO content pages: overview, how-to, use cases, FAQ.
   Builds on styles.css tokens + the legal.css reading system
   (.lg-* classes) + dev.css code blocks. EN + Hebrew (RTL).
   ============================================================ */

/* Card accent pairs — mirrored from landing.css so these pages
   don't need to pull in the whole landing stylesheet. */
:root {
  --peach: #ffe7d4;  --peach-ink: #c1410b;
  --lilac: #eae6ff;  --lilac-ink: #6d33d6;
  --mint:  #d2f2df;  --mint-ink:  #058a52;
  --lemon: #fbeec2;  --lemon-ink: #a06d09;
  --rose:  #ffe1e7;  --rose-ink:  #d23a5e;
  --sky:   #d9eafd;  --sky-ink:   #1f6fe0;
}

/* Slightly wider reading column than legal — these pages carry
   step lists, tables, and code. */
.int-container { max-width: 840px; }

/* ---- Breadcrumb ---- */
.int-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.int-crumbs a { color: var(--text-muted); font-weight: 600; }
.int-crumbs a:hover { color: var(--accent-text); }
.int-crumbs .sep { color: var(--border-stronger); }
.int-crumbs .cur { color: var(--text); font-weight: 600; }

/* ---- Hero ---- */
.int-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}
.int-hero-ic {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--sh-xs);
}
.int-hero-ic svg { width: 30px; height: 30px; }
.int-hero-cat {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 6px;
}
.int-hero-h1 {
  font-size: 33px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ---- Benefit / feature grid ---- */
.int-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 10px 0 26px;
}
.int-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--sh-xs);
}
.int-card-t {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}
.int-card-d {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---- Numbered how-to steps ---- */
.int-steps {
  list-style: none;
  counter-reset: int-step;
  padding: 0;
  margin: 12px 0 26px;
}
.int-steps > li {
  position: relative;
  counter-increment: int-step;
  padding-inline-start: 52px;
  padding-bottom: 22px;
  margin: 0;
}
.int-steps > li::before {
  content: counter(int-step);
  position: absolute;
  inset-inline-start: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: var(--accent-tint);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}
/* Connector line between step bullets. */
.int-steps > li::after {
  content: "";
  position: absolute;
  inset-inline-start: 16.5px;
  top: 36px;
  bottom: 4px;
  width: 1px;
  background: var(--border-strong);
}
.int-steps > li:last-child { padding-bottom: 0; }
.int-steps > li:last-child::after { display: none; }
.int-step-t {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 4px;
  letter-spacing: -0.01em;
}
.int-step-d { font-size: 15px; color: var(--text); line-height: 1.65; }
.int-step-d p { margin: 0 0 10px; }
.int-step-d p:last-child { margin-bottom: 0; }

/* ---- FAQ accordion ---- */
.int-faq { margin: 8px 0 8px; }
.int-faq-item {
  border-bottom: 1px solid var(--border);
}
.int-faq-item:first-child { border-top: 1px solid var(--border); }
.int-faq-q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 2px;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
}
.int-faq-q::-webkit-details-marker { display: none; }
.int-faq-ic {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}
.int-faq-item[open] .int-faq-ic { transform: rotate(90deg); }
.int-faq-a {
  padding: 0 2px 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}
.int-faq-a p { margin: 0 0 12px; }
.int-faq-a p:last-child { margin-bottom: 0; }
.int-faq-a a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---- Related integrations ---- */
.int-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.int-rel-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-xs);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.int-rel-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.int-rel-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.int-rel-ic svg { width: 21px; height: 21px; }
.int-rel-name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.int-rel-cat {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ---- CTA band ---- */
.int-cta {
  margin: 44px 0 8px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-2);
  border-radius: var(--r-xl, 22px);
  padding: 34px 32px;
  text-align: center;
}
.int-cta-h {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.int-cta-p {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 auto 20px;
  max-width: 520px;
}
.int-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.int-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
}
.int-btn--primary {
  background: var(--accent);
  color: var(--text-on-accent, #fff);
  box-shadow: var(--sh-sm);
}
.int-btn--primary:hover { background: var(--accent-press, var(--accent-text)); }
.int-btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.int-btn--ghost:hover { background: var(--surface-2); }

/* ---- Hub (index) hero + grid ---- */
.int-hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.int-hub-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh-xs);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.int-hub-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.int-hub-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.int-hub-ic {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.int-hub-ic svg { width: 25px; height: 25px; }
.int-hub-cat {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.int-hub-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.int-hub-d { font-size: 14.5px; color: var(--text-muted); line-height: 1.55; }
.int-hub-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--accent-text);
}

/* Keep Latin codes / brand names LTR inside Hebrew prose. */
.int-doc .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

@media (max-width: 640px) {
  .int-grid, .int-related, .int-hub { grid-template-columns: 1fr; }
  .int-hero { gap: 14px; }
  .int-hero-h1 { font-size: 24px; }
  .int-hero-ic { width: 52px; height: 52px; border-radius: 15px; }
  .int-hero-ic svg { width: 25px; height: 25px; }
  /* Long URLs, codes, and tokens must wrap instead of forcing horizontal scroll. */
  .int-doc { overflow-wrap: break-word; }
  .int-doc.dev-doc code { white-space: normal; word-break: break-word; }
  .int-doc table { font-size: 13px; }
  .int-steps > li { padding-inline-start: 44px; }
  .int-cta { padding: 28px 18px; margin: 32px 0 4px; }
  .int-cta-h { font-size: 20px; }
  .int-cta-p { font-size: 14.5px; }
  .int-btn { padding: 11px 18px; font-size: 14.5px; }
}

/* ============================================================
   Circuit v2 overrides — align /integrations with the redesigned
   landing: mono kickers, crisp radii, dark CTA band, lime action.
   ============================================================ */
.int-hero-cat, .int-hub-cat, .int-rel-cat {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, 'Rubik', monospace;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #0e9f5d;
}
.int-hero-ic { border-radius: 16px; box-shadow: none; border: 1px solid rgba(10, 20, 14, .06); }
.int-card, .int-rel-card, .int-hub-card { border-radius: 18px; box-shadow: none; }
.int-rel-card:hover, .int-hub-card:hover { box-shadow: 0 2px 6px -2px rgba(10,20,14,.07), 0 20px 44px -22px rgba(10,20,14,.16); }

/* CTA band → dark Circuit card with the lime action */
.int-cta {
  background:
    radial-gradient(560px 260px at 50% -100px, rgba(18, 183, 106, .38), transparent 62%),
    #0a0f0c;
  border: 1px solid #24302a;
  border-radius: 26px;
  color: #eaf3ec;
}
.int-cta-h { color: #eaf3ec; }
.int-cta-p { color: #a7b5ab; }
.int-btn { border-radius: 13px; }
.int-btn--primary {
  background: #d8f24a;
  color: #131a03;
  box-shadow: 0 12px 32px -12px rgba(216, 242, 74, .45);
}
.int-btn--primary:hover { background: #e3fa5f; }
.int-cta .int-btn--ghost {
  background: transparent;
  color: #eaf3ec;
  border: 1px solid #24302a;
}
.int-cta .int-btn--ghost:hover { background: rgba(255,255,255,.06); }
