/* ------------------------------------------------------------------ */
/* Site footer — shared by every page                                   */
/*                                                                      */
/* Lifted out of Homepage.css so all pages render one footer instead of  */
/* three. The rules below are that footer's own, unchanged; what is new  */
/* is the block at the top, which supplies everything the footer used to */
/* inherit from the homepage's own sheet — the reset Bootstrap normally  */
/* provides (and which arrives from a CDN, so it may not arrive at all), */
/* the homepage container formula, and the homepage's page-wide zoom.    */
/* Without those the same markup renders at a different size, with       */
/* different gutters and different link colours, from one page to the    */
/* next — which is exactly what had happened.                            */
/* ------------------------------------------------------------------ */

/* ---- what the footer used to inherit ---------------------------------- */

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

/* :where() again — `.site-footer p` is a class plus a type, which outranks
   the single class of `.site-footer__tagline`, so the reset was eating that
   element's own top margin and the logo and the tagline ran together. */
:where(.site-footer) p,
:where(.site-footer) h1,
:where(.site-footer) h2,
:where(.site-footer) h3,
:where(.site-footer) h4 {
  margin: 0;
}

:where(.site-footer) ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Zero specificity, for the same reason as the header's: `.site-footer a`
   would outrank a component rule written with a single class. The `a`
   stays outside, so it still beats Bootstrap's link colour. */
:where(.site-footer) a {
  color: inherit;
  text-decoration: none;
}

:where(.site-footer) img {
  display: block;
  max-width: 100%;
}

/* Scoped so the footer keeps the homepage's gutter formula whichever sheet
   a page happens to define `.container` in — two class names beat one. */
.site-footer > .container {
  --container-gutter: 20px;
  width: 100%;
  /* style.css and Bootstrap both cap `.container`; the footer's own formula
     already caps the content, so a second cap on top of it shrank the whole
     footer by ~430px on every page that loads one of those sheets. */
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--container-gutter);
}

@media (min-width: 640px) {
  .site-footer > .container {
    --container-gutter: max(32px, calc((100vw - 1568px) / 2));
  }
}

/* The homepage draws its chrome at a 1828px reference width and scales the
   whole page down to fit; inner pages are authored at 1:1. So the footer
   alone carries that scale here, the same way the header does. */
body > .site-footer {
  zoom: clamp(0.85, calc(100vw / 1828px), 1);
}

/* Inner pages set a different base family and colour on `body`, and the
   footer inherits from it. Stated so it cannot drift either way. */
.site-footer {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-regular);
  color: var(--color-white);
}

/* ---- the footer itself (from Homepage.css, unchanged) ------------------ */

/* ------------------------------------------------------------------ */
/* Footer                                                               */
/* ------------------------------------------------------------------ */

.site-footer {
  position: relative;
  background: var(--color-navy-800);
  padding-block: 56px 32px;
  /* The watermark below sits flush to the viewport edge and is meant to be  */
  /* cropped there, exactly as it is in the Figma frame.                     */
  overflow: hidden;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 640px) {
  .site-footer__grid {
      grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1100px) {
  .site-footer__grid {
      grid-template-columns: 1.23fr 0.72fr 1.13fr 0.96fr 1.11fr;
      gap: 24px;
    }
}

.site-footer__logo {
  width: 160px;
  height: auto;
}

.site-footer__tagline {
  margin-block-start: 20px;
  max-width: 289px;
  color: var(--color-text-muted-footer);
  font-size: var(--font-size-18);
  line-height: var(--line-height-24);
  font-weight: var(--font-weight-regular);
}

.site-footer__heading {
  margin: 0;
  color: var(--color-white);
  font-size: 22px;
  font-weight: var(--font-weight-bold);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  /* The 44px row pitch is the link box alone: 10+10 padding around a 24px
     line box. Any gap on top of that pushed the rows to 48. */
  gap: 0;
  margin-block-start: 20px;
}

/* Each link is preceded by a small forward chevron (Figma nodes 1:1339 et  */
/* al). Exact offsets from the frame: the chevron's own box sits 1.85px in  */
/* from the column edge and is 5.693px wide, with the label starting at     */
/* 19px — so 11.457px of gap between them. Drawn as a ::before marker       */
/* rather than 18 repeated <img> tags: it stays out of the accessibility    */
/* tree, where a decorative bullet belongs.                                 */
.site-footer__list a {
  display: flex;
  align-items: center;
  gap: 11.457px;
  padding-block: 10px;
  /* The design's rows sit 44px apart: 10+10 padding around a 24px line box.
     Without this the row takes the footer's base `normal` and comes out 46. */
  line-height: var(--line-height-24);
  padding-inline-start: 1.85px;
  color: var(--color-white);
  font-size: var(--font-size-18);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
}

/* The design has no bullet before the footer links; the rule is kept only
   so the RTL mirroring below has nothing left to mirror. */
.site-footer__list a::before {
  content: none;
}

.site-footer__list a:hover {
  text-decoration: underline;
}

@media (min-width: 1100px) {
  .site-footer__contact {
    padding-inline-start: 31px;
    border-inline-start: 1px solid rgba(236, 236, 249, 0.25);
  }
}

.site-footer__contact-text {
  margin-block-start: 20px;
  /* Narrow enough to break after "help you", the way the design sets it. */
  max-width: 215px;
  color: var(--color-text-muted-footer);
  /* Measurably larger than the other footer copy in the design — the first
     line runs 237px where 18px Tajawal would give 181px. */
  font-size: var(--font-size-22);
  line-height: 1.32;
  font-weight: var(--font-weight-regular);
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 286px;
  max-width: 100%;
  margin-block-start: 16px;
  padding: 10px 24px;
  border-radius: var(--radius-72);
  text-decoration: none;
  font-size: 18px;
  font-weight: var(--font-weight-regular);
  white-space: nowrap;
}

.footer-cta--whatsapp {
  border: var(--border-width-1) solid #51cb5f;
  color: #50ca5d;
}

.footer-cta--call {
  border: var(--border-width-1) solid var(--color-specialty-card-border);
  color: var(--color-specialty-card-border);
}

.footer-cta__icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-footer__social {
  display: flex;
  gap: 16px;
  margin-block-start: 32px;
}

.site-footer__social img {
  width: 24px;
  height: 24px;
}

.site-footer__bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-block-start: 32px;
  padding-block-start: 24px;
}

/* The divider rule (Figma "Line 5") spans the full 1828px frame edge to     */
/* edge, not just the .container column above it. A real border on          */
/* .site-footer__bottom would be clipped to the container's own width, so    */
/* it's a full-bleed pseudo-element instead, breaking out the same way the   */
/* watermark does: negating .container's --container-gutter on both inline   */
/* sides reaches the true viewport edge regardless of the .page zoom.        */
.site-footer__bottom::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: calc(-1 * var(--container-gutter));
  height: var(--border-width-1);
  background: rgba(255, 255, 255, 0.15);
}

/* style.css paints a pulse watermark on .site-footer::after for the footer
   it used to own. The design has none, and this sheet loads after it. */
.site-footer::after {
  content: none;
}

/* Decorative ANMC mark watermarked into the footer's bottom corner (Figma  */
/* node 1:1391 — white at 5% opacity, 259x117 at the 1828px reference).     */
/* Anchored to .site-footer__bottom rather than to .site-footer because its */
/* one fixed relationship in the design is to the divider rule: its bottom  */
/* edge sits exactly on that line (y 7404 vs the rule at y 7405). `bottom:  */
/* 100%` expresses that directly, so it stays put however tall the bottom   */
/* row grows when the policy links wrap.                                    */
/* Horizontally it must reach the real viewport edge, but its containing    */
/* block is the padded .container — so it negates .container's own          */
/* --container-gutter to land flush against the footer's full-bleed edge.   */
/* Negating that variable rather than recomputing the gutter from vw is     */
/* what makes it actually flush: both sides then resolve from one identical */
/* expression, so they cancel exactly whatever the .page zoom does to it.   */
.site-footer__watermark {
  position: absolute;
  bottom: 100%;
  inset-inline-end: calc(-1 * var(--container-gutter));
  width: clamp(190px, 17.6vw, 322px);
  height: auto;
  pointer-events: none;
}

@media (min-width: 900px) {
  .site-footer__bottom {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }
}

.site-footer__legal p,
.site-footer__copy {
  margin: 0;
  color: var(--color-text-muted-footer);
  font-size: var(--font-size-18);
}

.site-footer__credit {
  color: var(--color-white) !important;
  font-weight: var(--font-weight-bold);
}

/* Underline-free in every state, unlike the other footer links which pick   */
/* one up on hover — stated explicitly so that rule can't bleed in here.     */
/* The hover affordance is a slight fade instead, which is language-neutral: */
/* it reads the same on the Latin "Netwave" and the Arabic "نت ويف".         */
.site-footer__credit a,
.site-footer__credit a:hover,
.site-footer__credit a:focus-visible {
  color: inherit;
  text-decoration: none;
}

.site-footer__credit a {
  opacity: 1;
  transition: opacity 0.2s var(--ease-premium);
}

.site-footer__credit a:hover,
.site-footer__credit a:focus-visible {
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__credit a {
      transition: none;
    }
}

.site-footer__policies {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-footer__policies a {
  display: block;
  padding: 10px 16px;
  color: var(--color-text-muted-footer);
  font-size: var(--font-size-18);
  text-decoration: none;
  border-inline-start: var(--border-width-1) solid rgba(155, 155, 200, 0.5);
}

.site-footer__policies li:first-child a {
  border-inline-start: none;
}

.footer-cta--whatsapp:hover {
  background: rgba(81, 203, 95, 0.12);
}

.footer-cta--call:hover {
  background: rgba(155, 155, 200, 0.12);
}

.site-footer__social a {
  display: inline-flex;
  opacity: 0.85;
}

.site-footer__social a:hover {
  opacity: 1;
  transform: translateY(-2px);
}


/* ---- RTL ------------------------------------------------------------ */

/* Same case as the header's chevrons, and same reason for living here
   rather than in the homepage's own rtl.css. */
[dir="rtl"] .site-footer__list a::before {
  transform: scaleX(-1);
}

/* The box already moves with `inset-inline-end`; only the artwork inside
   it still needs mirroring, which also makes the ECG line sweep the same
   way as the reversed layout. */
[dir="rtl"] .site-footer__watermark {
  transform: scaleX(-1);
}


/* ---- inherited typography -------------------------------------------- */

/* The heading line-heights below name the elements directly, on purpose:
   they have to beat style.css's own h1–h6 rule, which a :where() could not.

   Nothing inside the footer used to state a base line-height, so every
   element without one of its own took whatever the page happened to supply:
   `normal` on the homepage (no Bootstrap), 1.5 wherever Bootstrap's reboot
   loads, 1.22 from style.css on the headings. The links came out 35px tall
   on one page and 40px on the next. Pinned to the homepage's value; the
   handful of elements that set their own still win, since any matching
   rule beats inheritance. */
.site-footer,
/* style.css gives every h1–h6 a line-height, and an element's own rule beats
   anything it would inherit — so the column headings need naming too. */
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
  line-height: var(--line-height-normal);
}
