/* Generated by src/build.js (rtlcss) from css/components/arabic-page.css — LTR version, do not edit: edit css/components/arabic-page.css and rebuild */
/* ==========================================================================
   arabic-page.css — arabic materials page: hero background + page head
   (breadcrumb, title, category tabs) and the filterable list (filter bar,
   card grid, partner banners, pagination).
   Card + grid styles live in css/components/materials.css (.mcard, .mgrid).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero background — starts at the top of the page, behind the sticky header
   -------------------------------------------------------------------------- */
.ap-hero {
  position: relative;
  margin-top: -88px;
  padding-top: 88px;
  background: linear-gradient(-180deg, var(--color-cream-200) 0%, var(--color-sky-50) 55%, var(--color-white) 100%);
}

/* --------------------------------------------------------------------------
   Page head
   -------------------------------------------------------------------------- */
.ap-head {
  position: relative;
  overflow-x: clip;
}

.ap-head__pattern {
  position: absolute;
  z-index: 0;
  bottom: -60px;
  right: -80px;
  width: 380px;
  height: auto;
  opacity: 0.06;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 100%);
}

.ap-head__in {
  position: relative;
  max-width: var(--cw, 1180px);
  margin: 0 auto;
  padding: var(--page-head-space) 24px; /* equal space above and below (css/base.css) */
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

@media (max-width: 640px) {
  .ap-head__in {
    padding: var(--page-head-space) 16px;
  }
}

/* Breadcrumb */
.ap-crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--color-ink-500);
}

.ap-crumbs__link {
  color: var(--color-blue-500);
  font-weight: 700;
  text-decoration: none;
}

/* Title */
.ap-head__title {
  margin: 0;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-weight: 800;
  font-size: var(--fs-page-title);
  line-height: 1.2;
  color: var(--color-navy-700);
}

.ap-head__accent {
  color: var(--color-blue-500);
}

/* Category tabs (الكل / تعلّم دينك / تعرّف على الإسلام) */
.ap-cats {
  margin-top: 10px;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 999px;
}

.ap-cats__tab {
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--color-navy-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.ap-cats__tab:hover {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}

.ap-cats__tab[aria-selected="true"] {
  background: var(--color-blue-500);
  color: var(--color-white);
}

@media (max-width: 760px) {
  .ap-cats {
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
  }

  .ap-cats__tab {
    flex: 1 1 0;
  }
}

@media (max-width: 560px) {
  .ap-cats__tab {
    padding: 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  .ap-cats {
    gap: 6px;
  }

  .ap-cats__tab {
    flex: 1 1 auto;
    padding: 0 8px;
  }
}

/* Mobile link to the guidance section (under the category tabs) */
.ap-glink {
  display: none;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--color-blue-500);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.ap-glink svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-glink:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 760px) {
  .ap-glink {
    display: inline-flex;
    margin-top: -4px;
  }
}

/* --------------------------------------------------------------------------
   List section
   -------------------------------------------------------------------------- */
.ap-list {
  background: var(--color-mist-100);
}

/* No bottom padding: the guidance section that follows (guide--fp) continues this background */
.ap-list__wrap {
  max-width: var(--cww, 1320px);
  margin: 0 auto;
  padding: 48px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 900px) {
  .ap-list__wrap {
    padding-top: 40px;
  }
}

@media (max-width: 640px) {
  .ap-list__wrap {
    padding-top: 20px;
  }
}

@media (max-width: 400px) {
  .ap-list__wrap {
    padding-right: 12px;
    padding-left: 12px;
  }
}

.ap-list__shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ap-list__inner,
.ap-list__cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ≤350px the card link drops its arrow on this page */
@media (max-width: 350px) {
  .ap-list .mcard__link svg {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */
.ap-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

/* Type tabs */
.ap-types {
  --tpx: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 4px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 999px;
}

.ap-types__tab {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--color-navy-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.ap-types__tab svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-types__tab:hover {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}

.ap-types__tab[aria-selected="true"] {
  background: var(--color-blue-500);
  color: var(--color-white);
}

.ap-types__tab[aria-selected="true"] svg {
  stroke: var(--color-white);
}

/* Tools: guidance jump · search */
.ap-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ap-jump {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 18px;
  box-sizing: border-box;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--color-blue-500);
  color: var(--color-blue-500);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.ap-jump svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-jump svg:last-child {
  transition: transform .25s ease;
}

.ap-jump:hover {
  background: var(--color-blue-500);
  color: var(--color-white);
}

/* Mobile search toggle */
.ap-sbtn {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.ap-sbtn svg,
.ap-search > svg {
  flex: none;
  fill: none;
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-sbtn svg {
  display: block;
}

/* Search field */
.ap-search {
  width: 260px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  box-sizing: border-box;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 999px;
}

.ap-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-navy-700);
}

.ap-search__close {
  display: none;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: var(--color-blue-100);
  color: var(--color-blue-500);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.ap-search__close svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* Filter bar — medium screens: tools share the row with the tabs */
@media (max-width: 1100px) and (min-width: 761px) {
  .ap-tools {
    flex: 1 1 380px;
    flex-wrap: nowrap;
  }

  .ap-search {
    flex: 1;
    width: auto;
  }
}

@media (max-width: 560px) {
  .ap-search {
    padding: 0 12px;
    gap: 8px;
  }

  .ap-search__input {
    font-size: 14px;
  }
}

/* Filter bar — small screens: the type tabs keep their pill bar (as on wide
   screens and on the home page), beside a search button as tall as the bar
   that swaps the tabs for the search field (.is-search-open). Equal tabs,
   their icons only where they fit (above 520px). */
@media (max-width: 760px) {
  .ap-bar {
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .ap-tools {
    order: -1;
    width: auto;
    flex: none;
    flex-wrap: nowrap;
    gap: 0;
  }

  .ap-jump,
  .ap-search {
    display: none;
  }

  .ap-search {
    flex: 1;
    width: auto;
  }

  .ap-sbtn {
    display: inline-flex;
    width: 48px;
    height: 48px;
  }

  .ap-search__close {
    display: inline-flex;
  }

  .ap-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }

  .ap-types {
    --tpx: 12px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .ap-types__tab {
    flex: 1 1 0;
    min-width: max-content;
    padding: 0 var(--tpx);
    justify-content: center;
    box-sizing: border-box;
  }

  /* search open */
  .ap-bar.is-search-open .ap-types,
  .ap-bar.is-search-open .ap-sbtn {
    display: none;
  }

  .ap-bar.is-search-open .ap-tools {
    flex: 1 1 auto;
  }

  .ap-bar.is-search-open .ap-search {
    display: flex;
    width: 100%;
    height: 48px;
    padding: 0 9px 0 14px;
    animation: apSearchIn .22s ease;
  }
}

@media (max-width: 520px) {
  .ap-types {
    --tpx: 8px;
  }

  .ap-types__tab {
    gap: 0;
  }

  .ap-types__tab svg {
    display: none;
  }
}

@media (max-width: 420px) {
  .ap-bar {
    gap: 6px;
  }

  .ap-types {
    --tpx: 6px;
  }
}

@media (max-width: 360px) {
  .ap-bar {
    gap: 5px;
  }

  .ap-types {
    --tpx: 4px;
    padding: 3px;
  }

  .ap-types__tab {
    font-size: 13px;
  }

  .ap-sbtn {
    width: 46px;
    height: 46px;
  }

  .ap-bar.is-search-open .ap-search {
    height: 46px;
  }
}

@keyframes apSearchIn {
  from {
    opacity: 0;
    transform: scaleX(.6);
    transform-origin: left;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-bar.is-search-open .ap-search {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Partner banners inside the card grid, across a whole row — the same blue
   box «مواقع أخرى» as on the other pages (css/components/partner-banners.css).
   -------------------------------------------------------------------------- */
.ap-bnrs {
  grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Empty result + pagination
   -------------------------------------------------------------------------- */
.ap-empty {
  margin: 0;
  padding: 32px 0;
  text-align: center;
  font-size: 15px;
  color: var(--color-ink-500);
}

.ap-pages {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 0 4px;
}

.ap-pages__arrow,
.ap-pages__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.ap-pages__arrow {
  box-sizing: border-box;
  border: 1px solid var(--color-blue-500);
  background: var(--color-white);
}

.ap-pages__arrow svg {
  fill: none;
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ap-pages__arrow[aria-disabled="true"] {
  border-color: var(--color-mist-200);
  opacity: 0.45;
  cursor: default;
}

.ap-pages__arrow:focus-visible,
.ap-pages__num:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 117, 150, .25);
}

.ap-pages__num {
  color: var(--color-navy-700);
  font-weight: 700;
  font-size: 15px;
}

.ap-pages__num:hover {
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}

.ap-pages__num[aria-current="page"] {
  background: var(--color-blue-500);
  color: var(--color-white);
  font-weight: 800;
}

.ap-pages__gap {
  color: var(--color-ink-400);
}
