/* Base Styles */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Dark theme colors */
  --color-bg: #141529; /* Background */
  --color-fg: #ffffff; /* Text */
  --color-primary: #783293; /* Accent Purple */
  --color-primary-hover: #9c45ea;
  --color-secondary: #262840; /* Muted Dark */
  --color-muted: #a0a0a8; /* Subtext */
  --color-border: #262840;
  --color-card: #141529;
  --color-success: #22c55e;
  --purple-100: #f3e8ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-600: #9333ea;
}

/* ===== Mobile + overflow hardening (GLOBAL) ===== */
html {
  width: 100%;
  /* Prevent horizontal page scroll without creating a scroll container */
  overflow-x: clip;
  /* Reduce sideways rubber-banding on mobile */
  overscroll-behavior-x: none;
  /* Avoid iOS text-size zoom weirdness */
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

/* Fallback for browsers that don’t support overflow-x: clip */
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

/* Make sure media can’t overflow their containers */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Prevent long strings/URLs from forcing horizontal scroll */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0; /* critical for flex/grid children to avoid overflow */
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.text-primary { color: var(--color-primary); }
.text-primary-light { color: var(--purple-300); }
.text-success { color: var(--color-success); }
.text-muted { color: var(--color-muted); }
.font-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }

/* Layout & Grid */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .section { padding: 6rem 0; }
  .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .section { padding: 8rem 0; }
  .grid-cols-lg-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-lg-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-cols-lg-5 { grid-template-columns: repeat(5, 1fr); }
  .col-span-2 { grid-column: span 2 / span 2; }
  .col-span-3 { grid-column: span 3 / span 3; }
}

/* Flexbox Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(20, 21, 41, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  height: auto;
  display: flex;
  align-items: center;

  /* iOS safe area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  background-color: rgba(181, 102, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}
.logo-icon svg { width: 1.25rem; height: 1.25rem; }

.navbar-logo {
  flex: 0 0 auto;
}

.navbar-logo img {
  height: 70px !important;
  width: auto !important;
  max-width: 100%;
  display: block;
  padding: 10px 0;
}

.btn-nav {
  padding: 0.5rem 1rem;
  background-color: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  color: var(--color-fg);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 0;
}
.btn-nav:hover {
  background-color: rgba(38, 40, 64, 0.8);
}

/* Hero Components */
.hero {
  position: relative;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(181, 102, 255, 0.1);
  color: var(--purple-300);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(181, 102, 255, 0.2);
  margin-bottom: 1.5rem;

  /* prevent long badge text from forcing overflow */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge svg { width: 0.875rem; height: 0.875rem; flex: 0 0 auto; }

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.5rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 4rem; } }

.hero p {
  font-size: 1.25rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
  overflow-wrap: anywhere;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--color-muted);
  min-width: 0;
}
.check-item svg {
  width: 1rem;
  height: 1rem;
  color: var(--color-success);
  flex: 0 0 auto;
}

/* Dashboard Widget / Uptime */
.dashboard-widget {
  margin-bottom: 2.5rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(181, 102, 255, 0.2);
  background-color: rgba(20, 21, 41, 0.5);
  backdrop-filter: blur(4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}
.uptime-bar-container {
  display: flex;
  align-items: flex-end;
  gap: 0.375rem;
  min-width: 0;
}
.uptime-bar {
  width: 0.5rem;
  border-top-left-radius: 0.125rem;
  border-top-right-radius: 0.125rem;
  background-color: rgba(34, 197, 94, 0.8);
  min-height: 32px;
  flex: 0 0 auto;
}

/* Forms & Cards */
.card {
  background-color: var(--color-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  min-width: 0;
}

.card:has(.hsfc-PostSubmit) #form-header {
  display: none !important;
}

.card:has(.hsfc-PostSubmit) .medsender-form {
  margin-top: 0 !important;
}

.medsender-form .hsfc-PostSubmit span {
  color: var(--color-fg) !important;
}

/* Force link color specifically */
.medsender-form .hsfc-PostSubmit a,
.medsender-form .hsfc-PostSubmit a span {
  color: var(--color-primary) !important;
  text-decoration: underline;
}

.hsfc-Step__Content {
  background: #141529;
}
.hsfc-FieldLabel {
  color: #ffffff;
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  background-color: rgba(38, 40, 64, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  color: var(--color-fg);
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s;
  min-width: 0;
}
.form-control:focus {
  outline: none;
  border-color: rgba(181, 102, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(181, 102, 255, 0.25);
  background-color: rgba(38, 40, 64, 0.8);
}

.btn-primary {
  width: 100%;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s, transform 0.1s;
  font-family: inherit;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
}
.btn-primary:active {
  transform: translateY(1px);
}

.success-message {
  display: none;
  background-color: rgba(181, 102, 255, 0.1);
  border: 1px solid rgba(181, 102, 255, 0.2);
  border-radius: 0.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
}
.success-message svg {
  width: 3rem;
  height: 3rem;
  color: var(--color-primary);
  margin: 0 auto 1rem;
}

/* --- HubSpot Developer Embed (scoped) --- */
.medsender-form .hs-form,
.medsender-form form {
  width: 100%;
}

.medsender-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-fg) !important;
}

.medsender-form input[type="text"],
.medsender-form input[type="email"],
.medsender-form input[type="tel"],
.medsender-form input[type="number"],
.medsender-form input[type="url"],
.medsender-form select,
.medsender-form textarea {
  width: 100%;
  background-color: rgba(38, 40, 64, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  color: var(--color-fg);
  font-size: 0.875rem;
  font-family: inherit;
}

.medsender-form input:focus,
.medsender-form select:focus,
.medsender-form textarea:focus {
  outline: none;
  border-color: rgba(181, 102, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(181, 102, 255, 0.25);
  background-color: rgba(38, 40, 64, 0.8);
}

.medsender-form input[type="submit"],
.medsender-form button[type="submit"] {
  width: 100%;
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.medsender-form input[type="submit"]:hover,
.medsender-form button[type="submit"]:hover {
  background-color: var(--color-primary-hover);
}

.medsender-form [data-hsfc-id="Renderer"] {
  --hsf-background__padding: 0px;
}

.medsender-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.medsender-form [data-hsfc-id="Renderer"] .hsfc-NavigationRow {
  margin-top: 0 !important;
}

/* ========================= */
/* HubSpot Form Styling */
/* ========================= */

.hs-form {
  width: 100%;
}

.hs-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem 0;
}

.hs-form .hs-form-field {
  margin-bottom: 1rem;
}

.hs-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-fg);
}

.hs-form input,
.hs-form textarea,
.hs-form select {
  width: 100%;
  background-color: rgba(38, 40, 64, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  padding: 0.625rem 0.75rem;
  color: var(--color-fg);
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s;
  min-width: 0;
}

.hs-form input:focus,
.hs-form textarea:focus,
.hs-form select:focus {
  outline: none;
  border-color: rgba(181, 102, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(181, 102, 255, 0.25);
  background-color: rgba(38, 40, 64, 0.8);
}

/* Submit Button */
.hs-form .hs-button {
  width: 100%;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.hs-form .hs-button:hover {
  background-color: var(--color-primary-hover);
}

.hs-form .hs-button:active {
  transform: translateY(1px);
}

/* Error messages */
.hs-form .hs-error-msg {
  color: #f87171;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Two-column fields on desktop */
@media (min-width: 768px) {
  .hs-form .hs-form-field.hs_firstname,
  .hs-form .hs-form-field.hs_lastname {
    width: 48%;
    display: inline-block;
    vertical-align: top;
  }

  .hs-form .hs-form-field.hs_lastname {
    margin-left: 4%;
  }
}

/* ========================= */
/* HubSpot Form Styling (Stronger + Scoped) */
/* Applies ONLY to the form inside your card */
/* ========================= */

.card #hs-form-wrap,
.card #hs-form-wrap * {
  box-sizing: border-box;
}

/* Reset HubSpot default margins/padding that can throw off spacing */
.card #hs-form-wrap .hs-form fieldset,
.card #hs-form-wrap .hs-form .hs-form-field,
.card #hs-form-wrap .hs-form .hs-form-field > label,
.card #hs-form-wrap .hs-form .input {
  margin: 0;
  padding: 0;
}

/* Field spacing */
.card #hs-form-wrap .hs-form .hs-form-field {
  margin-bottom: 1rem;
}

/* Labels */
.card #hs-form-wrap .hs-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-fg);
}

/* Inputs/selects/textarea */
.card #hs-form-wrap .hs-form input[type="text"],
.card #hs-form-wrap .hs-form input[type="email"],
.card #hs-form-wrap .hs-form input[type="tel"],
.card #hs-form-wrap .hs-form input[type="number"],
.card #hs-form-wrap .hs-form input[type="url"],
.card #hs-form-wrap .hs-form select,
.card #hs-form-wrap .hs-form textarea {
  width: 100% !important;
  background-color: rgba(38, 40, 64, 0.5) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 0.375rem !important;
  padding: 0.625rem 0.75rem !important;
  color: var(--color-fg) !important;
  font-size: 0.875rem !important;
  font-family: inherit !important;
  line-height: 1.2 !important;
  transition: all 0.2s;
  min-width: 0 !important;
}

/* Focus */
.card #hs-form-wrap .hs-form input:focus,
.card #hs-form-wrap .hs-form select:focus,
.card #hs-form-wrap .hs-form textarea:focus {
  outline: none !important;
  border-color: rgba(181, 102, 255, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(181, 102, 255, 0.25) !important;
  background-color: rgba(38, 40, 64, 0.8) !important;
}

/* Fix HubSpot weird wrapper widths */
.card #hs-form-wrap .hs-form .input,
.card #hs-form-wrap .hs-form .input > * {
  width: 100% !important;
}

/* Submit area */
.card #hs-form-wrap .hs-form .hs_submit {
  margin-top: 1.25rem;
}

/* Submit button */
.card #hs-form-wrap .hs-form input.hs-button,
.card #hs-form-wrap .hs-form .hs-button {
  width: 100% !important;
  background-color: var(--color-primary) !important;
  color: #fff !important;
  padding: 0.75rem !important;
  border-radius: 0.375rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s, transform 0.1s;
  font-family: inherit !important;
}

.card #hs-form-wrap .hs-form input.hs-button:hover,
.card #hs-form-wrap .hs-form .hs-button:hover {
  background-color: var(--color-primary-hover) !important;
}

.card #hs-form-wrap .hs-form input.hs-button:active,
.card #hs-form-wrap .hs-form .hs-button:active {
  transform: translateY(1px);
}

/* Error messages */
.card #hs-form-wrap .hs-form .hs-error-msgs,
.card #hs-form-wrap .hs-form .hs-error-msg {
  color: #f87171 !important;
  font-size: 0.75rem !important;
  margin-top: 0.25rem !important;
}

/* Help text */
.card #hs-form-wrap .hs-form .hs-richtext,
.card #hs-form-wrap .hs-form .hs-richtext p {
  color: var(--color-muted) !important;
  font-size: 0.75rem !important;
  margin-top: 0.75rem !important;
  text-align: center;
}

/* Two-column first/last name (HubSpot uses special classes on the field wrappers) */
@media (min-width: 768px) {
  .card #hs-form-wrap .hs-form .hs_firstname,
  .card #hs-form-wrap .hs-form .hs_lastname {
    width: calc(50% - 0.5rem) !important;
    display: inline-block !important;
    vertical-align: top;
  }

  .card #hs-form-wrap .hs-form .hs_lastname {
    margin-left: 1rem !important;
  }
}

/* Mobile spacing + prevent cramped fields */
@media (max-width: 767px) {
  .card #hs-form-wrap .hs-form .hs-form-field {
    margin-bottom: 0.875rem;
  }
}

/* Background Variations */
.section-bg {
  background-color: rgba(38, 40, 64, 0.3);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);

  /* iOS safe-area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Feature Cards */
.feature-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-card);
  transition: border-color 0.2s;
  min-width: 0;
}
.feature-card:hover {
  border-color: rgba(181, 102, 255, 0.5);
}
.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background-color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-fg);
  transition: color 0.2s;
  flex: 0 0 auto;
}
.feature-card:hover .feature-icon {
  color: var(--color-primary);
}
.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}
.feature-card p {
  color: var(--color-muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* Tab System */
/* ============================================
   TABS + COMPARISON TABLE (COPY/PASTE)
   ============================================ */

/* Utility you are using in HTML but haven't defined */
.text-left { text-align: left; }

/* Tabs */
.tab-container {
  display: flex;              /* change from inline-flex */
  align-items: center;
  justify-content: center;    /* centers buttons inside */
  padding: 0.25rem;
  background-color: rgba(38, 40, 64, 0.5);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto 2rem;

  width: fit-content;         /* shrink to content width */
  max-width: 100%;
  gap: 0.25rem;
}

.tab-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--color-muted);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.tab-btn:hover:not(.active-tab) {
  color: var(--color-fg);
}

.tab-btn.active-tab {
  background-color: var(--color-bg);
  border-color: rgba(181, 102, 255, 0.3);
  color: var(--purple-300);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

/* Wrapper card */
.tab-content-wrapper {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  min-width: 0;

  /* IMPORTANT: don't let a parent centering rule wreck the table */
  text-align: left;
}

@media (min-width: 768px) {
  .tab-content-wrapper { padding: 2.5rem; }
}

/* ===== Table layout ===== */

/* Header: hidden on mobile */
.table-header {
  display: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0 0 1rem;
  margin: 0 0 0.5rem;
  text-align: left;
}

/* Rows: stacked on mobile */
.table-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  min-width: 0;
  text-align: left;
}

/* This is your "Feature" label per row */
.mobile-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-300);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Desktop: real 3-column table */
@media (min-width: 768px) {
  .table-header {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 1.4fr; /* Feature | Generic | Medsender */
    gap: 1.5rem;
    align-items: center;
  }

  .table-row {
    grid-template-columns: 1.1fr 1.4fr 1.4fr;
    gap: 1.5rem;
    align-items: center;
  }

  /* On desktop the feature label becomes normal text (not an uppercase label) */
  .mobile-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-fg);
    text-transform: none;
    letter-spacing: normal;
  }
}

/* Optional: make the Medsender column pop without needing inline styles */
.table-row > div:last-child {
  font-weight: 600;
}

/* Optional: slightly soften the middle column text if you forget the class */
.table-row > div:nth-child(2) {
  color: var(--color-muted);
}

/* Steps / Migration */
.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background-color: rgba(38, 40, 64, 0.3);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 0;
}
.step-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: rgba(181, 102, 255, 0.2);
  color: var(--purple-300);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  flex: 0 0 auto;
}

/* Testimonial */
.testimonial {
  background-color: rgba(181, 102, 255, 0.05);
  border: 1px solid rgba(181, 102, 255, 0.2);
  padding: 2rem;
  border-radius: 1.5rem;
  text-align: center;
  position: relative;
  min-width: 0;
}
@media (min-width: 768px) {
  .testimonial { padding: 3rem; }
}
.testimonial-quote {
  font-size: 3.75rem;
  color: var(--purple-300);
  font-family: serif;
  line-height: 1;
  height: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Code Display */
.code-container {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #0d1117;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  min-width: 0;
}
.code-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #161b22;
  min-width: 0;
}
.mac-dots {
  display: flex;
  gap: 0.375rem;
  flex: 0 0 auto;
}
.mac-dots div {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}
.mac-dots .red { background-color: #ef4444; }
.mac-dots .yellow { background-color: #eab308; }
.mac-dots .green { background-color: #22c55e; }


.code-content {
  padding: 1.5rem;
  overflow-x: hidden;              /* no horizontal scroll */
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: #d1d5db;
  line-height: 1.7;
}

/* THIS is the key for wrapping inside a pre/code block */
.code-content pre,
.code-content code {
  white-space: pre-wrap;           /* keeps line breaks BUT allows wrap */
  word-break: break-word;          /* fallback */
  overflow-wrap: break-word;       /* better than "anywhere" */
  margin: 0;
}

/* Image Display */
.img-wrapper {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background-color: var(--color-card);
  padding: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.aspect-3-4 { aspect-ratio: 3 / 4; }
.aspect-square { aspect-ratio: 1 / 1; }

.img-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(20, 21, 41, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--color-border);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;

  max-width: calc(100% - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scanned-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  mix-blend-mode: screen;
}
.scanned-fax {
  filter: contrast(1.2) grayscale(1);
  opacity: 0.8;
}
.scanned-lock {
  opacity: 0.9;
}

/* ============================================
   PARTNERS BANNER (DARK) + LOGO GRID
   ============================================ */

.partners-banner {
  background-color: rgba(38, 40, 64, 0.2);
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);

  /* iOS safe-area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.partners-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1.5rem;
  text-align: center;
}

/* Flex-wrap logo grid */
.partners-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  /* Responsive spacing */
  gap: 1rem 1.5rem;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;

  /* prevents weird overflow from long images */
  overflow: hidden;
}

/* White-on-dark logo treatment */
.partner-logo-img {
  height: 36px;          /* mobile-first */
  width: auto;
  max-width: min(220px, 70vw); /* protects very small screens */
  object-fit: contain;
  display: block;

  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.partner-logo-img:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Tablet */
@media (min-width: 640px) {
  .partners-logos {
    gap: 1.25rem 2rem;
  }
  .partner-logo-img {
    height: 40px;
    max-width: 220px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .partners-banner {
    padding: 3rem 0;
  }
  .partners-logos {
    gap: 1.25rem 2.25rem;
  }
  .partner-logo-img {
    height: 44px;
  }
}

.cert-badge {
  height: 6rem;
  object-fit: contain;
  transition: opacity 0.2s;
  max-width: 100%;
}
@media (min-width: 768px) {
  .cert-badge { height: 8rem; }
}

/* CTA Section */
.cta-section {
  background-color: rgba(181, 102, 255, 0.05);
  border-top: 1px solid var(--color-border);
  text-align: center;

  /* iOS safe-area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.btn-large {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(181, 102, 255, 0.3);
  transition: all 0.2s;
  font-family: inherit;
  min-width: 0;
}
.btn-large:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(181, 102, 255, 0.4);
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  text-align: center;

  /* iOS safe-area support */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap; /* prevent overflow */
}
.footer-links a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-links a:hover {
  color: var(--color-fg);
}

/* ===== Mobile-specific improvements ===== */
@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  /* Prevent oversized logo from pushing layout */
  .navbar-logo img {
    height: 56px !important;
    max-height: 56px;
  }

  /* Make dashboard widget wrap cleanly */
  .dashboard-widget {
    flex-direction: column;
    align-items: flex-start;
  }
  .uptime-bar-container {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* More resilient typography scaling */
  .hero h1 {
    font-size: clamp(2rem, 6.5vw, 2.75rem);
  }

  .hero p {
    font-size: 1.05rem;
  }

  /* Reduce heavy padding that can create “tight” mobile layouts */
  .card {
    padding: 1.25rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .tab-content-wrapper {
    padding: 1.25rem;
  }

  /* Code blocks: keep scroll inside the block, not the page */
  .code-content {
    padding: 1rem;
    max-width: 100%;
  }

  /* Better touch targets */
  .btn-primary, .btn-large, .btn-nav {
    min-height: 44px;
  }

/* ===== Mobile-specific improvements ===== */
@media (max-width: 767px) {
  .container { padding: 0 1rem; }
  .section { padding: 3.5rem 0; }

  .navbar-logo img {
    height: 56px !important;
    max-height: 56px;
  }

  .dashboard-widget {
    flex-direction: column;
    align-items: flex-start;
  }
  .uptime-bar-container {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero h1 { font-size: clamp(2rem, 6.5vw, 2.75rem); }
  .hero p { font-size: 1.05rem; }

  .card { padding: 1.25rem; }
  .feature-card { padding: 1.25rem; }
  .tab-content-wrapper { padding: 1.25rem; }

  .code-content {
    padding: 1rem;
    max-width: 100%;
  }

  .btn-primary, .btn-large, .btn-nav { min-height: 44px; }

  /* Images: avoid super tall containers on small screens */
  .aspect-3-4 { aspect-ratio: 4 / 5; }
} 
  
/* =========================================================
   Code block: prevent clipping + preserve scroll
   (paste at very end of file)
========================================================= */

.code-container{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* IMPORTANT: remove wrapping behavior so code doesn't "chop" */
.code-content{
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;

  /* override your current wrapping rules */
  overflow-wrap: normal;
  word-break: normal;
}

/* Force horizontal scroll to work reliably */
.code-content pre{
  margin: 0;
  white-space: pre;
  display: inline-block;
  min-width: max-content;
}

@media (max-width: 767px) {
  /* Keep your stacked mobile card rows */
  .tab-content-wrapper .table-header { display: none; }

  .tab-content-wrapper .table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }

  /* Feature label (PRIMARY USE CASE) – give it space */
  .tab-content-wrapper .mobile-label {
    margin-bottom: 0.25rem;
  }

  /* Generic + Medsender blocks: normal flow labels */
  .tab-content-wrapper .table-row > div:nth-child(2),
  .tab-content-wrapper .table-row > div:nth-child(3) {
    padding: 0;               /* remove the “padding-top for absolute label” approach */
  }

  /* Generic label above text */
  .tab-content-wrapper .table-row > div:nth-child(2)::before {
    content: "Generic Fax APIs";
    display: block;
    margin: 0.25rem 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
  }

  /* Medsender block becomes a real card */
  .tab-content-wrapper .table-row > div:nth-child(3) {
    margin-top: 0.5rem;
  }

  /* Medsender label INSIDE the card */
  .tab-content-wrapper .table-row > div:nth-child(3)::before {
    content: "Medsender";
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
  }

  /* If you want tab-specific Medsender labels */
  #tab-content-fax .table-row > div:nth-child(3)::before { content: "Medsender Fax API"; }
  #tab-content-ai  .table-row > div:nth-child(3)::before { content: "Medsender AI Document Intelligence"; }
}