/* ==========================================================================
   ac-accessibility.css - WCAG remediations, loaded LAST on every page.
   --------------------------------------------------------------------------
   Why this file exists separately from ac-enhancements.css / ac-master-theme.css:
   those two are not loaded consistently (11 pages miss ac-enhancements, 35 miss
   ac-master-theme), so a contrast fix placed in either one silently does not
   apply everywhere. This file is a single, deliberately small, additive layer
   that every page loads, so accessibility rules cannot be half-applied.

   It overrides values inherited from the exported Webflow stylesheet.
   Every fix below is a MEASURED fix - the offending foreground/background
   pair and its pre-fix ratio are recorded, and each replacement was computed
   against WCAG 2.1 AA (4.5:1 for body text, 3:1 for large/bold >=18.66px).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Webflow ships a bare element rule `p, li { opacity: 0.9 }`.
      On text this is a genuine legibility defect rather than a style choice:
      the glyphs are composited toward the background before the user ever
      sees them, so the rendered colour is a blend, not the declared one.
      It pushed body copy from #64748b on #ffffff (4.81:1, passing) to a
      blended #748297 (3.90:1, failing) - 10 nodes across /pricing and /blog.
      Component colours in this codebase are already chosen for contrast, so
      the extra fade is removed.
   -------------------------------------------------------------------------- */
p,
li {
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   2. Webflow: .text-block-629 { color: #156ef4 } - the "خدمة جديدة" article
      tag, which sits on the dark page background #0e0f0f. Measured 4.17:1,
      below the 4.5:1 required for 17px body text; failing on 6 pages.
      #5b9bff on #0e0f0f measures 6.89:1.
   -------------------------------------------------------------------------- */
.text-block-629 {
  color: #5b9bff !important;
}

/* --------------------------------------------------------------------------
   3. Webflow: .link-153, .link-154 { color: #0080ff } on #ffffff measured
      3.79:1. #0066cc on #ffffff measures 5.57:1 and stays in the same blue
      family, so the link still reads as a link.
   -------------------------------------------------------------------------- */
.link-153,
.link-154 {
  color: #0066cc !important;
}

/* --------------------------------------------------------------------------
   4. WCAG 1.4.1 Use of Color.
      Inline links inside running prose were signalled by colour alone, so
      they were indistinguishable from the surrounding words to anyone who
      cannot rely on hue (axe "link-in-text-block", serious, on 17 pages:
      every /articles/* page plus /privacy-policy and /terms-of-service).
      An underline is the conventional fix and the only one that survives
      forced-colours / high-contrast modes, where a colour change is dropped.
      Scoped to links in prose so navigation, footer, buttons and card CTAs
      keep their existing appearance - those are already distinguished by
      shape, spacing or background, so underlining them would be noise.
   -------------------------------------------------------------------------- */
main p a,
main li a,
article p a,
article li a,
main ul a,
article ul a,
[role="main"] p a,
[role="main"] li a,
[role="main"] ul a {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* Undo it for anything that is really a button or card link. */
main p a[class*="button"],
main p a[class*="btn"],
main li a[class*="button"],
main li a[class*="btn"],
article p a[class*="button"],
article p a[class*="btn"],
article li a[class*="button"],
article li a[class*="btn"],
[role="main"] p a[class*="button"],
[role="main"] p a[class*="btn"],
[role="main"] li a[class*="button"],
[role="main"] li a[class*="btn"] {
  text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   6. /blog/seo/ was never given the dark theme. Every other page carries a
      dark `html, body` and a dark navbar, but this one rendered a white body
      and a #dddddd navbar, so its white nav links measured 1.35:1 - and it
      mixed that light body with the dark #060911 footer, where the vendor
      rule `.uui-text-size-small-5 { color: var(--untitled-ui-gray600\<deleted\> }`
      is a broken declaration that falls back to #1d1d1d, i.e. dark text on a
      dark footer at 1.18:1.
      Rather than restyle one page, the navbar is pinned to the same dark
      surface every other page already uses, which is also what fixes its
      contrast. The footer text colour is corrected for every page.
   -------------------------------------------------------------------------- */
.navbar-16,
header.navbar-16,
.navigation-12 {
  background: #080c14 !important;
}

.uui-text-size-small-5 {
  color: #cbd5e1 !important;
}

/* --------------------------------------------------------------------------
   7. Mega-menu icons were white on a white card (WCAG 1.4.11 - the icon was
      simply not perceivable).
      The brand-blue treatment for `.ac-dropdown-item-icon` exists only in
      assets/ac-master-theme.css, and 35 pages - including the homepage and
      /pricing - do not load that file. The icon wrapper therefore inherited
      the page-level white text colour from the dark-theme rule
      (`html, body { color: #ffffff }`) while sitting on the dropdown's LIGHT
      card, so `stroke="currentColor"` resolved to white on white.
      Measured in production: color rgb(255,255,255), stroke rgb(255,255,255),
      against a light card, while sibling icons in the same panel correctly
      computed rgb(15,23,42).
      Fixed here rather than per-page because this layer is the one every page
      loads, so every reuse of the component is covered - including pages that
      never load ac-master-theme.css. The hover inversion is preserved: the
      filled brand-blue chip keeps white glyphs.
   -------------------------------------------------------------------------- */
.ac-dropdown-item-icon {
  color: #0064ff !important;
  background: rgba(0, 100, 255, 0.12) !important;
  border: 1px solid rgba(0, 100, 255, 0.2) !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 34px !important;
  height: 34px !important;
}

.ac-dropdown-item-icon svg,
.dropdown-card-xl .ac-dropdown-item-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #0064ff !important;
  fill: none !important;
}

/* Hover keeps the solid brand-blue chip, so the glyph inverts to white. */
.dropdown-block-link:hover .ac-dropdown-item-icon,
.dropdown-block-link:focus-visible .ac-dropdown-item-icon {
  background: #0064ff !important;
  border-color: #0064ff !important;
  color: #ffffff !important;
}

.dropdown-block-link:hover .ac-dropdown-item-icon svg,
.dropdown-block-link:focus-visible .ac-dropdown-item-icon svg {
  stroke: #ffffff !important;
}

/* --------------------------------------------------------------------------
7b. The mega-menu's contact icons carried no chip at all. `.ac-comm-icon` and
    `.icon-x-small` are used by the contact rows at the foot of the panel and by
    the "من عندك استفسار؟ تواصل" link; measured in the browser they computed to
    background rgba(0,0,0,0), border 0px, border-radius 0px at 15x19px, while the
    four sibling `.ac-dropdown-item-icon` chips in the same panel are brand-blue.
    The row gaps were also tight enough (.wrap-h-x-small was 4px) that the glyph
    read as glued to its label. Both are corrected here so the panel is
    internally consistent - and so the glyph stays perceivable on the light card.
    Scoped to .dropdown-list-2 because .icon-x-small is a shared Webflow utility
    used in ~39 places across the site.
   -------------------------------------------------------------------------- */
.dropdown-list-2 .ac-comm-icon,
.dropdown-list-2 .icon-x-small {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 7px !important;
  background: rgba(0, 100, 255, 0.12) !important;
  border: 1px solid rgba(0, 100, 255, 0.2) !important;
  color: #0064ff !important;
}

.dropdown-list-2 .ac-comm-icon svg,
.dropdown-list-2 .icon-x-small svg {
  width: 14px !important;
  height: 14px !important;
  stroke: #0064ff !important;
  fill: none !important;
}

/* Breathing room between each icon chip and its label. */
.dropdown-list-2 .wrap-h-x-small {
  gap: 8px !important;
}

.dropdown-list-2 .integration-row {
  gap: 10px !important;
}

.dropdown-list-2 .dropdown-text-link {
  gap: 8px !important;
}

/* 7c. "من نحن" panel footer row. (1) The CTA label wrapped onto two stacked
   lines because the flex row squeezed it: keep it on one line and never let it
   shrink. (2) Hovering an icon chip kept the blue glyph (7b stroke) on the
   solid-blue hover fill, so it vanished: on hover/focus the chip is solid blue
   with a white glyph. Same selector weight as 7b, declared later, so it wins. */
.dropdown-card-xl .button-secondary-s,
.dropdown-card-xl .button-secondary-s div {
  white-space: nowrap !important;
}
.dropdown-card-xl .button-secondary-s {
  flex: none !important;
  width: auto !important;
}
.dropdown-card-xl .dropdown-block-small .integration-row {
  flex-wrap: nowrap !important;
}
.dropdown-card-xl .integration-row .caption {
  white-space: nowrap !important;
}
.dropdown-list-2 .ac-comm-icon:hover,
.dropdown-list-2 .ac-comm-icon:focus-visible {
  background: #0064ff !important;
  border-color: #0064ff !important;
  color: #ffffff !important;
}
.dropdown-list-2 .ac-comm-icon:hover svg,
.dropdown-list-2 .ac-comm-icon:focus-visible svg {
  stroke: #ffffff !important;
}
.dropdown-list-2 .button-secondary-s svg {
  stroke: #ffffff !important;
}



/* ==========================================================================
   Skip link
   --------------------------------------------------------------------------
   Every page now carries <a class="ac-skip-link"> as its first focusable
   element plus <main id="main-content"> as its target. The styles sit here
   rather than in ac-pages.css because this is the one stylesheet every page
   is guaranteed to load, so keyboard users get the same behaviour site-wide.
   Logical offsets keep the link inside the viewport in RTL.
   ========================================================================== */
.ac-skip-link {
  position: absolute;
  inset-block-start: -60px;
  inset-inline-start: 16px;
  z-index: 100000;
  padding: 10px 20px;
  background: #0064ff;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: inset-block-start 0.2s ease;
}

.ac-skip-link:focus,
.ac-skip-link:focus-visible {
  inset-block-start: 12px;
  outline: 2px solid #00d2ff;
  outline-offset: 2px;
}


/* ==========================================================
   MOBILE ACCESSIBILITY & TOUCH TARGET ENHANCEMENTS (WCAG 2.5.5 / 2.5.8)
   Ensures all interactive elements have at least 44x44px touch area
   ========================================================== */
@media (max-width: 991px) {
  /* Social icon links */
  .social-link-6,
  .div-block-181 a,
  .div-block-77-copy a {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
  }
  
  /* Skip link */
  .ac-skip-link {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* Popup close and links */
  .ac-popup-close-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Navigation & Footer touch targets */
  .nav-link-13,
  .uui-footer05_link-list a,
  .underline-link-block-copy-copy-2,
  .underline-link-block-copy-copy-copy-2 {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Mobile menu button */
  .w-nav-button {
    min-width: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 991px) {
  /* Filter buttons and pills */
  .lt-filter-pill,
  .filter-btn,
  .category-pill,
  .ac-slider-arrow {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Article TOC links on mobile */
  .toc-box a {
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    padding: 4px 0 !important;
  }
}


/* ==========================================================
   HIGH CONTRAST & WCAG 2.1 AA COMPLIANCE OVERRIDES
   ========================================================== */
.ac-hero-button--primary {
  color: #051329 !important;
  font-weight: 800 !important;
  background: #ffffff !important;
}

.ac-pillar-badge-num {
  color: #0047ab !important;
  font-weight: 800 !important;
}

.link-97 {
  text-decoration: underline !important;
}
