/*=====================================================================
  ZUDSC — site layer
  Loaded LAST, after style.css / responsive.css / color.css.

  Holds what the template could not: the accessibility layer, real
  bidirectional support, and the font wiring. Nothing here overrides
  template *design* — only its correctness gaps. Kept separate so the
  vendor CSS stays untouched and this file ports to Angular as the
  global stylesheet.
======================================================================*/

/*---------------------------------------------------------------
  1. Font
  style.css asks for `Cairo` in ~15 places but the family was never
  loaded anywhere — every glyph on the site was falling back. The
  @font-face lives in assets/fonts/cairo/cairo.css.
----------------------------------------------------------------*/
:root {
  --zudsc-font: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  --zudsc-focus: #0a58ca;
  --zudsc-focus-contrast: #ffffff;
}

body,
input, select, textarea, button {
  font-family: var(--zudsc-font);
}

/*---------------------------------------------------------------
  2. Language switch flicker guard
  Set by the inline <head> script only when the saved language is not
  the Arabic default, and cleared by i18n.js once the dictionary is
  applied. Wrapped in a no-JS guard so the page can never stay hidden.
----------------------------------------------------------------*/
html.i18n-pending body { visibility: hidden; }
html.no-js body { visibility: visible !important; }

/*---------------------------------------------------------------
  3. Skip link
  First focusable element on the page: lets keyboard and screen-reader
  users jump the header instead of tabbing the whole nav on every page.
----------------------------------------------------------------*/
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--zudsc-focus);
  color: var(--zudsc-focus-contrast);
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.15s ease-in-out;
}
.skip-link:focus {
  top: 0;
  color: var(--zudsc-focus-contrast);
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/*---------------------------------------------------------------
  4. Visible focus
  The template removed outlines without replacing them, so keyboard
  users had no cursor. :focus-visible keeps mouse clicks clean while
  restoring a ring for keyboard traversal.
----------------------------------------------------------------*/
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--zudsc-focus) !important;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Screen-reader-only text that still receives focus when tabbed to. */
.visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/*---------------------------------------------------------------
  5. Bidirectional support

  style.css faked RTL with `body { float: right; text-align: right; }`
  and no dir attribute. A floated body at width:100% sits outside normal
  flow, so on narrow viewports its content overhangs the viewport — and
  because `html,body{overflow-x:hidden}` is also set, the overhang was
  being CLIPPED rather than wrapped. That is why the hero heading and the
  service-card text lost their trailing letters on phones.

  <html dir="rtl"> now does this properly, so the hack is unwound here and
  the document mirrors natively. `text-align: start` resolves to right in
  RTL and left in LTR, which is what the bilingual build needs.
----------------------------------------------------------------*/
body {
  float: none;
  text-align: start;
}
/* Bootstrap's .float-left / .float-right are physical and do not mirror, which
   is what we want here: the topbar's visual arrangement is deliberate and
   already correct in both directions. Left intentionally untouched. */

/* Over-constrained absolute positioning.
   style.css sets `.sec-tl:before { right: 0 }` for the default (start-aligned)
   title, then `.sec-tl.text-center:before { left: 50% }` for centred ones —
   but never clears `right`. An absolutely positioned box with a width AND both
   offsets is over-constrained, and the spec resolves that by ignoring one of
   them based on `direction`: `right` loses in LTR, `left` loses in RTL. Under
   the old fake-RTL (no dir attribute) the document was technically LTR, so this
   happened to work. With dir="rtl" the decoration snapped to the right edge.
   Clearing the unused offset makes the centring direction-independent. */
.sec-tl.text-center::before { right: auto; left: 50%; }

/* Same float-based layout hack as body; harmless in LTR, mirrors wrong in RTL. */
.sec-tl { float: none; }

/* Directional chevrons: the footer link arrows were hardcoded to
   fa-angle-double-left, which points the wrong way in LTR. */
[dir="ltr"] .wdgt-bx ul li a .fa-angle-double-left::before { content: "\f101"; } /* right */
[dir="rtl"] .wdgt-bx ul li a .fa-angle-double-left::before { content: "\f100"; } /* left  */

/* The desktop nav hardcodes `direction: rtl` + `float: right` on the list
   itself (style.css ~596), so it forced RTL ordering even when the document is
   English — Home rendered last instead of first. Scope those to RTL only. */
[dir="ltr"] nav > div > ul { direction: ltr; float: left; }
[dir="ltr"] nav > div > ul li { float: left; }
[dir="ltr"] nav > div > ul li > a { text-align: left; }
[dir="ltr"] .rsnp-mnu,
[dir="ltr"] .rsnp-mnu ul,
[dir="ltr"] .rsnp-mnu ul li,
[dir="ltr"] .rsnp-mnu ul li a,
[dir="ltr"] .rspn-mnu-cls { direction: ltr; text-align: left; }
[dir="ltr"] .rsnp-mnu > ul > li a { padding-right: 0; padding-left: 15px; }
[dir="ltr"] .rspn-mnu-cls { right: auto; left: 12px; }

/* Breadcrumb.
   style.css floats the items `left` inside an inline-block <ol>, which is why
   the markup had to be authored backwards (Contact then Home) to look right.
   Now the trail is authored in logical order (Home > Contact) and laid out with
   flex, so direction alone mirrors it. The separator was also hardcoded to "<",
   which is correct in RTL but points the wrong way in English. */
.pg-tp-wrp ol.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
ol.breadcrumb > li.breadcrumb-item { float: none; }
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { content: "<"; }
[dir="ltr"] .breadcrumb-item + .breadcrumb-item::before { content: ">"; }

/*---------------------------------------------------------------
  5b. Hero heading
  The hero was an <h2>, so every page's outline started at level 2 and
  the site had no <h1> at all. It is an <h1> now — but style.css hangs
  the hero's entire look off `.featured-cap > h2`, so the promoted
  heading fell through to the generic `h1 { color:#222 }` and lost its
  white/shadow treatment. Re-attach the same styling to h1.

  The template hard-coded <br> to wrap this heading. That does not
  survive translation (English breaks at different words), so the line
  break comes from a max-width instead and each language wraps naturally.
----------------------------------------------------------------*/
/* responsive.css steps `.featured-cap > h2` down to 40px on small screens; the
   promoted h1 matched none of those rules and stayed at 50px, overflowing a
   390px viewport — where `html,body{overflow-x:hidden}` silently clipped it.
   clamp() scales fluidly across every width instead of re-declaring the
   template's breakpoints here. */
.featured-cap > h1 {
  margin: 0 auto;
  max-width: 15ch;
  color: #fff;
  font-weight: 700;
  font-size: clamp(24px, 5vw, 50px);
  line-height: 1.4;
  text-shadow: 5px 8px 6px black;
}

/*---------------------------------------------------------------
  6. Media
  Stops the gallery and hero from pushing the page sideways on phones.
----------------------------------------------------------------*/
img, iframe { max-width: 100%; }
img { height: auto; }
.wdgt-bx iframe { width: 100%; border: 0; aspect-ratio: 4 / 3; height: auto; }

/* Contact-page map: an iframe embed replaces the JS Maps API entirely. */
.cnt-mp-wrap iframe {
  width: 100%;
  border: 0;
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 6px;
}

/*---------------------------------------------------------------
  6b. Off-canvas drawer

  style.css declares `.rsnp-mnu { position: static; visibility: hidden;
  opacity: 0 }` while `.rsnp-mnu.slidein` sets `right: 0`. An offset does
  nothing on a static element, so the drawer never actually slid — and,
  being static, it stayed in normal flow even while invisible, reserving
  ~330px of blank space above the hero on every phone-width page load.
  That is the white band under the mobile header.

  Restored to a real off-canvas panel: fixed, translated out, slid back on
  .slidein. It enters from the inline-end edge, so it follows the language
  direction rather than being pinned to the right.
----------------------------------------------------------------*/
.rspn-hdr { float: none; }

.rsnp-mnu {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  transition: transform 0.3s ease;
}
[dir="rtl"] .rsnp-mnu { right: 0; left: auto; transform: translateX(100%); }
[dir="ltr"] .rsnp-mnu { left: 0; right: auto; transform: translateX(-100%); }
.rsnp-mnu.slidein { transform: translateX(0); }

/* The drawer holds focus while open, so it must not be reachable when closed. */
.rsnp-mnu:not(.slidein) { visibility: hidden; }
.rsnp-mnu.slidein { visibility: visible; opacity: 1; }

/*---------------------------------------------------------------
  7. Accessible submenu trigger
  The drawer's expanding parents are <button> now, not <a href="#">.
  Strip the UA button chrome so they inherit the template's link look.
----------------------------------------------------------------*/
.rsnp-mnu .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: 0;
  padding: inherit;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.rsnp-mnu .submenu-toggle .fa-angle-down { transition: transform 0.2s ease; }
.rsnp-mnu li.active > .submenu-toggle .fa-angle-down { transform: rotate(180deg); }

/*---------------------------------------------------------------
  8. Reduced motion
  Respect the OS setting — doubly warranted on a site whose audience
  includes users with vestibular and attention-related disabilities.
----------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .preloader { display: none !important; }
}

/*---------------------------------------------------------------
  9. Print
----------------------------------------------------------------*/
@media print {
  .preloader, .topbar, .rspn-hdr, .rsnp-mnu, .skip-link,
  header nav, .featured-area-wrap, footer iframe { display: none !important; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/*=====================================================================
  10. Page components added with the new pages
  Tables, forms, file lists, notices. The template shipped none of these
  in an accessible form, so they are authored here rather than reusing
  its demo markup.
======================================================================*/

/*---- Editor notice: visible placeholder warning, removed at go-live ----*/
.zudsc-notice {
  border-inline-start: 5px solid #e0a800;
  background: #fff8e1;
  padding: 14px 18px;
  border-radius: 4px;
  margin-bottom: 30px;
}
.zudsc-notice p { margin: 0; color: #5c4600; font-size: 15px; }
.zudsc-notice code { background: #00000010; padding: 1px 5px; border-radius: 3px; }

/*---- Aside widget on light pages ----*/
.zudsc-aside {
  background: #f7f7f7;
  padding: 25px;
  border-radius: 6px;
}
.zudsc-aside h2 { color: #222; }
.zudsc-aside p { font-size: 15px; }
.zudsc-aside ul { list-style: none; padding: 0; margin: 0; }
.zudsc-aside ul li a { color: #444; font-size: 15px; }
.zudsc-aside ul li a:hover { color: #000; }
.zudsc-aside ul li i { margin-inline-end: 8px; }

/*---- Ordered steps ----*/
.zudsc-steps { padding-inline-start: 20px; }
.zudsc-steps > li { color: #555; font-size: 16px; line-height: 30px; margin-bottom: 8px; }

/* style.css sets `ul li, ol li { color:#669900 }` — bright green body text at
   14px, which fails contrast for long-form reading. Scope list text back to the
   same colour as <p> on the content pages. */
.abt-desc ul > li,
.abt-desc ol > li { color: #555; font-size: 16px; line-height: 30px; }

/*---- Data table ----*/
/* Wrapper scrolls on its own so a wide table never makes the whole page
   scroll sideways. tabindex + role make it keyboard-scrollable, which a
   pointer-free user needs to reach the far columns. */
.zudsc-table-wrap {
  overflow-x: auto;
  border: 1px solid #e4e4e4;
  border-radius: 6px;
}
.zudsc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.zudsc-table caption {
  caption-side: top;
  text-align: start;
  padding: 14px 16px;
  font-weight: 600;
  color: #222;
}
.zudsc-table th,
.zudsc-table td {
  padding: 12px 16px;
  text-align: start;
  border-bottom: 1px solid #ededed;
  font-size: 15px;
  color: #555;
  line-height: 1.7;
}
.zudsc-table thead th {
  background: #f3f3f3;
  color: #222;
  font-weight: 700;
  white-space: nowrap;
}
.zudsc-table tbody th[scope="row"] { font-weight: 600; color: #222; }
.zudsc-table tbody tr:hover { background: #fafafa; }
.zudsc-table tbody tr:last-child th,
.zudsc-table tbody tr:last-child td { border-bottom: 0; }

/*---- File list ----*/
.zudsc-file-list { list-style: none; padding: 0; margin: 0; }
.zudsc-file-list > li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid #e9e9e9;
  border-radius: 6px;
  margin-bottom: 12px;
  background: #fff;
}
.zudsc-file-list > li > i { font-size: 30px; line-height: 1.3; color: #c0392b; flex: 0 0 auto; }
.zudsc-file-list > li .fa-file-word { color: #2a5699; }
.zudsc-file-list > li .fa-file-alt { color: #555; }
.zudsc-file-list h2 { margin: 0 0 4px; }
.zudsc-file-list p { margin: 0; font-size: 15px; }
.zudsc-file-meta { font-weight: 400; font-size: 14px; color: #777; }

/*---- Course card ----*/
.zudsc-course {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 6px;
  padding: 24px;
  height: 100%;
  margin-bottom: 24px;
}
.zudsc-course h3 { font-size: 20px; margin-bottom: 12px; }
.zudsc-course p { font-size: 15px; margin: 0; }
.zudsc-course-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0 0 14px;
  font-size: 14px;
}
.zudsc-course-meta dt { color: #888; font-weight: 600; }
.zudsc-course-meta dd { margin: 0; color: #444; }

/*=====================================================================
  11. Forms
======================================================================*/
.zudsc-form-wrap {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  padding: 34px;
  border-radius: 8px;
}
.zudsc-required-note { font-size: 14px; color: #666; margin-bottom: 22px; }
.zudsc-req { color: #c0392b; font-weight: 700; }

.zudsc-field { margin-bottom: 22px; }
.zudsc-field > label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  color: #222;
  font-size: 15px;
}
.zudsc-field input[type="text"],
.zudsc-field input[type="email"],
.zudsc-field input[type="tel"],
.zudsc-field input[type="file"],
.zudsc-field select,
.zudsc-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  background: #fff;
}
.zudsc-field textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.zudsc-field select { appearance: auto; }

/* Error state is marked with colour AND a border weight change AND an icon in
   the message text — colour alone fails WCAG 1.4.1 for colour-blind users. */
.zudsc-field [aria-invalid="true"] {
  border-color: #c0392b;
  border-width: 2px;
  background: #fff6f5;
}
.zudsc-error {
  margin: 6px 0 0;
  color: #a5281b;
  font-size: 14px;
  font-weight: 600;
}
.zudsc-error::before { content: "\26A0"; margin-inline-end: 6px; }
.zudsc-hint { margin: 6px 0 0; color: #6b6b6b; font-size: 13.5px; line-height: 1.6; }

.zudsc-field-check { display: flex; align-items: flex-start; gap: 10px; }
.zudsc-field-check input { margin-top: 5px; flex: 0 0 auto; width: 18px; height: 18px; }
.zudsc-field-check label { font-weight: 400; margin: 0; font-size: 15px; }

/*---- Error summary ----*/
/* Focused on submit so a screen reader announces the whole list at once, and
   every entry links to its field. Without this, a blind user submitting a
   14-field form is told only "invalid" with no way to find where. */
.zudsc-error-summary {
  border: 2px solid #c0392b;
  background: #fff6f5;
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 26px;
}
.zudsc-error-summary:focus-visible { outline: 3px solid var(--zudsc-focus); outline-offset: 2px; }
.zudsc-error-summary-title { font-weight: 700; color: #a5281b; margin: 0 0 8px; }
.zudsc-error-summary ul { margin: 0; padding-inline-start: 20px; }
.zudsc-error-summary li { color: #a5281b; font-size: 15px; line-height: 1.9; }
.zudsc-error-summary a { color: #a5281b; text-decoration: underline; }

.zudsc-form-notice {
  border: 2px solid #2e7d32;
  background: #f1f8f2;
  color: #1b5e20;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 26px;
  font-weight: 600;
}

@media (max-width: 575px) {
  .zudsc-form-wrap { padding: 20px; }
  .zudsc-file-list > li { flex-direction: column; gap: 8px; }
}

/*---------------------------------------------------------------
  12. Physical -> logical offsets in template list markup

  style.css positions the .abt-desc bullets with `left: 0` and pads the
  item with `padding-left: 20px`. Both are physical, so under real RTL the
  text moved to the right edge while the bullet stayed pinned to the left —
  leaving each dot stranded a third of the page away from its sentence.
  Logical equivalents track the direction instead.
----------------------------------------------------------------*/
.abt-desc { float: none; }

.abt-desc > ul > li {
  float: none;
  padding-left: 0;
  padding-inline-start: 20px;
}
.abt-desc > ul > li::before {
  left: auto;
  right: auto;
  inset-inline-start: 0;
}

/*---------------------------------------------------------------
  13. Desktop menu on one line

  style.css lays the top-level items out as floated <li>s with a fixed
  20px gap on BOTH sides of every item and a 96.7px line-height. That
  spacing was tuned for the template's short English labels; with this
  site's longer Arabic ones the row runs past the 100%-150px it is given
  and the last item drops onto a second line — which also doubled the
  header height and pushed the hero down.

  The fix is to lay the row out as flex with a single shared gap (not two
  margins), keep each label unbreakable, and let the gap shrink on narrower
  desktops instead of wrapping. Below 992px the template swaps to the
  mobile drawer, so none of this applies there.
----------------------------------------------------------------*/
@media (min-width: 992px) {
  header.style3 nav > div > ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(4px, 1.2vw, 20px);
    float: none;
  }
  header.style3 nav > div > ul > li,
  header.style3 nav > div > ul > li + li {
    float: none;
    margin-left: 0;
    margin-right: 0;
  }
  /* A label that wraps mid-word is what turned one long item into two
     rows; keep every top-level label on a single line. */
  header.style3 nav > div > ul > li > a {
    white-space: nowrap;
    padding: 0 clamp(2px, 0.5vw, 10px);
    font-size: clamp(13px, 1.05vw, 16px);
  }
  /* The submenu is absolutely positioned, so it must not inherit nowrap
     or the dropdown items stretch to the width of their longest label. */
  header.style3 nav > div > ul > li ul li a {
    white-space: normal;
  }
}

/*---------------------------------------------------------------
  14. Statistics page — summary cards, bar charts, tabs

  The charts are HTML, not canvas. A <canvas> chart is an empty box to a
  screen reader and would need an external charting script the site does
  not load, so every bar here is a real element whose label and figure are
  in the text. Bars are sized by inline width only; everything else is
  here so the same markup reads correctly in both directions.
----------------------------------------------------------------*/
.zudsc-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 26px;
}
.zudsc-stat-card {
  background: #fff;
  border: 1px solid #e4e8e0;
  border-radius: 12px;
  padding: 20px 18px;
  text-align: center;
}
.zudsc-stat-num {
  display: block;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--zudsc-brand, #46801b);
}
.zudsc-stat-lbl { display: block; margin-top: 6px; font-size: 14px; color: #6b746a; }

.zudsc-chart {
  margin: 0 0 28px;
  background: #fff;
  border: 1px solid #e4e8e0;
  border-radius: 12px;
  padding: 20px;
}
.zudsc-chart figcaption { margin-bottom: 14px; }
.zudsc-chart-title { display: block; font-weight: 700; font-size: 17px; }
.zudsc-chart-sub { display: block; font-size: 13px; color: #6b746a; margin-top: 2px; }

.zudsc-bars { list-style: none; margin: 0; padding: 0; }
.zudsc-bars > li {
  display: grid;
  /* label | bar | figure. The bar column takes the slack so bars of
     different rows share one baseline and stay comparable. */
  grid-template-columns: minmax(120px, 34%) 1fr minmax(84px, auto);
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f2ed;
}
.zudsc-bars > li:last-child { border-bottom: 0; }
.zudsc-bar-label { font-size: 14px; font-weight: 600; }
.zudsc-bar-track {
  display: block;
  background: #f0f2ed;
  border-radius: 999px;
  height: 16px;
  overflow: hidden;
}
.zudsc-bar-fill {
  display: block;
  height: 100%;
  min-width: 3px;              /* a count of 1 must still be visible */
  border-radius: 999px;
  background: linear-gradient(90deg, #46801b, #6aa832);
}
.zudsc-bar-value { font-size: 14px; text-align: end; white-space: nowrap; }
.zudsc-bar-share { color: #6b746a; font-size: 12px; margin-inline-start: 6px; }

.zudsc-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 20px;
}

/* --- Tabs. Unenhanced (no JS) the panels are plain stacked sections and the
   tablist is hidden, because buttons that cannot switch anything are worse
   than no buttons at all. --- */
.zudsc-tabs { margin-top: 26px; }
.zudsc-tabs .zudsc-tablist { display: none; }
.zudsc-tabs.is-enhanced .zudsc-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid #e4e8e0;
  margin-bottom: 22px;
}
.zudsc-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: #3c4a33;
  padding: 11px 20px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  margin-bottom: -2px;
}
.zudsc-tab:hover { background: #f4f6f1; }
.zudsc-tab.is-active {
  background: #fff;
  border-color: #e4e8e0;
  border-bottom: 2px solid #fff;
  color: var(--zudsc-brand, #46801b);
}
.zudsc-tabpanel:focus-visible { outline: 3px solid var(--zudsc-focus, #1f6feb); outline-offset: 4px; }
/* Separates the stacked panels when tabs are not active (no-JS fallback). */
.zudsc-tabs:not(.is-enhanced) .zudsc-tabpanel + .zudsc-tabpanel { margin-top: 40px; }

@media (max-width: 600px) {
  .zudsc-bars > li { grid-template-columns: 1fr auto; }
  /* On a phone the bar is dropped rather than squeezed to a stub: the label
     and the figure carry the information, and a 20px bar carries none. */
  .zudsc-bar-track { display: none; }
  .zudsc-stat-num { font-size: 25px; }
}

/*---------------------------------------------------------------
  15. Dropdown of the LAST top-level menu item

  style.css pins every submenu with `left: 0`, which is fine while the item
  with children sits in the middle of the bar. "اتصل بنا" is the last item,
  so in the English (LTR) layout it sits at the right end and a 230px panel
  opening rightwards runs past the container edge. Anchoring the last item's
  submenu to its own inline-end keeps it on screen in both directions.
----------------------------------------------------------------*/
@media (min-width: 992px) {
  header.style3 nav > div > ul > li:last-child > ul {
    left: auto;
    right: auto;
    inset-inline-end: 0;
  }
}

/*---------------------------------------------------------------
  16. Document cards — "سياسات وكتيبات"

  A card per publication rather than the flat list the downloads page uses:
  there are a dozen of them, the titles are long, and each carries two
  actions. Everything is logical-direction (inset-inline / margin-inline)
  so the same markup lays out correctly in Arabic and English.

  Card heights are equalised by the grid, not by a fixed height, and the
  actions are pinned to the bottom with margin-block-start:auto so titles
  of different lengths still line their buttons up.
----------------------------------------------------------------*/
.zudsc-doc-group { margin-top: 46px; }
.zudsc-doc-group:first-of-type { margin-top: 34px; }

.zudsc-doc-group-title {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
  padding-inline-start: 14px;
  border-inline-start: 5px solid var(--zudsc-brand, #46801b);
  line-height: 1.6;
}

.zudsc-doc-grid {
  display: grid;
  /* auto-fill, not auto-fit: a group with a single document keeps a card-sized
     card instead of one stretched across the full container width. */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.zudsc-doc {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e4e8e0;
  border-radius: 12px;
  padding: 22px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
/* :focus-within so a keyboard user tabbing onto a button gets the same
   "this card is live" feedback a mouse user gets on hover. */
.zudsc-doc:hover,
.zudsc-doc:focus-within {
  border-color: #cfdcc2;
  box-shadow: 0 6px 20px rgba(70, 128, 27, 0.10);
}

.zudsc-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.zudsc-doc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #fdeceb;
  color: #c0392b;
  font-size: 22px;
  flex: 0 0 auto;
}
/* The annex number staff cite these documents by ("مرفق (١٤)"). */
.zudsc-doc-annex {
  font-size: 13px;
  font-weight: 700;
  color: #4c5a41;
  background: #eef3e8;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.zudsc-doc-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.75;
  color: #222;
  margin: 0 0 8px;
}
.zudsc-doc-sum {
  font-size: 14.5px;
  line-height: 1.9;
  color: #5f6b58;
  margin: 0 0 14px;
}

.zudsc-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #7b8475;
  margin: 0 0 18px;
}
.zudsc-doc-type {
  font-weight: 700;
  color: #c0392b;
  letter-spacing: 0.4px;
}

/* margin-block-start:auto pushes the row to the card's bottom edge whatever
   the title above it wrapped to. */
.zudsc-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: auto;
  padding-block-start: 4px;
}
.zudsc-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--zudsc-brand, #46801b);
  background: var(--zudsc-brand, #46801b);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.zudsc-doc-btn:hover,
.zudsc-doc-btn:focus { background: #3a6b16; border-color: #3a6b16; color: #fff; }
.zudsc-doc-btn.is-ghost { background: transparent; color: #3a6b16; }
.zudsc-doc-btn.is-ghost:hover,
.zudsc-doc-btn.is-ghost:focus { background: #eef3e8; color: #2f5511; border-color: #3a6b16; }
/* Icons are decorative — the text beside them carries the meaning. */
.zudsc-doc-btn i { font-size: 13px; }

.zudsc-doc-missing {
  margin: auto 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #a5281b;
}

@media (max-width: 480px) {
  .zudsc-doc-grid { grid-template-columns: 1fr; }
  /* Full-width stacked buttons: side by side they wrap to two lines anyway
     and end up with different widths, which reads as a broken layout. */
  .zudsc-doc-btn { flex: 1 1 100%; justify-content: center; }
}
