/* NexorAI Health — styles */
:root {
  /* NexorAI Health brand: navy + green + blue accent (see brand/brand-guidelines.md) */
  --brand: #0a2a66;        /* navy — primary */
  --brand-dark: #08214f;   /* deep navy — hover/footer */
  --brand-light: #1e63d8;  /* bright blue — accent/links */
  --green: #1e7a34;        /* medical green — secondary */
  --green-dark: #155c27;
  --accent: #1e7a34;       /* green as the CTA accent */
  --ink: #16232a;
  --muted: #5c6b73;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-soft: #f3f6fc;      /* cool light-blue surface */
  --bg-deep: #08214f;      /* navy footer */
  --radius: 12px;
  --shadow: 0 6px 24px rgba(10, 42, 102, 0.12);
  --maxw: 1140px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 78px; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;         /* safety net against any horizontal bleed on mobile */
}

/* Media never forces the layout wider than the screen */
img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 0.5em; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: var(--brand-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

section { padding: 72px 0; }
section.soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--green-dark); }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
}
.brand .logo-mark svg { width: 38px; height: 38px; display: block; }
.brand small { display: block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; color: var(--brand); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 0.92rem; padding: 8px 10px; border-radius: 8px; }
.nav-links a:hover { background: var(--bg-soft); text-decoration: none; color: var(--brand); }
.nav-cta { margin-left: 6px; }
/* Keep the nav CTA button's label white (override the generic nav link color,
   which is more specific than .btn-primary and would otherwise darken it). */
.nav-links .nav-cta a.btn-primary { color: #fff; padding: 12px 24px; }
.nav-links .nav-cta a.btn-primary:hover { color: #fff; background: var(--brand-dark); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.2s; }

/* Hero */
.hero {
  background: radial-gradient(1100px 460px at 82% -12%, rgba(30,122,52,0.14), transparent),
              radial-gradient(900px 420px at 8% -8%, rgba(10,42,102,0.10), transparent),
              linear-gradient(180deg, #f3f6fc, #ffffff);
  padding: 84px 0 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
/* Grid items default to min-width:auto and can overflow their track on narrow
   screens; allow them to shrink so nothing bleeds past the viewport. */
.hero-grid > *, .grid > *, .contact-grid > *, .steps > *, .footer-grid > * { min-width: 0; }
.hero h1 span { color: var(--green); }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow);
}
.hero-card h3 { color: var(--brand-dark); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.stat { background: var(--bg-soft); border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 1.3rem; color: var(--brand); overflow-wrap: anywhere; }
.stat span { font-size: 0.82rem; color: var(--muted); }

/* Cards grid */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(10,42,102,0.35); }
.card .ico {
  width: 46px; height: 46px; border-radius: 10px; margin-bottom: 14px;
  background: rgba(30,122,52,0.12); color: var(--green);
  display: grid; place-items: center; font-size: 1.4rem;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; }

/* Chips / tag lists */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 0.88rem; color: var(--ink); font-weight: 500;
}
.chips.on-soft li { background: var(--bg-soft); }

/* Process steps */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px;
}
.step h4 { margin: 0 0 6px; }
.step p { margin: 0; font-size: 0.9rem; }

/* Feature list with check */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: var(--ink); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 800;
}

/* Training cards */
.training-card { display: flex; flex-direction: column; }
.training-card ul { margin: 10px 0 18px; }
.training-card .btn { align-self: flex-start; margin-top: auto; }

/* Banner / CTA */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff; border-radius: 18px; padding: 46px; text-align: center;
}
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner p { opacity: 0.9; max-width: 620px; margin: 0 auto 22px; }

/* About values */
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.value b { color: var(--brand-dark); display: block; margin-bottom: 4px; }
.value p { font-size: 0.9rem; margin: 0; }
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 34px; }

/* Resources */
.res-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.res-col h3 { font-size: 1.05rem; color: var(--brand-dark); }
.res-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res-col a { font-size: 0.92rem; color: var(--muted); }
.res-col a:hover { color: var(--brand); }

/* Contact / form */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; color: var(--ink); background: #fff; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(30,99,216,0.18);
}
/* Invalid field highlight (set by JS on failed validation) */
.field.field-error input, .field.field-error select, .field.field-error textarea,
.field input[aria-invalid="true"] {
  border-color: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,0.15);
}
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 9px; font-size: 0.9rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f6ec; color: #1c6b3a; border: 1px solid #b7e0c4; }
.form-status.err { background: #fdeaea; color: #a12626; border: 1px solid #f2c2c2; }

.contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; }
.contact-list li { padding-left: 4px; }
.contact-list b { display: block; color: var(--ink); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
details.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
details.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; font-weight: 400; }
details.faq-item[open] summary::after { content: "–"; }
details.faq-item p { padding-bottom: 18px; margin: 0; }

/* Footer */
.site-footer { background: var(--bg-deep); color: #cdd9dc; padding: 56px 0 28px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; margin-bottom: 34px; }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #9fb2b6; max-width: 340px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: #cdd9dc; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; font-size: 0.82rem; color: #8ba0a4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}
.wa-float[hidden] { display: none; }
.wa-float:hover { text-decoration: none; transform: scale(1.05); }
.wa-float svg { display: block; }

/* Current page in the nav */
.nav-links a[aria-current="page"] { color: var(--brand); font-weight: 700; }

/* Compact chips (inside cards) */
.chips-sm li { padding: 5px 12px; font-size: 0.8rem; }
.card .chips { margin-top: 14px; }

/* Numbered flow list (job application steps) */
.flow { counter-reset: flow; list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.flow li { counter-increment: flow; position: relative; padding-left: 48px; min-height: 34px; }
.flow li::before {
  content: counter(flow); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-weight: 700;
}
.flow b { display: block; color: var(--ink); }
.flow span { font-size: 0.9rem; color: var(--muted); }

/* Student result cards (training page) */
.result-card { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.result-card a { display: block; background: var(--bg-soft); }
.result-card img { display: block; width: 100%; height: auto; }
.result-card figcaption { padding: 16px 18px; }
.result-card figcaption b { display: block; color: var(--ink); }
.result-card figcaption span { font-size: 0.88rem; color: var(--muted); }

/* Smaller hero for inner pages */
.hero-sm { padding: 64px 0 48px; }
.hero-sm .lead { max-width: 720px; }

/* Job portal */
.job-filters {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 14px; align-items: end;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow);
}
.job-filters[hidden] { display: none; }
.job-filters > * { min-width: 0; }
.job-filters .field { margin: 0; }
.job-count { margin: 22px 0 14px; font-size: 0.9rem; }
.job-list { display: grid; gap: 18px; }
.job-card:hover { transform: none; }
.job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-top h3 { margin-bottom: 6px; }
.badge {
  flex-shrink: 0; display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.badge-sample { background: #fff4d6; color: #8a5a00; border: 1px solid #f1dc9f; }
.job-meta { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.88rem; color: var(--muted); }
.job-meta li:first-child { color: var(--green); font-weight: 600; }
.job-details { margin-top: 14px; }
.job-details summary { cursor: pointer; color: var(--brand-light); font-weight: 600; font-size: 0.92rem; }
.job-details h4 { margin: 16px 0 8px; font-size: 0.95rem; }
.job-details .checklist li { font-size: 0.92rem; }
.job-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.job-posted { font-size: 0.82rem; color: var(--muted); }
.job-empty { text-align: center; padding: 30px 10px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .contact-grid, .mission-grid { grid-template-columns: 1fr; }
  .grid-4, .grid-3, .grid-2, .res-cols { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .job-filters { grid-template-columns: 1fr 1fr; }
  .job-filters .field:first-child { grid-column: 1 / -1; }
  .values { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px; gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2, .res-cols, .steps, .values, .field-row, .job-filters { grid-template-columns: 1fr; }
  .job-top { flex-direction: column; gap: 4px; }
  .job-actions .btn { width: 100%; text-align: center; }
  section { padding: 52px 0; }
  .hero { padding: 56px 0 44px; }
  .cta-banner { padding: 32px 22px; }
  /* Full-width, comfortably tappable CTAs on phones */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .form-card { padding: 22px; }
  /* Keep the WhatsApp float clear of thumbs and the form submit button */
  .wa-float { bottom: 16px; right: 16px; }
  .footer-bottom { flex-direction: column; }
}

/* In the collapsed mobile menu, the CTA reads as a full-width button */
@media (max-width: 900px) {
  .nav-links .nav-cta { margin-left: 0; margin-top: 4px; }
  .nav-links .nav-cta a.btn-primary { display: block; text-align: center; }
}
