:root {
  --navy: #0b3768;
  --blue: #0d5f9f;
  --green: #087246;
  --gold: #f0c53d;
  --red: #c74345;
  --ink: #10233d;
  --muted: #627185;
  --line: #d9e1ea;
  --soft: #f5f8fb;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(16, 35, 61, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body.lang-en .no,
body.lang-en .ar,
body.lang-no .en,
body.lang-no .ar,
body.lang-ar .en,
body.lang-ar .no {
  display: none !important;
}

body.lang-ar {
  font-family: Tahoma, Arial, sans-serif;
  text-align: right;
}

body.lang-ar .language-toggle,
body.lang-ar .header-contact,
body.lang-ar .site-footer img {
  direction: ltr;
}

body.lang-ar .hero-content,
body.lang-ar .section-copy,
body.lang-ar .mission-text,
body.lang-ar .section-heading,
body.lang-ar .program-card,
body.lang-ar .department-list,
body.lang-ar .arabic-layout,
body.lang-ar .contact-copy {
  direction: rtl;
  text-align: right;
}

body.lang-ar .site-header {
  direction: rtl;
  flex-direction: row;
}

body.lang-ar .brand {
  direction: rtl;
}

body.lang-ar .header-actions {
  direction: ltr;
  flex-direction: row-reverse;
}

body.lang-ar .nav-links a::after {
  transform-origin: right;
}

body.lang-ar .skip-link {
  right: 16px;
  left: auto;
}

body.lang-ar .hero {
  direction: ltr;
  justify-items: end;
}

body.lang-ar .hero-media {
  background:
    linear-gradient(270deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 46%, rgba(255, 255, 255, 0.66) 82%),
    url("assets/norsud-logo-cropped.jpg") left clamp(40px, 8vw, 120px) top clamp(130px, 16vw, 220px) / min(34vw, 460px) auto no-repeat,
    linear-gradient(225deg, rgba(245, 248, 251, 0.88), rgba(255, 255, 255, 1));
}

body.lang-ar .hero-content {
  direction: rtl;
  justify-self: end;
  text-align: right;
}

body.lang-ar .hero h1,
body.lang-ar .hero-lede {
  margin-inline-start: 0;
  margin-inline-end: 0;
}

body.lang-ar .hero-actions {
  direction: rtl;
  justify-content: flex-start;
}

body.lang-ar .trust-strip,
body.lang-ar .program-grid,
body.lang-ar .department-list {
  direction: rtl;
}

body.lang-ar .trust-strip div,
body.lang-ar .value-grid div,
body.lang-ar .department-list div,
body.lang-ar .arabic-goals li,
body.lang-ar .contact-panel a,
body.lang-ar .contact-panel div,
body.lang-ar .site-footer {
  direction: rtl;
  text-align: right;
}

body.lang-ar .two-column,
body.lang-ar .values-layout,
body.lang-ar .arabic-layout,
body.lang-ar .contact-layout {
  direction: rtl;
}

body.lang-ar .section-heading {
  flex-direction: row-reverse;
}

body.lang-ar .contact-panel strong,
body.lang-ar .header-contact,
body.lang-ar .site-footer p:last-child {
  unicode-bidi: isolate;
}

body.lang-ar .contact-panel a[href^="mailto"] strong,
body.lang-ar .contact-panel a[href^="tel"] strong,
body.lang-ar .header-contact {
  direction: ltr;
}

body.lang-ar .contact-panel strong {
  justify-self: end;
  text-align: right;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 4px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--navy);
  font-weight: 850;
  letter-spacing: 0;
}

.site-header > * {
  min-width: 0;
}

.brand img {
  width: 112px;
  height: 42px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--white);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 32px);
  color: #31445c;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--green);
  content: "";
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.language-toggle {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 112px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--muted);
  padding: 3px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.language-toggle span {
  display: grid;
  place-items: center;
  border-radius: 3px;
}

body.lang-en [data-lang-option="en"],
body.lang-no [data-lang-option="no"],
body.lang-ar [data-lang-option="ar"] {
  background: var(--navy);
  color: var(--white);
}

.header-contact {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(11, 55, 104, 0.18);
  border-radius: 4px;
  color: var(--navy);
  padding: 0 13px;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 88vh;
  padding: 118px clamp(20px, 6vw, 86px) 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 46%, rgba(255, 255, 255, 0.66) 82%),
    url("assets/norsud-logo-cropped.jpg") right clamp(40px, 8vw, 120px) top clamp(130px, 16vw, 220px) / min(34vw, 460px) auto no-repeat,
    linear-gradient(135deg, rgba(245, 248, 251, 0.88), rgba(255, 255, 255, 1));
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 18px;
  background: linear-gradient(90deg, var(--navy), var(--blue), var(--green), var(--gold), var(--red));
  content: "";
}

.hero-content {
  width: min(980px, 100%);
  max-width: 980px;
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  color: var(--navy);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 980px;
  font-size: clamp(3rem, 5.5vw, 5.35rem);
  text-wrap: balance;
  overflow-wrap: normal;
}

.hero-lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: #263f5e;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  font-weight: 650;
  text-wrap: balance;
}

.hero-lede span {
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 4px;
  padding: 0 18px;
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(11, 55, 104, 0.22);
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 16px 34px rgba(11, 55, 104, 0.28);
}

.button.secondary {
  border: 1px solid rgba(11, 55, 104, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.trust-strip div {
  min-height: 116px;
  background: var(--white);
  padding: 24px clamp(18px, 4vw, 44px);
}

.trust-strip strong {
  display: block;
  color: var(--navy);
  font-size: clamp(1.5rem, 2vw, 2.05rem);
  line-height: 1;
}

.trust-strip span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: clamp(68px, 9vw, 118px) clamp(20px, 5vw, 72px);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
}

.section h2 {
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 4rem);
}

.section-copy p:not(.section-kicker),
.mission-text p,
.contact-copy p {
  color: #31445c;
  font-size: 1.08rem;
  font-weight: 600;
}

.mission-text {
  display: grid;
  gap: 20px;
  padding-top: 6px;
}

.mission-text p {
  margin: 0;
}

.values-section {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.values-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(11, 55, 104, 0.12);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 16px 44px rgba(16, 35, 61, 0.08);
}

.value-grid div {
  min-height: 150px;
  background: var(--white);
  padding: 22px;
}

.value-grid strong,
.value-grid span {
  display: block;
}

.value-grid strong {
  color: var(--navy);
  font-size: 1.15rem;
}

.value-grid span {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.work-section {
  background:
    linear-gradient(180deg, rgba(245, 248, 251, 0.96), rgba(255, 255, 255, 0.98)),
    url("assets/norsud-objectives.jpg") center / cover no-repeat;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.section-heading h2 {
  max-width: 780px;
}

.section-heading.compact {
  display: block;
  max-width: 790px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.program-card {
  min-height: 228px;
  border: 1px solid rgba(11, 55, 104, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  box-shadow: 0 16px 44px rgba(16, 35, 61, 0.08);
}

.program-card > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: #e9f2fb;
  color: var(--blue);
  font-weight: 900;
}

.program-card h3 {
  margin: 18px 0 8px;
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.16;
}

.program-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.program-card:nth-child(3n) > span {
  background: #e8f5ef;
  color: var(--green);
}

.program-card:nth-child(4n) > span {
  background: #fff6d5;
  color: #8b6b00;
}

.program-card:nth-child(5n) > span {
  background: #fdecec;
  color: var(--red);
}

.departments-section {
  background: var(--navy);
  color: var(--white);
}

.departments-section .section-kicker,
.departments-section h2 {
  color: var(--white);
}

.department-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  background: rgba(255, 255, 255, 0.2);
}

.department-list div {
  display: grid;
  align-content: space-between;
  min-height: 178px;
  background: #123f70;
  padding: 22px;
}

.department-list strong {
  font-size: 1.04rem;
  line-height: 1.24;
}

.department-list span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 750;
}

.objectives-section {
  background: #fbfcfd;
  color: var(--ink);
}

.arabic-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: start;
}

.objectives-section .section-kicker,
.objectives-section h2 {
  color: var(--navy);
}

.objectives-section h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.22;
}

.arabic-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: arabic-goals;
}

.arabic-goals li {
  position: relative;
  min-height: 112px;
  border: 1px solid rgba(11, 55, 104, 0.12);
  border-radius: 8px;
  background: var(--white);
  padding: 20px 58px 20px 20px;
  color: #263f5e;
  font-size: 1.02rem;
  font-weight: 700;
  box-shadow: 0 12px 34px rgba(16, 35, 61, 0.06);
  counter-increment: arabic-goals;
}

body:not(.lang-ar) .arabic-goals li {
  padding: 20px 20px 20px 58px;
}

.arabic-goals li::before {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--navy);
  color: var(--white);
  content: counter(arabic-goals);
  font-size: 0.86rem;
  font-weight: 900;
}

body:not(.lang-ar) .arabic-goals li::before {
  right: auto;
  left: 18px;
}

.governance-section {
  background: var(--soft);
}

.governance-layout {
  align-items: center;
}

.governance-figure {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.governance-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.governance-figure figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 750;
}

.contact-section {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 251, 0.92)),
    linear-gradient(135deg, rgba(13, 95, 159, 0.08), rgba(255, 255, 255, 0));
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.65fr);
  gap: clamp(32px, 6vw, 86px);
  align-items: center;
}

.contact-copy h2 {
  max-width: 620px;
}

.contact-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(11, 55, 104, 0.12);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
  font-style: normal;
}

.contact-panel a,
.contact-panel div {
  display: grid;
  gap: 5px;
  min-height: 92px;
  background: rgba(255, 255, 255, 0.96);
  padding: 19px 22px;
}

.contact-panel > a > span,
.contact-panel > div > span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-panel strong {
  color: var(--navy);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  line-height: 1.2;
}

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 34px clamp(20px, 5vw, 72px);
  background: #071d38;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer div {
  display: grid;
  gap: 12px;
}

.site-footer img {
  width: 180px;
  border-radius: 4px;
  background: var(--white);
}

.site-footer p {
  margin: 0;
  font-weight: 650;
}

@media (max-width: 1050px) {
  .site-header {
    align-items: start;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .program-grid,
  .department-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .program-card {
    min-height: 190px;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: 100vw;
    max-width: 100vw;
    min-height: auto;
    padding: 12px 16px;
  }

  .brand span,
  .header-contact {
    display: none;
  }

  .brand img {
    width: 82px;
    height: 34px;
  }

  .nav-links {
    gap: 18px;
    font-size: 0.88rem;
  }

  .header-actions {
    position: absolute;
    top: 12px;
    right: auto;
    left: 118px;
    flex: 0 0 auto;
  }

  body.lang-ar .site-header {
    display: block;
    direction: ltr;
    min-height: 106px;
  }

  body.lang-ar .brand {
    position: absolute;
    top: 12px;
    right: 16px;
  }

  body.lang-ar .header-actions {
    position: absolute;
    top: 12px;
    right: auto;
    left: 16px;
  }

  body.lang-ar .nav-links {
    direction: rtl;
    justify-content: flex-end;
    padding-top: 48px;
  }

  .hero {
    min-height: 86vh;
    padding: 150px 20px 56px;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .hero-media {
    background:
      radial-gradient(circle at 16% 92%, rgba(13, 95, 159, 0.08), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.94) 74%, rgba(245, 248, 251, 1) 100%);
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11vw, 3.08rem);
    line-height: 1.03;
    overflow-wrap: break-word;
  }

  body.lang-ar .hero-content,
  body.lang-ar .hero-content .eyebrow,
  body.lang-ar .hero h1,
  body.lang-ar .hero-lede {
    direction: rtl;
    text-align: right;
  }

  body.lang-ar .hero {
    display: block;
    direction: rtl;
  }

  body.lang-ar .hero-media {
    background:
      radial-gradient(circle at 84% 92%, rgba(13, 95, 159, 0.08), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.94) 74%, rgba(245, 248, 251, 1) 100%);
  }

  body.lang-ar .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    margin-inline: 0;
  }

  body.lang-ar .hero h1 {
    width: 100%;
    max-width: 100%;
    margin: 0;
    margin-inline: 0;
  }

  body.lang-ar .hero-lede {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 0;
    margin-inline: 0;
  }

  body.lang-ar .hero-content .ar {
    direction: rtl;
    display: block;
    text-align: center;
  }

  body.lang-ar .hero-content .eyebrow,
  body.lang-ar .hero h1,
  body.lang-ar .hero-lede {
    text-align: center;
    transform: none;
  }

  body.lang-ar .hero h1 {
    font-size: clamp(2.7rem, 12vw, 3.45rem);
    line-height: 1.08;
    overflow-wrap: normal;
  }

  body.lang-ar .hero-lede {
    max-width: 27ch;
    margin-inline: auto;
    font-size: 1rem;
  }

  body.lang-ar .hero h1 .ar {
    max-width: 8ch;
    margin-inline: auto;
    white-space: normal;
  }

  body.lang-ar .hero-lede .ar {
    max-width: 27ch;
    margin-inline: auto;
    white-space: normal;
  }

  body.lang-ar .hero-actions {
    justify-content: stretch;
  }

  .hero-lede {
    max-width: 100%;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .trust-strip,
  .two-column,
  .contact-layout,
  .values-layout,
  .arabic-layout {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    min-height: auto;
  }

  .section {
    padding: 62px 20px;
  }

  .section-heading {
    display: block;
  }

  .program-grid,
  .department-list,
  .value-grid,
  .arabic-goals {
    grid-template-columns: 1fr;
  }

  .department-list div {
    min-height: 132px;
  }

  .governance-figure img {
    aspect-ratio: 1 / 0.86;
  }

  .site-footer {
    display: grid;
    align-items: start;
  }
}
