/* =========================================================
   NordicCare Helsehus — Stylesheet
   Design system: Deep Medical Slate Navy + Nordic Teal
   Typography: Source Serif 4 (headings) / IBM Plex Sans (body)
   ========================================================= */

:root {
  --navy: #0F2537;
  --navy-soft: #16324a;
  --teal: #00A896;
  --teal-dark: #00867a;
  --white: #FFFFFF;
  --ice: #F8FAFC;
  --mint: #E8F4F2;
  --line: #D8E2E7;
  --text: #1C2B36;
  --text-muted: #4C616E;

  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 0.6em 0;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em 0; color: var(--text-muted); max-width: 68ch; }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--navy); }

img { max-width: 100%; display: block; }

ul { padding-left: 1.2em; color: var(--text-muted); }
li { margin-bottom: 0.5em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================== Skip link =========================== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: var(--navy);
  padding: 0.75em 1.25em;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* =========================== Header =========================== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  color: var(--navy);
}
.brand strong {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand span {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15em;
}
.brand:hover { color: var(--navy); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--navy);
  font-size: 0.96rem;
  font-weight: 500;
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}

.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 0.62em 1.3em;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius);
  border-bottom: none !important;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--teal-dark); color: var(--white) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.75rem;
    gap: 1.25rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.2rem;
  }
  .nav-links a {
    display: block;
    padding: 0.85em 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* =========================== Hero =========================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  background: var(--ice);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  padding: clamp(2.5rem, 6vw, 5.5rem) 1.75rem;
  max-width: 640px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy .eyebrow {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.9em;
}
.hero-copy h1 { margin-bottom: 0.5em; }
.hero-copy .lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}
.hero-figure {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { margin-left: 0; max-width: none; }
  .hero-figure { min-height: 280px; order: -1; }
}

/* Sub-page hero (department / interior pages) */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2.25rem, 4vw, 3.25rem);
}
.page-hero .eyebrow { color: var(--teal); font-weight: 600; margin-bottom: 0.7em; font-size: 0.95rem; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: #C7D4DC; font-size: 1.08rem; max-width: 62ch; }
.page-hero-figure {
  margin-top: 2.2rem;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 420px;
}
.page-hero-figure img { width: 100%; height: 100%; object-fit: cover; max-height: 420px; }

.breadcrumb {
  font-size: 0.85rem;
  color: #9FB2BC;
  margin-bottom: 1.4rem;
}
.breadcrumb a { color: #C7D4DC; }
.breadcrumb a:hover { color: var(--white); }

/* =========================== Buttons =========================== */
.btn {
  display: inline-block;
  padding: 0.85em 1.7em;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-primary { background: var(--teal); color: var(--navy); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }
.btn-block { width: 100%; text-align: center; }

/* =========================== Sections =========================== */
section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--ice); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: #C7D4DC; }
.section-mint { background: var(--mint); }

.section-head {
  max-width: 60ch;
  margin-bottom: 2.5rem;
}
.section-head .eyebrow {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.6em;
}
.section-navy .section-head .eyebrow { color: var(--teal); }

/* =========================== Cards / grids =========================== */
.grid {
  display: grid;
  gap: 1.75rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 940px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.dept-card {
  border: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.dept-card:hover { border-color: var(--teal); transform: translateY(-3px); }
.dept-card-figure { aspect-ratio: 4/3; overflow: hidden; }
.dept-card-figure img { width: 100%; height: 100%; object-fit: cover; }
.dept-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.dept-card-body .dept-label { font-size: 0.78rem; color: var(--teal-dark); font-weight: 600; margin-bottom: 0.5em; }
.dept-card-body h3 { margin-bottom: 0.5em; }
.dept-card-body p { font-size: 0.94rem; margin-bottom: 1.1em; }
.dept-card-link { margin-top: auto; font-weight: 600; font-size: 0.92rem; }

.info-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.8rem;
}
.info-card h3 { margin-bottom: 0.55em; }
.info-card p { font-size: 0.95rem; margin-bottom: 0; }

.divider-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.divider-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
  margin: 0;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.9rem;
  color: var(--text);
}
.divider-list .num { font-family: var(--font-head); color: var(--teal-dark); font-weight: 600; }

/* Pathway / process steps */
.pathway {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pathway li {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.6rem 1.5rem;
  margin: 0;
}
.pathway .step-index {
  font-family: var(--font-head);
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.5em;
}
.pathway h4 { margin-bottom: 0.4em; }
.pathway p { font-size: 0.9rem; margin: 0; }
@media (max-width: 780px) {
  .pathway { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .pathway { grid-template-columns: 1fr; }
}

/* Two-column content + image */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-reverse .split-figure { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split-reverse .split-figure { order: -1; }
}
.split-figure { border-radius: var(--radius); overflow: hidden; }
.split-figure img { width: 100%; height: 100%; object-fit: cover; }

/* Content blocks used inside department pages */
.content-block { margin-bottom: 2.75rem; }
.content-block:last-child { margin-bottom: 0; }
.two-col-list {
  columns: 2;
  column-gap: 2.5rem;
}
.two-col-list li { break-inside: avoid; }
@media (max-width: 620px) { .two-col-list { columns: 1; } }

/* =========================== Forms =========================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem 1.5rem;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4em;
}
.field .required { color: var(--teal-dark); }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.75em 0.9em;
  font-family: var(--font-body);
  font-size: 0.96rem;
  border-radius: var(--radius);
  color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .error-msg {
  color: #B3261E;
  font-size: 0.82rem;
  margin-top: 0.35em;
  display: none;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #B3261E; }
.field.has-error .error-msg { display: block; }

.form-note {
  border: 1px solid var(--line);
  background: var(--ice);
  padding: 1.1rem 1.3rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}
.form-status {
  margin-top: 1.5rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--teal);
  background: var(--mint);
  color: var(--navy);
  font-size: 0.94rem;
  display: none;
}
.form-status.is-visible { display: block; }

/* =========================== Contact cards =========================== */
.contact-strip {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.6rem;
}
.contact-strip h3 { margin-bottom: 0.7em; }
.contact-strip dl { margin: 0; }
.contact-strip dt { font-size: 0.78rem; text-transform: none; color: var(--text-muted); margin-top: 0.9em; }
.contact-strip dt:first-child { margin-top: 0; }
.contact-strip dd { margin: 0.15em 0 0 0; font-weight: 600; color: var(--navy); }
.contact-strip dd a { color: var(--navy); }
.contact-strip dd a:hover { color: var(--teal-dark); }

/* =========================== FAQ =========================== */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.3rem 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  position: relative;
}
.faq-item summary .plus::before,
.faq-item summary .plus::after {
  content: "";
  position: absolute;
  background: var(--navy);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-item summary .plus::before { width: 10px; height: 1.5px; }
.faq-item summary .plus::after { width: 1.5px; height: 10px; }
.faq-item[open] summary .plus::after { display: none; }
.faq-item .faq-answer { padding: 0 0 1.5rem 0; }
.faq-item .faq-answer p { margin: 0; }

/* =========================== CTA band =========================== */
.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.3em; }
.cta-band p { color: #C7D4DC; margin-bottom: 0; }
.cta-band-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* =========================== Footer =========================== */
.site-footer {
  background: var(--navy);
  color: #C7D4DC;
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand strong {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 1.2rem;
  display: block;
  margin-bottom: 0.5em;
}
.footer-brand p { color: #9FB2BC; font-size: 0.92rem; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 1em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.65em; }
.footer-col a { color: #C7D4DC; font-size: 0.93rem; }
.footer-col a:hover { color: var(--teal); }
.footer-col address { font-style: normal; color: #C7D4DC; font-size: 0.93rem; line-height: 1.7; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: #8399A5;
}
.footer-bottom ul { display: flex; gap: 1.3rem; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: #8399A5; }
.footer-bottom a:hover { color: var(--teal); }

/* =========================== Utility =========================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.eyebrow { font-weight: 600; font-size: 0.92rem; color: var(--teal-dark); }
.fade-in { animation: fadeIn 0.6s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.related-depts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 780px) { .related-depts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .related-depts { grid-template-columns: 1fr; } }
.related-dept-link {
  display: block;
  border: 1px solid var(--line);
  padding: 1.2rem 1.4rem;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}
.related-dept-link:hover { border-color: var(--teal); color: var(--teal-dark); }

.legal-content h2 { margin-top: 2.2em; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-muted); }
.legal-content { max-width: 74ch; }
