/* =========================================================
   Mosadad website — shared header, footer and design tokens.
   Loaded on every page that uses the new header and footer:
   the redesigned pages (after mosadad.css) and the blog (after
   its own older stylesheets). Everything here is scoped to the
   header and footer, so it cannot restyle older page content.
========================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Copernicus";
  src: url("fonts/CopernicusTrial-Book.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* No italic file on purpose: the approved design only loads Copernicus Book,
   so its italic words (<em>) are the Book letters slanted by the browser.
   Loading CopernicusTrial-BookItalic.ttf would give different letter shapes. */

/* ---------- Tokens ---------- */
:root {
  --blue: #1072FA;
  --blue-dark: #0B55BD;
  --ink: #1C2025;
  --muted: #4A5160;
  --muted-2: #5A6272;
  --tint: #EAF0FF;
  --wash: #F6F8FD;
  --line: #E6ECF7;
  --line-2: #DCE4F3;
  --on-blue-label: #CFE0FF;
  --on-blue-text: #EAF0FF;
  --step-num: #B9CDF5;
  --connector: #9DBDF7;
  --white: #FFFFFF;

  --sans: "Noto Sans", Helvetica, Arial, sans-serif;
  --serif: "Copernicus", "Times New Roman", Times, serif;

  --radius-panel: 28px;
  --radius-card: 24px;
  --radius-grid: 20px;
  --radius-tile: 16px;
  --shadow-card: 0 10px 24px rgba(16, 40, 90, 0.06);
  --shadow-pop: 0 24px 50px rgba(16, 40, 90, 0.14);

  --gutter: 48px;
}

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }
}

/* ---------- Chrome base ---------- */
/* The redesigned pages get these from mosadad.css's base rules; the blog
   does not load mosadad.css, so the header and footer set their own. */
.site-header,
.site-footer {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  /* start, not left, so Arabic pages line up on the right */
  text-align: start;
}

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after,
.site-footer,
.site-footer *,
.site-footer *::before,
.site-footer *::after {
  box-sizing: border-box;
}

:where(.site-header, .site-footer) :is(h2, h3, p) {
  margin: 0;
}

:where(.site-header, .site-footer) img,
:where(.site-header, .site-footer) svg {
  max-width: 100%;
}

:where(.site-header, .site-footer) :focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* The blog's style.css (and DaisyUI) style every button and .btn on the
   page. Undo that inside the header; :where() keeps these weaker than the
   header's own class rules below. */
:where(.site-header) button,
:where(.site-header) .btn {
  gap: 0;
  padding: 0;
  height: auto;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
  transform: none;
  background-image: none;
}

:where(.site-header) button:hover,
:where(.site-header) button:active,
:where(.site-header) .btn:hover,
:where(.site-header) .btn:active {
  box-shadow: none;
  transform: none;
}

:where(.site-header) button::after,
:where(.site-header) .btn::after {
  content: none;
}

/* Generic pieces the header and footer use. mosadad.css has the same
   rules for page content; these copies keep the chrome working on pages
   that don't load mosadad.css. */
:where(.site-header) .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

:where(.site-header) .btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}

:where(.site-header, .site-footer) .icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

:where(.site-header) .icon-tile {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-tile);
  background: var(--tint);
  color: var(--blue);
}

:where(.site-header) .icon-tile--40 {
  width: 40px;
  height: 40px;
}

:where(.site-header) .icon-tile--40 svg {
  width: 20px;
  height: 20px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}

/* Only appears for keyboard users (Tab), never after a mouse click */
.skip-link:focus-visible {
  top: 12px;
  color: var(--white);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px 28px;
}

.site-header__brand {
  flex: 1 1 0;
  display: flex;
  align-items: center;
}

.site-header__brand a {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.site-header__brand img {
  display: block;
  height: 30px;
  width: auto;
}

.site-header__actions {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

/* English | Arabic language switch (Home only). Plain text (user,
   2026-11-04): the current language is dark with a blue bar under it;
   the other one is blue and grows the same bar on hover or focus. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-inline-end: 8px;
}

.lang-switch__item {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* The thin divider between the two */
.lang-switch__item + .lang-switch__item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 1px;
  height: 16px;
  translate: 0 -50%;
  background: var(--line-2);
}

/* Blue bar under the label */
.lang-switch__item::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  scale: 0 1;
  transition: scale 0.3s cubic-bezier(0.3, 1.2, 0.5, 1);
}

.lang-switch__item.is-current {
  color: var(--ink);
  font-weight: 700;
}

.lang-switch__item.is-current::after,
a.lang-switch__item:is(:hover, :focus-visible)::after {
  scale: 1 1;
}

/* While the other language is hovered, the current one's bar steps aside */
.lang-switch:has(> a.lang-switch__item:is(:hover, :focus-visible)) > .is-current::after {
  scale: 0 1;
}

/* Letter spacing would break up the joined Arabic letters */
.lang-switch__item[lang="ar"] {
  letter-spacing: 0;
  font-family: "Noto Sans Arabic", "Noto Naskh Arabic", sans-serif;
}

@media (max-width: 420px) {
  .lang-switch {
    margin-inline-end: 0;
  }

  .lang-switch__item {
    padding: 0 8px;
    font-size: 14px;
  }

  .lang-switch__item::after {
    inset-inline: 8px;
  }
}

.btn--header {
  min-height: 46px;
  padding: 0 24px;
  font-size: 15px;
  white-space: nowrap;
}

.site-nav {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

/* Plain blue, no pattern (review comments 2026-11-09). With motion on,
   site-motion.css swells it in as a circle. */
.nav-link:hover {
  background: var(--blue);
  color: var(--white);
}

.nav-link[aria-current="page"],
.nav-link.is-active,
.nav-link[aria-expanded="true"] {
  background: var(--tint);
  color: var(--blue);
}

.nav-link svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  transition: transform 0.15s ease;
}

.nav-link[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 54px;
  left: 0;
  width: 340px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
}

.nav-menu[hidden] {
  display: none;
}

.nav-menu a {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  background: var(--wash);
  color: var(--ink);
}

.nav-menu__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-menu__title {
  font-size: 15px;
  font-weight: 600;
}

.nav-menu__sub {
  font-size: 13px;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav__mobile-cta {
  display: none;
}

@media (max-width: 900px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
  }

  .js .site-nav:not(.is-open) {
    display: none;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    font-size: 16px;
  }

  .nav-menu {
    position: static;
    width: auto;
    margin: 4px 0 6px;
    box-shadow: none;
  }
}

@media (max-width: 520px) {
  .site-header__actions .btn--header {
    display: none;
  }

  .site-nav__mobile-cta {
    display: inline-flex;
    margin-top: 10px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--blue);
  color: var(--white);
}

.site-footer a {
  color: var(--white);
}

.site-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 72px;
  align-items: flex-start;
}

.site-footer__brand {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.site-footer__brand > a {
  display: inline-flex;
  width: 72px;
}

.site-footer__brand img {
  display: block;
  width: 72px;
  height: auto;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
}

.social-links a:hover {
  background: var(--tint);
  color: var(--blue-dark);
}

.social-links svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* YouTube (replaced X, 2026-11-16): a filled logo, the play triangle cut out */
.social-links svg.icon--youtube {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.site-footer__cols {
  flex: 3 1 560px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 48px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-blue-label);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.footer-col a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  font-size: 16px;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer__bottom {
  max-width: 1240px;
  margin: 0 auto;
  /* Copyright and links sit closer to the ends of the divider line than
     the columns above (user, 2026-11-02) */
  padding: 24px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
  color: var(--on-blue-text);
}

.site-footer__bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-footer__bottom a {
  /* Taller tap area without moving anything: the padding is cancelled
     out by the negative margin. */
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
  text-decoration: none;
}

.site-footer__bottom a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Footer on phones ----------
   One full-width row per block (user, 2026-11-05), replacing the old
   wrap where Company and Solutions sat side by side with Support below:
   the logo and social icons share the first row, then Company, Solutions
   and Support each take a row with their links in a line, with thin
   dividers between the rows. */
@media (max-width: 760px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 48px;
    padding-bottom: 8px;
  }

  .site-footer__brand {
    flex: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 28px;
  }

  .site-footer__brand > a,
  .site-footer__brand img {
    width: 56px;
  }

  .social-links {
    gap: 10px;
  }

  .social-links a {
    width: 42px;
    height: 42px;
  }

  .site-footer__cols {
    flex: none;
    flex-direction: column;
    gap: 0;
  }

  .footer-col {
    gap: 6px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .footer-col ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 22px;
  }

  .footer-col a {
    min-height: 40px;
    font-size: 15px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px var(--gutter) 24px;
  }
}

/* ---------- Page bar ---------- */
/* The floating page bar itself is styled in page-bar.css (shared with the
   older pages). Extra footer padding keeps it, and the back-to-top button
   that floats above it, off the footer's last line: site-motion.js sets
   --bar-space from the bar's measured height, and 68px clears the button.
   The fixed values are the fallback without JavaScript. */
.site-footer {
  padding-bottom: calc(var(--bar-space, 72px) + 68px);
}

@media (max-width: 760px) {
  .site-footer {
    padding-bottom: calc(var(--bar-space, 82px) + 68px);
  }
}

/* Wide screens: the back-to-top button sits level with the bar instead of
   above it (site-motion.css), so only the bar needs clearing */
@media (min-width: 1024px) {
  .site-footer {
    padding-bottom: calc(var(--bar-space, 72px) + 8px);
  }
}

/* Keep the bar and back-to-top button from covering the open mobile menu. */
body:has(.site-nav.is-open) :is(.page-bar, .back-to-top) {
  display: none;
}
