* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Cairo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.lang-ar { display: none; }
[dir="ltr"] .lang-en {
  display: initial;
}

[dir="ltr"] .lang-ar {
  display: none;
}

[dir="rtl"] .lang-en {
  display: none;
}

[dir="rtl"] .lang-ar {
  display: initial;
}
[dir="rtl"] body { font-family: Cairo, Inter, system-ui, sans-serif; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--chrome-line);
  color: var(--chrome-text);
  box-shadow: var(--chrome-shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  object-position: center 34%;
  border-radius: 0;
  border: 1px solid var(--chrome-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: .08em;
}

.brand small {
  color: var(--chrome-muted);
  font-size: .78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 24px);
  color: var(--chrome-muted);
  font-size: .93rem;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-bright);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.language-toggle,
.menu-toggle {
  min-height: 42px;
  border: 1px solid var(--chrome-line);
  background: color-mix(in srgb, var(--chrome-surface) 86%, transparent);
  color: var(--chrome-text);
  cursor: pointer;
}

.icon-button {
  width: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.language-toggle {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  font-weight: 800;
}

.language-toggle b { color: var(--accent); }

.menu-toggle {
  display: none;
  width: 42px;
  border-radius: 50%;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: var(--chrome-text);
}

.hero,
.page-hero {
  --hero-watermark-size: clamp(190px, 28vw, 340px);
  --hero-watermark-opacity: .14;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(88px, 12vw, 150px) clamp(18px, 4vw, 64px) clamp(42px, 7vw, 76px);
  background: linear-gradient(135deg, #06150f 0%, #0f513b 58%, #123d31 100%);
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  width: var(--hero-watermark-size);
  height: var(--hero-watermark-size);
  inset-inline-end: clamp(18px, 8vw, 96px);
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
  border-radius: 0;
  background: url("assets/maricon-logo.png") center / contain no-repeat;
  opacity: var(--hero-watermark-opacity);
}

:root[data-theme="light"] .hero,
:root[data-theme="light"] .page-hero {
  --hero-watermark-opacity: .12;
  background: linear-gradient(135deg, #eef7ff 0%, #d7eaff 58%, #b9d7f3 100%);
}

[dir="rtl"] .hero::before,
[dir="rtl"] .page-hero::before {
  inset-inline: clamp(18px, 8vw, 96px) auto;
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: end;
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  min-width: 0;
}

.page-hero-content { padding-top: 36px; }

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent-bright);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 7vw, 6.2rem);
  line-height: .98;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 3.5rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.28;
}

.lead,
.hero-copy {
  width: 100%;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.24rem);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: #032014;
  border-color: transparent;
}

:root[data-theme="light"] .button.primary {
  color: #ffffff;
}

.button.ghost {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: min(980px, 100%);
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}

.trust-strip > span {
  display: grid;
  gap: 2px;
  padding: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.trust-strip > span > b {
  color: var(--accent-bright);
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.trust-strip > span > small {
  color: var(--muted);
  min-width: 0;
}

.trust-strip small span { display: inline; }

.section {
  padding: clamp(64px, 9vw, 118px) clamp(18px, 4vw, 64px);
  background: var(--bg);
}

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .78fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.narrow { width: min(900px, 100%); }
.wide { width: min(1180px, 100%); }

.muted { color: var(--muted); }

.card,
.pillar,
.timeline article,
.table-card,
.article-card,
.contact-form,
.level-card,
.project-card,
.value-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16fpx;
  min-width: 0;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.split > *,
.contact-layout > * {
  min-width: 0;
}

.value-card,
.level-card,
.article-card,
.project-card,
.table-card {
  padding: 24px;
  overflow-x: auto;
}

.value-card strong,
.level-card span,
.article-card span,
.timeline span,
.pill-icon {
  color: var(--accent-bright);
  font-weight: 800;
}

.value-card p,
.pillar p,
.timeline p,
.article-card p,
.project-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.timeline-note {
  margin: 12px 0 0;
  padding-inline: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.timeline article { padding: 22px; }
.timeline strong { display: block; margin: 8px 0; }

.pillar {
  padding: 24px;
  min-height: 355px;
}

.pillar ul,
.clean-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.pillar li,
.tag {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  font-size: .9rem;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding-inline-start: 18px;
  border-inline-start: 3px solid var(--accent);
  color: var(--muted);
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
}

.course-table th,
.course-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

.course-table th {
  color: var(--accent-bright);
  background: var(--surface-strong);
}

.course-table td { color: var(--muted); }

.accreditation-note {
  margin-top: 24px;
  padding: 20px;
  border-inline-start: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-family: Cairo, Inter, sans-serif;
}

.premium-band {
  --premium-watermark-size: clamp(190px, 26vw, 320px);
  --premium-watermark-opacity: .16;
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #06150f 0%, #0f513b 58%, #123d31 100%);
  color: var(--color-ivory);
}

.premium-band::before {
  content: "";
  position: absolute;
  width: var(--premium-watermark-size);
  height: var(--premium-watermark-size);
  inset-inline-end: clamp(18px, 8vw, 96px);
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
  border-radius: 0;
  background: url("assets/maricon-logo.png") center / contain no-repeat;
  opacity: var(--premium-watermark-opacity);
}

.premium-band .muted { color: #d7dde4; }
.premium-band .level-card {
  background: rgba(5, 27, 20, .86);
  border-color: rgba(126, 214, 175, .24);
}

:root[data-theme="light"] .premium-band {
  --premium-watermark-opacity: .12;
  background: linear-gradient(135deg, #eef7ff 0%, #d7eaff 58%, #b9d7f3 100%);
  color: var(--text);
}

:root[data-theme="light"] .premium-band .muted {
  color: var(--muted);
}

:root[data-theme="light"] .premium-band .level-card {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(41, 99, 156, .2);
}

[dir="rtl"] .premium-band::before {
  inset-inline: clamp(18px, 8vw, 96px) auto;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(340px, .86fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.direct-contact {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.direct-contact a,
.direct-contact span {
  color: var(--accent-bright);
  font-weight: 800;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(20px, 3vw, 32px);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}

.contact-form .full { grid-column: 1 / -1; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
}

.contact-form textarea { resize: vertical; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 64px);
  background: var(--chrome-bg);
  border-top: 1px solid var(--chrome-line);
  color: var(--chrome-muted);
}

.site-footer strong,
.site-footer a {
  color: var(--chrome-text);
  font-weight: 800;
}

.site-footer a:hover {
  color: var(--accent-bright);
}

@media (max-width: 1080px) {
  .grid-4,
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split,
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }

  .nav-links {
    position: fixed;
    inset: 78px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  body.menu-open .nav-links { display: flex; }
  .nav-links a { padding: 14px; border-bottom: 1px solid var(--line); }
  .brand span { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 70px;
    padding-inline: 14px;
    gap: 6px;
  }

  body,
  main {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero,
  .page-hero,
  .section {
    width: 100vw;
    max-width: 100vw;
    padding-inline: 16px;
    overflow-x: hidden;
  }

  .hero-content,
  .page-hero-content,
  .narrow,
  .wide,
  .grid-2,
  .grid-3,
  .grid-4 {
    width: 100%;
    max-width: min(calc(100vw - 32px), 358px);
  }

  .header-actions {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    gap: 6px;
    min-width: 0;
  }

  .icon-button,
  .language-toggle,
  .menu-toggle {
    min-height: 38px;
  }

  .icon-button,
  .menu-toggle {
    width: 38px;
  }

  .language-toggle {
    flex: 0 0 74px;
    justify-content: center;
    width: 74px;
    padding-inline: 8px;
    font-size: .88rem;
    overflow: hidden;
    white-space: nowrap;
  }

  h1,
  h2,
  h3,
  p {
    overflow-wrap: anywhere;
  }

  h1,
  .page-hero h1 {
    font-size: 1.9rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 1.6rem;
    line-height: 1.12;
  }

  .premium-band {
    --premium-watermark-size: 150px;
    --premium-watermark-opacity: .1;
  }

  .hero,
  .page-hero {
    --hero-watermark-size: 150px;
    --hero-watermark-opacity: .1;
  }

  .hero::before,
  .page-hero::before,
  .premium-band::before {
    inset-inline-end: 16px;
    top: 102px;
    transform: none;
  }

  [dir="rtl"] .hero::before,
  [dir="rtl"] .page-hero::before,
  [dir="rtl"] .premium-band::before {
    inset-inline: 16px auto;
  }

  .trust-strip,
  .grid-2,
  .grid-4,
  .timeline,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form .full { grid-column: auto; }
  .site-footer { flex-direction: column; }
  .course-table { font-size: .9rem; }
}
