/* =====================================================
   JEEBLY INTEGRATIONS PORTAL — design tokens & components
   Built on top of Bootstrap 5.3
   ===================================================== */

:root {
  --jb-blue: #003E70;
  --jb-blue-2: #022a4d;
  --jb-red: #DB124B;
  --jb-red-hover: #b80f3d;
  --jb-red-soft: #fde8ee;
  --jb-bg: #ffffff;
  --jb-bg-alt: #f6f7f9;
  --jb-line: #e7eaee;
  --jb-text: #0c1c2e;
  --jb-muted: #5b6b80;
  --jb-card: #ffffff;
  --jb-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 2px 6px rgba(15,23,42,.04);
  --jb-shadow-md: 0 4px 12px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.06);
  --jb-radius: 14px;
  --jb-radius-sm: 10px;
  --jb-code-bg: #0e1422;
  --jb-code-bar: #161d2c;
}

[data-bs-theme="dark"] {
  --jb-bg: #0b1220;
  --jb-bg-alt: #0f1729;
  --jb-line: #1e293b;
  --jb-text: #e7ecf3;
  --jb-muted: #93a1b8;
  --jb-card: #121a2c;
  --jb-red-soft: rgba(219,18,75,.12);
  --jb-shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --jb-shadow-md: 0 12px 40px rgba(0,0,0,.45);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--jb-bg);
  color: var(--jb-text);
  font-size: 16px;
  line-height: 1.55;
}

/* Global heading font & colour — Montserrat + Jeebly blue for all h1–h6 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--jb-blue);
}

.text-jb-red { color: var(--jb-red) !important; }
.text-jb-blue { color: var(--jb-blue) !important; }

/* ----------- Left Sidebar ----------- */
:root {
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --sidebar-transition: width 0.26s cubic-bezier(.4,0,.2,1), margin-left 0.26s cubic-bezier(.4,0,.2,1);
}

.jb-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: #ffffff;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 12px rgba(0,0,0,.06);
  transition: var(--sidebar-transition);
}

/* ---- Logo / Brand strip ---- */
.jb-sidebar-logo {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  overflow: hidden;
  padding: 14px 16px 14px 20px;
  transition: padding .26s cubic-bezier(.4,0,.2,1);
}

.jb-sidebar-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

/* Full logo — shown when expanded */
.jb-sidebar-logo-full {
  height: 52px;
  width: auto;
  display: block;
  transition: opacity .2s ease, transform .2s ease;
}

/* Mini icon — shown when collapsed */
.jb-sidebar-logo-icon {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 8px;
  display: none;
}

/* ---- Collapse toggle button ---- */
.jb-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--jb-muted);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  margin-left: 8px;
}
.jb-collapse-btn:hover {
  background: var(--jb-red-soft);
  color: var(--jb-red);
  border-color: var(--jb-red);
}
.jb-collapse-btn .jb-collapse-icon {
  font-size: .75rem;
  transition: transform .26s cubic-bezier(.4,0,.2,1);
}

/* ---- Section label ---- */
.jb-sidebar-label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 18px 16px 6px;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity .16s ease;
}

/* ---- Nav ---- */
.jb-sidebar-nav {
  padding: 8px 10px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

.jb-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  transition: background .15s ease, color .15s ease;
}

.jb-sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: .9rem;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color .15s ease;
}

.jb-sidebar-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  max-width: 160px;
  transition: opacity .16s ease, max-width .22s ease;
}

.jb-sidebar-link:hover { background: #f1f5f9; color: var(--jb-blue); }
.jb-sidebar-link:hover i { color: var(--jb-blue); }

.jb-sidebar-link.active {
  background: rgba(0,62,112,.08);
  color: var(--jb-blue);
  font-weight: 600;
  margin: 10px 0;
}
.jb-sidebar-link.active i { color: var(--jb-red); }

/* Tooltip (visible only when collapsed) */
.jb-sidebar-link::before {
  content: attr(data-label);
  position: absolute;
  left: calc(var(--sidebar-collapsed-width) - 4px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #fff;
  font-size: .78rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  transition: opacity .12s ease;
}

/* ---- Collapsed state ---- */
.jb-sidebar.is-collapsed { width: var(--sidebar-collapsed-width); cursor: pointer; }

/* Logo swap */
.jb-sidebar.is-collapsed .jb-sidebar-logo { padding: 14px 8px; justify-content: center; }
.jb-sidebar.is-collapsed .jb-sidebar-logo-link { flex: none; }
.jb-sidebar.is-collapsed .jb-sidebar-logo-full { display: none; }
.jb-sidebar.is-collapsed .jb-sidebar-logo-icon { display: block; }
.jb-sidebar.is-collapsed .jb-collapse-btn { margin-left: 0; margin-top: 8px; }

/* Flip chevron icon when collapsed */
.jb-sidebar.is-collapsed .jb-collapse-icon { transform: rotate(180deg); }

/* Nav items */
.jb-sidebar.is-collapsed .jb-sidebar-label { opacity: 0; pointer-events: none; }
.jb-sidebar.is-collapsed .jb-sidebar-link span { opacity: 0; max-width: 0; overflow: hidden; }
.jb-sidebar.is-collapsed .jb-sidebar-link { justify-content: center; padding: 10px 0; gap: 0 !important; }
.jb-sidebar.is-collapsed .jb-sidebar-link i { width: auto; }
.jb-sidebar.is-collapsed .jb-sidebar-chevron { display: none; }

/* Hide submenu when collapsed */
.jb-sidebar.is-collapsed .jb-sidebar-submenu { max-height: 0 !important; overflow: hidden; }

/* Show tooltip on hover when collapsed */
.jb-sidebar.is-collapsed .jb-sidebar-link:hover::before { opacity: 1; }

/* Logo strip stacks vertically when collapsed */
.jb-sidebar.is-collapsed .jb-sidebar-logo {
  flex-direction: column;
  gap: 6px;
}

/* ---- Sidebar submenu (API group) ---- */
.jb-sidebar-api-group { display: flex; flex-direction: column; }

.jb-sidebar-group-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.jb-sidebar-chevron {
  margin-left: auto;
  font-size: .68rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform .22s ease;
}
.jb-sidebar-group-btn[aria-expanded="true"] .jb-sidebar-chevron { transform: rotate(90deg); }

.jb-sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(.4,0,.2,1);
  padding-left: 10px;
  border-left: 2px solid #e2e8f0;
  margin: 2px 10px 4px 20px;
  border-radius: 0 0 4px 4px;
}
.jb-sidebar-submenu.is-open { max-height: 500px; }

/* Sub-group header */
.jb-subgroup { padding: 6px 0 2px; }
.jb-subgroup-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  /* text-transform: uppercase; */
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
  gap: 8px;
}
.jb-subgroup-toggle:hover { background: #f1f5f9; color: var(--jb-blue); }

.jb-subgroup-chevron {
  font-size: .6rem;
  color: #94a3b8;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.jb-subgroup-toggle[aria-expanded="false"] .jb-subgroup-chevron { transform: rotate(-90deg); }

/* Sub-items */
.jb-subgroup-items {
  overflow: hidden;
  max-height: 300px;
  transition: max-height .22s ease;
}
.jb-subgroup-items.is-closed { max-height: 0; }

.jb-sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 10px;
  margin: 1px 0;
  font-size: .82rem;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s, color .15s;
  gap: 8px;
}
.jb-sublink:hover { background: #f1f5f9; color: var(--jb-blue); }
.jb-sublink.active { background: rgba(0,62,112,.07); color: var(--jb-blue); font-weight: 600; }

.jb-sublink-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.jb-sublink:hover .jb-method-badge {
  display: none;
}

/* Method badges */
.jb-method-badge {
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: .04em;
  transition: opacity .15s ease;
}
.jb-method-badge.post { background: rgba(13,110,253,.1); color: #1d6feb; }
.jb-method-badge.get  { background: rgba(22,163,74,.1);  color: #16a34a; }
.jb-method-badge.put  { background: rgba(202,138,4,.12); color: #b45309; }
.jb-method-badge.del  { background: rgba(219,18,75,.1);  color: var(--jb-red); }

/* ---- Page wrapper ---- */
.jb-page-wrap {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: var(--sidebar-transition);
  overflow-x: clip;
}

.jb-page-wrap.sidebar-collapsed { margin-left: var(--sidebar-collapsed-width); }

/* ---- Mobile topbar ---- */
.jb-topbar {
  display: none;
  align-items: center;
  gap: 16px;
  background: var(--jb-blue);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.jb-topbar-logo-img {
  height: 60px;
  width: auto;
  background: #fff;
  border-radius: 9px;
  padding: 4px 8px;
}

.jb-topbar-toggle {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.jb-topbar-toggle:hover { background: rgba(255,255,255,.2); }

/* ---- Sidebar overlay (mobile) ---- */
.jb-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1035;
  cursor: pointer;
}

/* ---- Mobile breakpoint ---- */
@media (max-width: 767.98px) {
  .jb-sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    width: var(--sidebar-width) !important;
  }
  .jb-sidebar.is-open { transform: translateX(0); }
  .jb-sidebar-overlay.is-open { display: block; }
  .jb-page-wrap { margin-left: 0 !important; }
  .jb-topbar { display: flex; }
  .jb-collapse-btn { display: none; }
}

/* ----------- Buttons ----------- */
.jb-btn-primary {
  background: var(--jb-red);
  color: #fff; font-weight: 600; border: 0;
  border-radius: 10px; padding: 12px 22px;
  box-shadow: 0 4px 14px rgba(219,18,75,.25);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.jb-btn-primary:hover {
  background: var(--jb-red-hover); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(219,18,75,.35);
}

.jb-btn-outline {
  background: transparent;
  color: var(--jb-text);
  border: 1.5px solid var(--jb-line);
  font-weight: 600; border-radius: 10px; padding: 11px 20px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.jb-btn-outline:hover {
  border-color: var(--jb-red); color: var(--jb-red);
  background: var(--jb-red-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(219,18,75,.12);
}

.jb-btn-soft {
  background: var(--jb-red-soft);
  color: var(--jb-red);
  border: 0; font-weight: 600;
  border-radius: 10px; padding: 11px 20px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.jb-btn-soft:hover {
  background: var(--jb-red); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(219,18,75,.28);
}

.jb-btn-light {
  background: #fff; color: var(--jb-blue);
  font-weight: 600; border-radius: 10px; padding: 12px 22px; border: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.jb-btn-light:hover {
  background: #f8fafc; color: var(--jb-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.jb-btn-ghost-light {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-weight: 600; border-radius: 10px; padding: 12px 22px;
  display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.jb-btn-ghost-light:hover {
  background: rgba(255,255,255,.2); color: #fff;
  border-color: rgba(255,255,255,.4);
  transform: translateY(-2px);
}

/* ----------- Section container padding ----------- */
/* Keeps section backgrounds full-width but content has breathing room */
.jb-page-wrap .container-xxl,
.jb-page-wrap .container-xl,
.jb-page-wrap .container {
  padding-left: clamp(24px, 3.5vw, 56px);
  padding-right: clamp(24px, 3.5vw, 56px);
}

/* ----------- Sections ----------- */
.jb-section { padding: 96px 0; position: relative; }
.jb-section-alt { background: var(--jb-bg-alt); }

@media (max-width: 768px) {
  .jb-section { padding: 64px 0; }
  .jb-page-wrap .container-xxl,
  .jb-page-wrap .container-xl,
  .jb-page-wrap .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ----------- Typography ----------- */
.jb-h1 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--jb-blue);
}
.jb-h2 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  letter-spacing: -0.02em;
  color: var(--jb-blue);
}
.jb-grad {
  background: #DB124B;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.jb-lead {
  font-size: 1.08rem;
  color: var(--jb-muted);
  max-width: 720px;
}
.jb-sub {
  color: var(--jb-muted);
  font-size: 1rem;
  max-width: 720px;
}

.jb-kicker {
  display: inline-block;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--jb-red);
}

.jb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--jb-red-soft);
  color: var(--jb-red);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .04em;
  padding: 6px 14px; border-radius: 999px;
}
.jb-dot { width: 6px; height: 6px; background: var(--jb-red); border-radius: 50%; box-shadow: 0 0 0 4px rgba(219,18,75,.2); }

/* ----------- Hero ----------- */
.jb-hero {
  position: relative;
  padding: 110px 0 90px;
  background: var(--jb-bg);
  overflow: hidden;
}
.jb-hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(800px 400px at 50% -10%, rgba(0,62,112,.10), transparent 60%),
    radial-gradient(600px 320px at 90% 20%, rgba(219,18,75,.08), transparent 60%),
    linear-gradient(180deg, transparent, transparent);
}
.jb-hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,62,112,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,62,112,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.jb-hero-fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--jb-bg));
  pointer-events: none;
}

.jb-hero-meta { color: var(--jb-muted); font-size: .9rem; font-weight: 500; }

/* ----------- Feature cards ----------- */
.jb-feature-card {
  display: block;
  background: var(--jb-card);
  border: 1px solid var(--jb-line);
  border-radius: var(--jb-radius);
  padding: 28px 24px;
  height: 100%;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  color: var(--jb-text);
  position: relative; overflow: hidden;
}
.jb-feature-card::after {
  content: ""; position: absolute; inset: auto -40% -60% auto;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(219,18,75,.08) 0%, transparent 70%);
  transform: scale(0); transition: transform .4s ease;
}
.jb-feature-card:hover { transform: translateY(-4px); border-color: rgba(219,18,75,.4); box-shadow: var(--jb-shadow-md); color: var(--jb-text); }
.jb-feature-card:hover::after { transform: scale(1); }
.jb-feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--jb-red-soft);
  color: var(--jb-red);
  font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.jb-feature-title { font-family: 'Montserrat', system-ui, sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--jb-blue); }
.jb-feature-text { color: var(--jb-muted); font-size: .94rem; margin-bottom: 14px; }
.jb-feature-link { color: var(--jb-red); font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; }
.jb-feature-card:hover .jb-feature-link i { transform: translateX(3px); }
.jb-feature-link i { transition: transform .15s ease; }

/* ----------- Card ----------- */
.jb-card {
  background: var(--jb-card);
  border: 1px solid var(--jb-line);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--jb-shadow-sm);
}
@media (max-width: 576px) {
  .jb-card { padding: 24px; }
}

.jb-plugins-card .jb-plugin-logos {
  display: flex; align-items: center; justify-content: center;
  gap: 32px; flex-wrap: wrap;
  padding: 12px 0 24px;
}
.jb-plugin-logo {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 36px; line-height: 1;
}
.jb-plugin-logo span { font-size: .82rem; font-weight: 600; color: var(--jb-muted); }
.jb-plugin-logo-soon { color: var(--jb-muted); opacity: .6; }
.jb-plugin-logo-soon i { font-size: 28px; }

.jb-divider {
  height: 1px; background: var(--jb-line); margin: 8px 0 24px;
}

/* ----------- Checklist ----------- */
.jb-checklist { padding: 0; margin: 0; }
.jb-checklist li {
  list-style: none;
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--jb-text); font-weight: 500; font-size: .98rem;
  padding: 6px 0;
}
.jb-checklist li i {
  color: var(--jb-red);
  background: var(--jb-red-soft);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; margin-top: 2px;
}
.jb-checklist-inline li { padding: 0; font-size: .94rem; }

/* ----------- Chips ----------- */
.jb-chip {
  display: inline-flex; align-items: center;
  background: var(--jb-red-soft);
  color: var(--jb-red);
  border-radius: 999px; padding: 8px 16px;
  font-weight: 600; font-size: .86rem;
}
.jb-chip-soft {
  background: var(--jb-card);
  color: var(--jb-text);
  border: 1px solid var(--jb-line);
}
.jb-webhook-chip {
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .15s ease;
  user-select: none;
}
.jb-webhook-chip:hover {
  border-color: var(--jb-red);
  color: var(--jb-red);
  transform: translateY(-1px);
}
.jb-webhook-chip.active {
  background: var(--jb-red);
  border-color: var(--jb-red);
  color: #fff;
}
.jb-webhook-chip.active i { color: #fff !important; }
/* Code fade animation on event switch */
#code-webhook {
  transition: opacity .18s ease;
}
#code-webhook.fading {
  opacity: 0;
}
.jb-usecase-label {
  font-size: .86rem; font-weight: 600; color: var(--jb-text);
}

/* ----------- Code window ----------- */
.jb-code-window {
  background: var(--jb-code-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15,23,42,.18), 0 8px 24px rgba(15,23,42,.08);
  border: 1px solid rgba(255,255,255,.06);
  transform: translateZ(0);
}
.jb-code-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--jb-code-bar);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.jb-code-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.jb-code-file {
  margin-left: 12px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.jb-copy {
  margin-left: auto;
  background: transparent; border: 0;
  color: rgba(255,255,255,.5);
  padding: 4px 8px; border-radius: 6px; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.jb-copy:hover { color: #fff; background: rgba(255,255,255,.08); }
.jb-code {
  margin: 0; padding: 22px 24px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: .88rem; line-height: 1.65;
  color: #d6deeb; background: transparent;
  overflow-x: auto;
}
.jb-code code { background: transparent !important; padding: 0 !important; font-size: inherit; }

/* ----------- Platform tiles ----------- */
/* ----------- Clean logo strip (platform integrations) ----------- */
.jb-logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 48px 64px;
  padding: 16px 0;
}
.jb-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .85;
  transition: opacity .2s ease, transform .2s ease;
}
.jb-logo-item:hover {
  opacity: 1;
  transform: scale(1.05);
}
.jb-logo-item img {
  height: 52px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 576px) {
  .jb-logo-strip { gap: 32px 40px; }
  .jb-logo-item img { height: 38px; max-width: 120px; }
}

/* ----------- Path table ----------- */
.jb-path-table {
  background: var(--jb-card);
  border: 1px solid var(--jb-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--jb-shadow-sm);
  max-width: 980px; margin: 0 auto;
}
.jb-path-head, .jb-path-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  padding: 20px 28px;
  align-items: center;
}
.jb-path-head {
  background: var(--jb-bg-alt);
  font-weight: 700;
  color: var(--jb-text);
  border-bottom: 1px solid var(--jb-line);
}
.jb-path-row { border-bottom: 1px solid var(--jb-line); }
.jb-path-row:last-child { border-bottom: 0; }
.jb-path-row > div { font-size: .96rem; color: var(--jb-text); }
.jb-row-link {
  display: inline-block;
  margin-left: 12px;
  color: var(--jb-red); text-decoration: none;
  font-size: .86rem; font-weight: 600;
}
.jb-row-link:hover { color: var(--jb-red-hover); }

@media (max-width: 640px) {
  .jb-path-head, .jb-path-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .jb-row-link { margin-left: 0; display: block; margin-top: 4px; }
}

/* ----------- CTA strip ----------- */
.jb-cta { padding: 0 0 96px; }
.jb-cta-card {
  background: linear-gradient(135deg, var(--jb-blue) 0%, #001f3d 100%);
  color: #fff;
  border-radius: 24px;
  padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.jb-cta-card::before {
  content: ""; position: absolute; inset: -50% -20% auto auto;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(219,18,75,.4) 0%, transparent 60%);
  pointer-events: none;
}
.jb-cta-card h3 { font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; color: #fff; }

/* White headings on dark/coloured backgrounds — override the global blue rule */
.jb-cta-card h1, .jb-cta-card h2, .jb-cta-card h3,
.jb-cta-card h4, .jb-cta-card h5, .jb-cta-card h6,
.jb-footer h1, .jb-footer h2, .jb-footer h3,
.jb-footer h4, .jb-footer h5, .jb-footer h6,
.jb-topbar h1, .jb-topbar h2, .jb-topbar h3,
.jb-topbar h4, .jb-topbar h5, .jb-topbar h6 {
  color: #fff;
}

@media (max-width: 768px) {
  .jb-cta-card { padding: 28px 24px; text-align: center; justify-content: center; }
}

/* ----------- Footer ----------- */
.jb-footer {
  background: var(--jb-blue);
  color: rgba(255,255,255,.85);
  padding: 0px 0 28px;
}

/* Top brand row */
.jb-footer-top { margin-bottom: 32px; }
.jb-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.jb-footer-logo {
  height: 44px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.jb-footer-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.jb-footer-tagline {
  color: rgba(255,255,255,.5);
  font-size: .88rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0;
}

/* Bottom bar */
.jb-footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  color: rgba(255,255,255,.4);
  font-size: .82rem;
}
.jb-footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}
.jb-footer-links a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .82rem;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.jb-footer-links a:hover { color: #fff; background: rgba(255,255,255,.07); }
.jb-footer-socials {
  display: flex;
  gap: 8px;
}
.jb-footer-socials a {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.6);
  border-radius: 7px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.jb-footer-socials a:hover { background: var(--jb-red); color: #fff; }

@media (max-width: 767.98px) {
  .jb-cta-card .d-flex {
    flex-direction: column;
    width: 100%;
    gap: 12px !important;
  }
  .jb-cta-card .btn {
    width: 100%;
  }
  .jb-footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .jb-footer-links {
    flex: none;
    width: 100%;
    justify-content: center;
    gap: 8px 16px;
  }
  .jb-footer-links a {
    padding: 4px 0;
  }
  .jb-footer-socials {
    justify-content: center;
    width: 100%;
  }
}

/* ----------- Code highlight tweaks ----------- */
.hljs { background: transparent !important; padding: 0 !important; }

/* ============================================================
   CONTACT MODAL
   ============================================================ */
body.jb-modal-open { overflow: hidden; }

.jb-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 16, 32, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: max(20px, 5vh) 20px;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.jb-modal-overlay.is-open {
  opacity: 1; pointer-events: auto;
}

.jb-modal {
  background: var(--jb-card);
  border: 1px solid var(--jb-line);
  border-radius: 22px;
  width: 100%; max-width: 660px;
  max-height: none;
  margin: auto 0;
  flex-shrink: 0;
  box-shadow: 0 32px 80px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.08);
  transform: translateY(18px) scale(.975);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  scrollbar-width: thin;
}
.jb-modal-overlay.is-open .jb-modal {
  transform: translateY(0) scale(1);
}

/* Head */
.jb-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 28px 28px 0;
}
.jb-modal-brand {
  display: flex; align-items: flex-start; gap: 14px;
}
.jb-modal-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--jb-red-soft); color: var(--jb-red);
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.jb-modal-head-text h3 {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em;
  color: var(--jb-text); margin: 0 0 5px;
}
.jb-modal-head-text p {
  color: var(--jb-muted); font-size: .88rem; margin: 0; line-height: 1.5;
}
.jb-modal-close {
  background: var(--jb-bg-alt); border: 1px solid var(--jb-line);
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  color: var(--jb-muted); cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.jb-modal-close:hover {
  background: var(--jb-red-soft); color: var(--jb-red);
  border-color: rgba(219,18,75,.2);
}

/* Divider under head */
.jb-modal-divider {
  height: 1px; background: var(--jb-line); margin: 20px 28px 0;
}

/* Form body */
.jb-modal-form { padding: 22px 28px 28px; }

.jb-mf-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.jb-mf-group {
  display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px;
}
.jb-mf-row > .jb-mf-group { margin-bottom: 0; }
.jb-mf-group label {
  font-size: .82rem; font-weight: 600;
  color: var(--jb-text); letter-spacing: .01em;
}
.jb-mf-req { color: var(--jb-red); margin-left: 2px; }

/* Inputs, selects, textarea */
.jb-mf-group input,
.jb-mf-group select,
.jb-mf-group textarea {
  background: var(--jb-bg);
  border: 1.5px solid var(--jb-line);
  border-radius: 10px; padding: 11px 14px;
  font-size: .92rem; color: var(--jb-text);
  font-family: 'Poppins', sans-serif; width: 100%;
  transition: border-color .15s, box-shadow .15s;
  appearance: auto;
}
.jb-mf-group input::placeholder,
.jb-mf-group textarea::placeholder { color: #b6bdc8; }
.jb-mf-group input:focus,
.jb-mf-group select:focus,
.jb-mf-group textarea:focus {
  outline: 0; border-color: var(--jb-blue);
  box-shadow: 0 0 0 3.5px rgba(0,62,112,.1);
}
.jb-mf-group.is-invalid input,
.jb-mf-group.is-invalid select,
.jb-mf-group.is-invalid textarea,
.jb-mf-group.is-invalid .jb-phone-field {
  border-color: var(--jb-red);
  box-shadow: 0 0 0 3.5px rgba(219,18,75,.1);
}
.jb-mf-error {
  font-size: .78rem; color: var(--jb-red); font-weight: 500;
  display: none; margin-top: -2px;
}
.jb-mf-group.is-invalid .jb-mf-error { display: block; }
.jb-mf-group textarea { resize: vertical; min-height: 88px; line-height: 1.55; }

/* Phone field — combined select + input */
.jb-phone-field {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--jb-line); border-radius: 10px;
  overflow: visible; background: var(--jb-bg);
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.jb-phone-field:focus-within {
  border-color: var(--jb-blue); box-shadow: 0 0 0 3.5px rgba(0,62,112,.1);
}
/* Higher specificity (.jb-phone-field .jb-phone-code = 0-2-0) beats .jb-mf-group select (0-1-1) */
.jb-phone-field .jb-phone-code {
  border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; outline: 0;
  background: var(--jb-bg-alt) !important;
  border-right: 1.5px solid var(--jb-line) !important;
  font-size: .85rem; font-weight: 600; color: var(--jb-text);
  padding: 10px 6px 10px 12px !important;
  width: 118px !important;   /* fixed — prevents 100% override */
  flex: 0 0 118px !important;
  cursor: pointer; appearance: auto;
}
/* input inside phone field must not take 100% width */
.jb-phone-field input[type="tel"] {
  border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; background: transparent !important;
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 11px 14px !important;
}
.jb-phone-field input[type="tel"]:focus { outline: 0; }

/* Searchable phone code picker */
.jb-phone-code-native {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}
.jb-phone-code-picker {
  position: relative;
  flex: 0 0 118px;
  width: 118px;
}
.jb-phone-code-trigger {
  display: flex; align-items: center; justify-content: flex-start;
  width: 100%; height: 100%;
  border: 0; border-radius: 0;
  background: var(--jb-bg-alt);
  border-right: 1.5px solid var(--jb-line);
  font-size: .85rem; font-weight: 600; color: var(--jb-text);
  padding: 10px 8px 10px 12px;
  cursor: pointer; font-family: 'Poppins', sans-serif;
  transition: background .15s;
}
.jb-phone-code-trigger:hover { background: var(--jb-bg); }
.jb-phone-code-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 2100;
  min-width: 260px;
  background: var(--jb-card);
  border: 1.5px solid var(--jb-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06);
  overflow: hidden;
}
.jb-phone-code-search {
  display: block; width: 100%;
  border: 0 !important; border-bottom: 1.5px solid var(--jb-line) !important;
  border-radius: 0 !important; box-shadow: none !important;
  padding: 10px 12px !important;
  font-size: .88rem !important;
  background: var(--jb-bg-alt) !important;
}
.jb-phone-code-search:focus {
  outline: 0;
  border-bottom-color: var(--jb-blue) !important;
}
.jb-phone-code-list {
  list-style: none; margin: 0; padding: 6px 0;
  max-height: 220px; overflow-y: auto;
}
.jb-phone-code-option {
  padding: 9px 14px;
  font-size: .86rem; color: var(--jb-text);
  cursor: pointer; transition: background .12s;
}
.jb-phone-code-option:hover,
.jb-phone-code-option.is-selected {
  background: var(--jb-red-soft);
}
.jb-phone-code-empty {
  padding: 12px 14px;
  font-size: .84rem; color: var(--jb-muted);
  text-align: center;
}

/* reCAPTCHA */
.jb-mf-captcha-wrap {
  display: flex;
  justify-content: flex-start;
  min-height: 78px;
}
.jb-mf-captcha-fallback {
  margin: 0;
  font-size: .82rem;
  color: var(--jb-red);
  font-weight: 500;
}
.jb-mf-group.is-invalid .jb-mf-captcha-wrap {
  border-radius: 10px;
  box-shadow: 0 0 0 3.5px rgba(219,18,75,.12);
}

/* Submit button */
.jb-mf-submit {
  width: 100%; padding: 14px 20px; margin-top: 6px;
  background: var(--jb-red); color: #fff;
  border: 0; border-radius: 11px;
  font-weight: 700; font-size: .97rem; font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 4px 14px rgba(219,18,75,.28);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.jb-mf-submit:hover {
  background: var(--jb-red-hover); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(219,18,75,.35);
}

/* Success state */
.jb-modal-success {
  padding: 52px 32px; text-align: center;
}
.jb-modal-success-icon {
  font-size: 54px; color: #2dbe60; margin-bottom: 18px;
  animation: jb-pop .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes jb-pop {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.jb-modal-success h3 {
  font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em;
  color: var(--jb-text); margin-bottom: 10px;
}
.jb-modal-success p {
  color: var(--jb-muted); font-size: .95rem; margin-bottom: 28px; line-height: 1.6;
}

/* Mobile */
@media (max-width: 600px) {
  .jb-mf-row { grid-template-columns: 1fr; gap: 0; }
  .jb-modal-head { padding: 22px 20px 0; }
  .jb-modal-divider { margin: 18px 20px 0; }
  .jb-modal-form { padding: 18px 20px 22px; }
  .jb-modal-success { padding: 40px 20px; }
  .jb-modal { border-radius: 18px; }
}

/* Responsive adjustments for E-Commerce Plugins card and Hero buttons on mobile viewports */
@media (max-width: 767.98px) {
  .jb-plugins-card .d-flex.flex-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .jb-plugins-card .d-flex.flex-wrap a.btn {
    width: 100% !important;
    text-align: center;
    margin: 0 !important;
  }
}

@media (max-width: 576px) {
  .jb-hero .d-flex.flex-wrap {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .jb-hero .d-flex.flex-wrap a.btn {
    width: 100% !important;
    text-align: center;
    margin: 0 !important;
  }
  .jb-plugins-card .jb-plugin-logos {
    gap: 16px 24px;
    padding: 12px 0 16px;
  }
  
  /* Global button wrapping and spacing overrides on small screens */
  .btn,
  .jb-btn-primary,
  .jb-btn-outline,
  .jb-btn-soft,
  .jb-btn-light,
  .jb-btn-ghost-light {
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}
