:root {
  --green-950: #063d35;
  --green-900: #075447;
  --green-800: #08705d;
  --green-700: #0b8c72;
  --green-600: #10a987;
  --green-500: #27c39b;
  --mint-200: #bff3e4;
  --mint-100: #e2fbf3;
  --cream: #fffaf0;
  --cream-2: #f8f1e3;
  --white: #ffffff;
  --ink: #14312c;
  --muted: #62736f;
  --border: rgba(8, 112, 93, 0.18);
  --shadow: 0 24px 70px rgba(6, 61, 53, 0.14);
  --shadow-soft: 0 14px 45px rgba(6, 61, 53, 0.1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shell: min(1180px, calc(100% - 40px));
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(39, 195, 155, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(191, 243, 228, 0.45), transparent 28rem),
    var(--cream);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  max-width: 100%;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding-block: clamp(72px, 9vw, 128px);
}

.section-tinted {
  background:
    linear-gradient(135deg, rgba(226, 251, 243, 0.72), rgba(255, 250, 240, 0.92)),
    linear-gradient(180deg, transparent, rgba(8, 112, 93, 0.05));
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: var(--green-900);
  color: var(--white);
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================
   HEADER / NAV
   ========================= */
   
   /* =========================================
   iClinicIntel Logo Replacement
   ========================================= */

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-top: 15px;
}

.brand-image-link {
  min-width: max-content;
}

.brand-image {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Keep nav balanced with the new logo */
.nav {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Hide old logo text styles if still present anywhere */
.brand-mark,
.brand strong,
.brand small {
  display: none;
}

/* Responsive logo sizing */
@media (max-width: 980px) {
  .brand-image {
    height: 48px;
  }

  .nav {
    min-height: 82px;
  }
}

@media (max-width: 640px) {
  .brand-image {
    height: 42px;
  }

  .nav {
    min-height: 76px;
  }
}

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 250, 240, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(6, 61, 53, 0.08);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: var(--white);
  font-weight: 900;
  font-size: 1.5rem;
  box-shadow: 0 14px 30px rgba(8, 112, 93, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1;
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-block-start: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu a,
.rtl-toggle {
  border: 0;
  background: transparent;
  color: var(--green-950);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.rtl-toggle:hover,
.rtl-toggle:focus-visible {
  background: rgba(8, 112, 93, 0.08);
  outline: none;
}

.rtl-toggle {
  color: var(--white);
  background: var(--green-900);
  font-weight: 800;
}

.rtl-toggle:hover {
  background: var(--green-700);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--green-900);
  color: var(--white);
  padding: 10px 14px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
}

/* =========================
   HERO
   ========================= */

.hero {
  padding-block-start: clamp(44px, 7vw, 92px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: clamp(32px, 4.5vw, 70px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-800);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: ;
  font-size: 0.78rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--green-600);
  border-radius: 999px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--green-950);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

h1 {
  margin-block-start: 18px;
  max-width: 8.6ch;
  font-size: clamp(3.1rem, 5.7vw, 6.1rem);
  line-height: 0.96;
}

h2 {
  margin-block-start: 14px;
  font-size: clamp(2.25rem, 4.8vw, 4.7rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

p {
  margin: 0;
  color: var(--muted);
}

.hero-copy p {
  max-width: 38rem;
  margin-block-start: 24px;
  font-size: clamp(1.03rem, 1.35vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-block-start: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding-inline: 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--green-800), var(--green-500));
  box-shadow: 0 18px 42px rgba(8, 112, 93, 0.24);
}

.btn-soft {
  color: var(--green-900);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 28px;
}

.hero-points span,
.stack-pills span,
.future-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-inline: 14px;
  border-radius: 999px;
  color: var(--green-900);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.92rem;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline-start: auto;
}

.care-window {
  position: relative;
  padding: 24px;
  padding-bottom: 62px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 240, 0.88)),
    radial-gradient(circle at top right, rgba(39, 195, 155, 0.22), transparent 18rem);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.care-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(8, 112, 93, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 112, 93, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent);
  pointer-events: none;
}

.window-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 24px;
  color: var(--green-950);
  z-index: 1;
}

.window-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green-500);
}

.window-top span:nth-child(2) {
  background: #ffd166;
}

.window-top span:nth-child(3) {
  background: #ef476f;
}

.window-top strong {
  margin-inline-start: auto;
  font-size: 0.84rem;
  white-space: nowrap;
}

.flow-node {
  position: relative;
  z-index: 1;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
}

.flow-node.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--green-800), var(--green-500));
  border-color: transparent;
}

.flow-node b,
.flow-node p {
  position: relative;
  z-index: 1;
}

.flow-node b {
  display: block;
  line-height: 1.25;
}

.flow-node p {
  margin-block-start: 8px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.flow-node.active p {
  color: rgba(255, 255, 255, 0.86);
}

.flow-line {
  position: relative;
  z-index: 1;
  width: 3px;
  height: 36px;
  margin-inline-start: 28px;
  background: linear-gradient(var(--green-500), transparent);
}

/* Fixed floating chips: no more overlap */
.floating-chip {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--green-900);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  font-size: 0.84rem;
  line-height: 1;
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}

.chip-one {
  inset-block-start: 15%;
  inset-inline-end: -14px;
}

.chip-two {
  inset-block-end: 78px;
  inset-inline-start: -18px;
  animation-delay: 1s;
}

.chip-three {
  inset-block-end: -14px;
  inset-inline-end: 28px;
  animation-delay: 1.8s;
}

/* =========================
   TRUST STRIP
   ========================= */

.trust-strip {
  padding-block: 28px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.trust-grid article {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.trust-grid strong {
  display: block;
  color: var(--green-900);
  font-size: clamp(1.75rem, 3.3vw, 3rem);
  line-height: 1;
}

.trust-grid span {
  color: var(--muted);
  font-weight: 800;
}

/* =========================
   GENERAL SECTIONS
   ========================= */

.section-head {
  max-width: 860px;
  margin-block-end: 42px;
}

.section-head p {
  margin-block-start: 18px;
  font-size: 1.05rem;
}

.customer-grid,
.module-grid,
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.customer-card,
.module-card,
.security-card,
.architecture-card,
.use-case-panel,
.cta-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.customer-card,
.module-card,
.security-card {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.customer-card:hover,
.module-card:hover,
.security-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.customer-card .icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-block-end: 18px;
  border-radius: 18px;
  background: var(--mint-100);
  font-size: 1.6rem;
}

.customer-card p,
.module-card p,
.security-card p {
  margin-block-start: 12px;
}

.module-card span {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  margin-block-end: 18px;
  padding-inline: 10px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-800), var(--green-500));
  font-weight: 900;
}

/* =========================
   PERSONA TABS
   ========================= */

.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-end: 18px;
}

.persona-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
  color: var(--green-900);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 900;
}

.persona-tab.active {
  color: var(--white);
  background: var(--green-900);
}

.use-case-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  align-items: center;
}

.panel-label {
  display: inline-block;
  margin-block-end: 10px;
  color: var(--green-700);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.use-case-panel p {
  margin-block-start: 12px;
  font-size: 1.05rem;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  border-radius: 16px;
  background: var(--mint-100);
  color: var(--green-950);
  font-weight: 800;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 16px;
  color: var(--green-700);
}

/* =========================
   DARK AI / COCKPIT SECTION
   ========================= */

.tech-section {
  background:
    radial-gradient(circle at 20% 20%, rgba(39, 195, 155, 0.18), transparent 28rem),
    var(--green-950);
  color: var(--white);
}

.tech-section h2,
.tech-section h3 {
  color: var(--white);
}

.tech-section p {
  color: rgba(255, 255, 255, 0.72);
  margin-block-start: 18px;
}

.tech-section .eyebrow {
  color: var(--mint-200);
}

.tech-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 28px;
}

.stack-pills span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.architecture-card {
  padding: clamp(22px, 4vw, 36px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.arch-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding-block: 16px;
  border-block-end: 1px solid rgba(255, 255, 255, 0.12);
}

.arch-row:last-child {
  border-block-end: 0;
}

.arch-row b {
  color: var(--mint-200);
}

.arch-row span {
  color: rgba(255, 255, 255, 0.82);
}

/* =========================
   TRUST / SECURITY
   ========================= */

.security-layout .section-head {
  margin-inline: auto;
  text-align: center;
}

.security-layout .eyebrow {
  justify-content: center;
}

.security-layout .eyebrow::before {
  display: none;
}

/* =========================
   TIMELINE
   ========================= */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.timeline article {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
  overflow: hidden;
}

.timeline article::after {
  content: "";
  position: absolute;
  inset-inline-end: -32px;
  inset-block-start: -32px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(39, 195, 155, 0.14);
}

.timeline span {
  display: inline-block;
  margin-block-end: 14px;
  color: var(--green-700);
  font-weight: 900;
}

.timeline p {
  margin-block-start: 10px;
}

/* =========================
   FUTURE / CTA / FOOTER
   ========================= */

.future-section {
  padding-block-start: 84px;
}

.future-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.future-grid span {
  background: var(--white);
}

.cta-section {
  padding-block-start: 24px;
}

.cta-card {
  position: relative;
  padding: clamp(32px, 6vw, 70px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(226, 251, 243, 0.72)),
    var(--white);
}

.cta-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -80px;
  inset-block-end: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(39, 195, 155, 0.22);
}

.cta-card p {
  max-width: 760px;
  margin-block: 18px 28px;
  font-size: 1.08rem;
}

.site-footer {
  padding-block: 56px;
  background: var(--green-950);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 28px;
}

.footer-brand strong,
.footer-grid h3 {
  color: var(--white);
}

.footer-brand small,
.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.68);
}

.footer-grid p {
  max-width: 520px;
  margin-block-start: 18px;
}

.footer-grid a {
  display: block;
  margin-block-start: 8px;
}

.footer-grid a:hover {
  color: var(--mint-200);
}

.back-to-top {
  position: fixed;
  inset-inline-end: 20px;
  inset-block-end: 20px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--green-800);
  color: var(--white);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* =========================
   ANIMATIONS
   ========================= */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.delay-3 {
  transition-delay: 0.24s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* =========================
   RTL SUPPORT
   ========================= */

:dir(rtl) {
  letter-spacing: 0;
}

:dir(rtl) .check-list li {
  padding: 14px 44px 14px 16px;
}

:dir(rtl) .hero-card,
:dir(rtl) .architecture-card {
  direction: rtl;
}

:dir(rtl) .window-top strong {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

/* =========================
   RESPONSIVE FIXES
   ========================= */

@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
    gap: 36px;
  }

  h1 {
    max-width: 8.8ch;
    font-size: clamp(2.8rem, 5.1vw, 5rem);
  }

  .hero-card {
    max-width: 520px;
  }

  .care-window {
    padding: 22px;
    padding-bottom: 60px;
  }

  .flow-node {
    padding: 18px;
  }

  .flow-node p {
    font-size: 0.9rem;
  }

  .chip-one {
    inset-inline-end: -8px;
  }

  .chip-two {
    inset-inline-start: -8px;
    inset-block-end: 78px;
  }

  .chip-three {
    inset-inline-end: 22px;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .tech-grid,
  .use-case-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(2.8rem, 8vw, 4.5rem);
  }

  .hero-card {
    max-width: 100%;
    margin-inline: auto;
  }

  .care-window {
    padding: 24px;
    padding-bottom: 28px;
  }

  .floating-chip {
    display: none;
  }

  .customer-grid,
  .module-grid,
  .security-grid,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: fixed;
    inset: 82px 20px auto 20px;
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.96);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  .section {
    padding-block: 72px;
  }

  .hero {
    padding-block-start: 34px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 13vw, 4rem);
    line-height: 1;
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .customer-grid,
  .module-grid,
  .security-grid,
  .timeline,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .arch-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .window-top strong {
    font-size: 0.74rem;
  }

  .flow-node {
    padding: 16px;
  }
}

/* =========================
   REDUCED MOTION
   ========================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =========================================
   HERO FIX PATCH
   Paste at the end of styles.css
   ========================================= */

.hero {
  padding-block-start: clamp(36px, 5vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
  gap: clamp(40px, 5vw, 88px);
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h1,
.hero h1 {
  max-width: 11ch;
  font-size: clamp(3.4rem, 6.2vw, 6.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: balance;
  margin-block-start: 18px;
}

.hero-copy p {
  max-width: 34rem;
  margin-block-start: 26px;
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  margin-block-start: 30px;
}

.hero-points {
  margin-block-start: 24px;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-inline-start: auto;
}

.care-window {
  padding: 22px;
  padding-bottom: 78px;
  border-radius: 32px;
}

.window-top {
  margin-block-end: 22px;
}

.window-top strong {
  font-size: 0.82rem;
}

.flow-node {
  padding: 18px;
  border-radius: 20px;
}

.flow-node b {
  font-size: 1.02rem;
  line-height: 1.35;
}

.flow-node p {
  margin-block-start: 8px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.flow-line {
  height: 30px;
  margin-inline-start: 24px;
}

/* Better chip positions */
.floating-chip {
  min-height: 38px;
  padding-inline: 13px;
  font-size: 0.82rem;
}

.chip-one {
  inset-block-start: 13%;
  inset-inline-end: -10px;
}

.chip-two {
  inset-block-end: 68px;
  inset-inline-start: -16px;
}

.chip-three {
  inset-block-end: -10px;
  inset-inline-end: 24px;
}

/* Large tablet / small desktop */
@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
    gap: 36px;
  }

  .hero-copy h1,
  .hero h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 5.4vw, 5.4rem);
    line-height: 1.05;
  }

  .hero-card {
    max-width: 470px;
  }

  .chip-two {
    inset-inline-start: -8px;
  }
}

/* Tablet */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-copy h1,
  .hero h1 {
    max-width: 13ch;
    font-size: clamp(2.9rem, 8vw, 4.8rem);
    line-height: 1.06;
  }

  .hero-copy p {
    max-width: 100%;
  }

  .hero-card {
    max-width: 100%;
    margin-inline: auto;
  }

  .care-window {
    padding-bottom: 28px;
  }

  .floating-chip {
    display: none;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .hero {
    padding-block-start: 28px;
  }

  .hero-copy h1,
  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.6rem, 12vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: pretty;
  }

  .hero-copy p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .care-window {
    padding: 18px;
  }

  .flow-node {
    padding: 16px;
  }
}

/* =========================================
   HERO ALIGNMENT PATCH
   Move the right hero card upward
   ========================================= */

.hero-grid {
  align-items: start;
}

.hero-card {
  align-self: start;
  margin-top: 10px;
}

/* keep responsive layout clean */
@media (max-width: 980px) {
  .hero-grid {
    align-items: start;
  }

  .hero-card {
    margin-top: 0;
  }
}

/* =========================================
   iClinicIntel SVG Logo
   ========================================= */

.brand-image-link {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
}

.brand-image {
  display: block;
  width: auto;
  height: 58px;
  object-fit: contain;
}



.nav {
  min-height: 96px;
}

@media (max-width: 980px) {
  .brand-image {
    height: 48px;
  }

  .nav {
    min-height: 84px;
  }
}

@media (max-width: 640px) {
  .brand-image {
    height: 42px;
  }

  .nav {
    min-height: 78px;
  }
}

/* =========================================
   Language switcher
   ========================================= */

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-900);
  color: var(--white);
}

.language-icon {
  font-size: 1rem;
  line-height: 1;
}

.language-select {
  border: 0;
  background: transparent;
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-inline-end: 8px;
}

.language-select option {
  color: var(--green-950);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .language-switcher {
    width: fit-content;
  }
}

.no-scroll {
  overflow: hidden;
}
/* =========================
   GDPR OVERLAY
   ========================= */

.gdpr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 61, 53, 0.85); /* dark green from theme */
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gdpr-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gdpr-modal {
  background: var(--cream);
  padding: clamp(30px, 5vw, 50px);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
}

.gdpr-logo {
  height: 48px;
  margin-block-end: 24px;
}

.gdpr-modal h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-block-end: 16px;
  color: var(--green-950);
}

.gdpr-modal p {
  font-size: 1.05rem;
  margin-block-end: 32px;
  color: var(--ink);
}

.gdpr-modal a {
  color: var(--green-700);
  text-decoration: underline;
  font-weight: 700;
}

.gdpr-modal .btn {
  width: 100%;
}

/* =========================
   HEADER ACTIONS & PULSE BUTTON
   ========================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pulse-btn {
  animation: heartbeat 2s infinite;
  box-shadow: 0 0 0 0 rgba(11, 140, 114, 0.7);
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(11, 140, 114, 0.7);
  }
  15% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(11, 140, 114, 0);
  }
  30% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(11, 140, 114, 0);
  }
  45% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(11, 140, 114, 0);
  }
  60% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(11, 140, 114, 0);
  }
}

@media (max-width: 980px) {
  .header-actions .pulse-btn {
    display: none;
  }
  .mobile-hero-demo-btn {
    display: flex;
    width: 100%;
    margin-bottom: 16px;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

@media (min-width: 981px) {
  .mobile-hero-demo-btn {
    display: none;
  }
}

/* =========================
   AI DEMO CHATBOT
   ========================= */

.chat-container {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
  max-height: 80vh;
}

.chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  text-align: left;
}

[dir="rtl"] .chat-header {
  text-align: right;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-title h2 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--green-950);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mint-100);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.chat-avatar img {
  width: 24px;
  height: 24px;
}

.chat-status {
  font-size: 0.8rem;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-status::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--green-500);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-500);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

[dir="rtl"] .chat-messages {
  text-align: right;
}

.message {
  display: flex;
  max-width: 85%;
}

.ai-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-content {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-message .message-content {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-soft);
}

[dir="rtl"] .ai-message .message-content {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 4px;
}

.user-message .message-content {
  background: var(--green-700);
  color: var(--white);
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-soft);
}

[dir="rtl"] .user-message .message-content {
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 4px;
}

.chat-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.4);
}

.chat-input-area {
  padding: 20px 24px;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.chat-form {
  display: flex;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  background: var(--cream-2);
  transition: all 0.2s ease;
}

.chat-input:focus {
  background: var(--white);
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(39, 195, 155, 0.1);
}

.chat-send-btn {
  border-radius: 999px;
  padding-inline: 24px;
  min-width: 65px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 18px 24px;
  align-items: center;
  width: fit-content;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--green-700);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* --- Footer Bottom --- */
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: var(--color-base-300);
}

.footer-bottom a {
  color: var(--color-primary-400);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--color-primary-300);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-bottom {
    font-size: 0.75rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
    line-height: 1.6;
  }
}


/* --- Radar Dot Animation --- */
.radar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary-400);
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
  box-shadow: 0 0 8px var(--color-primary-400);
}

.radar-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: var(--color-primary-400);
  border-radius: 50%;
  animation: radar-pulse 2s infinite ease-out;
}

@keyframes radar-pulse {
  0% {
    width: 8px;
    height: 8px;
    opacity: 1;
  }
  100% {
    width: 24px;
    height: 24px;
    opacity: 0;
  }
}
