/* ---------------------------------------------------------------- committees index (لجان الوزارة.jpg) */

.committee-figures { padding-block: var(--sp-6) var(--sp-7); border-bottom: 4px solid var(--gold); }
.committee-figures__list { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.committee-figures__unit { font-size: var(--fs-ui); font-weight: 700; }

.committee-list { padding-block: var(--sp-8) var(--sp-9); background: var(--selected-bg); }
.committee-list__inner { max-width: 1440px; margin-inline: auto; padding-inline: var(--sp-5); }
.committee-list__title { margin-bottom: var(--sp-8); font-size: var(--fs-h2); font-weight: 800; line-height: var(--lh-heading); }
.committee-cards {
  display: grid; grid-template-columns: minmax(0, 400fr) minmax(0, 477fr) minmax(0, 400fr); gap: var(--sp-9) var(--sp-7); list-style: none;
}
.committee-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column; padding: var(--sp-5) var(--sp-5) var(--sp-6);
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.committee-card::before { /* the gold sports pattern drawn on the cards, at 4 % */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .04;
  background: url("../core/img/pattern-sports-gold.7e6ab857a03f.webp") no-repeat -44px -26px / 586px 401px;
}
.committee-card__name { padding-block: var(--sp-6) var(--sp-3); font-size: var(--fs-h3); font-weight: 800; line-height: var(--lh-heading); }
.committee-card__meta { display: flex; align-items: center; min-height: 35px; color: var(--gold-strong); font-size: var(--fs-small); font-weight: 700; line-height: 14px; }
.committee-card__summary { margin-top: var(--sp-2); color: var(--text-3); font-size: var(--fs-ui); line-height: var(--lh-body); }
.committee-card__link { color: inherit; } /* the name's link covers the card, without the drawn «عرض التفاصيل» (R-6, R-51) */
.committee-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.committee-card__link:focus-visible { outline: none; box-shadow: none; }

/* hover / keyboard focus: the shared card hover (a gold edge and a raised shadow; nothing moves) */
.committee-card:hover, .committee-card:focus-within { border-color: var(--gold); box-shadow: var(--shadow-raised); }
.committee-card:hover .committee-card__link { color: var(--gold-strong); }
.committee-card:has(.committee-card__link:focus-visible) { outline: 2px solid var(--gold-strong); outline-offset: 2px; }

@media (max-width: 1100px) {
  .committee-list__inner { padding-inline: var(--gutter); }
  .committee-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-7) var(--sp-5); }
}
@media (max-width: 640px) {
  .committee-list { padding-block: var(--sp-7) var(--sp-8); }
  .committee-list__title { margin-bottom: var(--sp-6); font-size: var(--fs-h2); }
  .committee-cards { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
}
@media (prefers-reduced-motion: reduce) { .committee-card { transition: none; } }

/* ---------------------------------------------------------------- committee page (Figma 896:193749) */

.committee { padding-top: var(--sp-7); }
.committee__title {
  display: flex; align-items: center; max-width: 1322px; min-height: 170px; margin: 0 auto var(--sp-8); padding: 0;
  color: var(--gold-strong); font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-heading);
}
.committee-sections { display: grid; gap: var(--sp-5); max-width: 1284px; margin-inline: auto; }
.committee-section { border-top: 5px solid var(--gold); border-radius: var(--r-sm); background: var(--selected-bg); }  /* one cream for the three sections (896:193749) */
.committee-section--tasks { padding-bottom: var(--sp-7); background: var(--selected-bg); }
.committee-section--goals { padding-bottom: var(--sp-7); }
.committee-section__head {
  display: flex; justify-content: space-between; align-items: flex-start; min-height: 100px; margin-inline: var(--sp-7); list-style: none; cursor: pointer;
}
.committee-section__head::-webkit-details-marker { display: none; }
.committee-section--tasks .committee-section__head, .committee-section--goals .committee-section__head { align-items: center; margin-inline: var(--sp-7); }
.committee-section--tasks .committee-section__head { margin-top: var(--sp-6); }
.committee-section--about { padding-block: var(--sp-4) var(--sp-5); }
.committee-section__title { font-size: var(--fs-h2); font-weight: 800; line-height: var(--lh-heading); min-height: 73px; display: flex; align-items: center; }
.committee-section--tasks .committee-section__title, .committee-section--goals .committee-section__title { font-weight: 700; }
.committee-section[open] > :not(summary) { animation: rise-in var(--dur-slow) var(--ease); }
.committee-section:not([open]) .committee-section__toggle .icon { transform: rotate(90deg); }
[dir="ltr"] .committee-section:not([open]) .committee-section__toggle .icon { transform: rotate(-90deg); }
.committee-section__text { max-width: 1164px; margin: var(--sp-1) auto 0; padding-top: var(--sp-2); color: var(--text); font-size: var(--fs-lead); line-height: var(--lh-body); text-align: start; }
.committee-section__list { display: grid; gap: var(--sp-4); margin-top: var(--sp-5); list-style: none; }
.committee-item { /* the same size as the section's paragraph, as in the committee frame */
  display: flex; align-items: baseline; gap: var(--sp-3); max-width: 1164px; margin-inline: auto; width: 100%;
  color: var(--text); font-size: var(--fs-lead); line-height: var(--lh-body);
}
.committee-item::before { /* the gold triangle drawn before each item */
  content: ""; flex: none; width: 16px; height: 18px; margin-inline-end: var(--sp-1); transform: translateY(1px);
  background: linear-gradient(119.76deg, var(--gold) 28.49%, #94631B 177.98%); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
[dir="rtl"] .committee-item::before { clip-path: polygon(0 0, 100% 50%, 0 100%); }
[dir="ltr"] .committee-item::before { clip-path: polygon(100% 0, 0 50%, 100% 100%); }

/* members under an 8 px gold rule: three a row 431.5 px apart, the last two 384 px apart (Figma 896:193749) */
.committee-members { margin-top: var(--sp-6); padding: var(--sp-8) 0 var(--sp-7); border-top: 8px solid var(--gold); }
.committee-members__title { max-width: 1440px; margin: 0 auto; padding: var(--sp-5) var(--sp-9) 0; font-size: var(--fs-h2); font-weight: 800; line-height: var(--lh-heading); }
.committee-members__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-6); max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); list-style: none; }
.member {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--sp-6); width: 294px; min-height: 485px; padding: 0;
  background: transparent; border: 0; border-radius: var(--r-lg); text-align: center; cursor: default;
}
.members-enhanced .member { cursor: pointer; }
.member__photo {
  display: block; width: 294px; aspect-ratio: 1; overflow: hidden; border-radius: 50%; flex: none;
  background: #fff; box-shadow: inset 0 0 0 2px var(--border); color: #828896;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__placeholder { width: 100%; height: 100%; fill: currentColor; }
.member__name { font-size: var(--fs-h3); font-weight: 800; line-height: var(--lh-heading); }
.member__role { margin-top: -5px; color: var(--text-3); font-size: var(--fs-h4); font-weight: 700; line-height: var(--lh-heading); }
/* The hovered member as drawn: a 389 × 485 cream card in a 4 px gold frame, the photo on a brown disc. */
.members-enhanced .member:hover, .member:focus-visible {
  position: relative; isolation: isolate; width: 389px; margin-inline: -48px; justify-content: flex-start; gap: var(--sp-7); padding-top: var(--sp-6);
  background: var(--selected-bg); box-shadow: inset 0 0 0 4px var(--gold); overflow: hidden;
}
.members-enhanced .member:hover::before, .member:focus-visible::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09; background: url("../core/img/pattern-sports-gold.7e6ab857a03f.webp") no-repeat -2px 0 / auto 485px;
}
.members-enhanced .member:hover .member__photo, .member:focus-visible .member__photo { background: var(--gold-strong); box-shadow: none; color: #fff; }
.members-enhanced .member:hover .member__placeholder circle:first-child, .member:focus-visible .member__placeholder circle:first-child { cy: 32px; r: 19px; }
.members-enhanced .member:hover .member__placeholder circle:last-child, .member:focus-visible .member__placeholder circle:last-child { cy: 105px; r: 42px; }
/* A last row of two is drawn closer together (90 px apart). */
.committee-members__item:nth-child(3n+1):nth-last-child(2) { margin-inline-end: -48px; }

/* member pop-up (لجان الوزارة-2.jpg) */
.member-dialog {
  width: min(1155px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; overflow: auto;
  border: 0; border-radius: var(--r-lg); background: #fff; color: var(--text);
}
.member-dialog::backdrop { background: rgb(0 0 0 / .65); backdrop-filter: blur(3px); }
.member-dialog__photo {
  position: relative; height: clamp(240px, 52vh, 590px); overflow: hidden; background: var(--bg); color: #868A96;
}
.member-dialog__photo::after { /* the dark fade over the placeholder, as drawn */
  content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(0 0 0 / 0) 0%, rgb(0 0 0 / .98) 100%); pointer-events: none;
}
.member-dialog--photo .member-dialog__photo { background: #1C1C1C; }
.member-dialog--photo .member-dialog__photo::after { background: linear-gradient(to bottom, rgb(0 0 0 / 0) 60%, rgb(0 0 0 / .45) 100%); }
.member-dialog__placeholder { position: absolute; inset: 0; width: 100%; height: 100%; fill: currentColor; }
.member-dialog__img { width: 100%; height: 100%; object-fit: contain; }
.member-dialog__close, .member-dialog__nav { position: absolute; z-index: 1; } /* the look is shared (components.css) */
.member-dialog__close { top: var(--sp-5); inset-inline-end: var(--sp-5); }
.member-dialog__nav { top: 50%; translate: 0 -50%; }
.member-dialog__nav--prev { inset-inline-start: var(--sp-5); }
.member-dialog__nav--next { inset-inline-end: var(--sp-5); }
.member-dialog__body {
  position: relative; isolation: isolate; display: grid; justify-items: center; gap: 0; padding: var(--sp-8) var(--sp-6) var(--sp-8); text-align: center;
}
.member-dialog__body::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #EFE3CF; opacity: .3;
  /* drawn at twice the footer's pattern scale */
  -webkit-mask: url("../core/img/pattern-sports.6f987643372c.webp") repeat 0 0 / 1326px 720px;
          mask: url("../core/img/pattern-sports.6f987643372c.webp") repeat 0 0 / 1326px 720px;
}
.member-dialog__name { font-size: var(--fs-h3); font-weight: 800; line-height: 1.3; }
.member-dialog__role { margin-top: var(--sp-6); color: var(--gold-strong); font-size: var(--fs-h2-sm); font-weight: 700; line-height: 1.4; }
.member-dialog__org-label { margin: var(--sp-5) 0 0; color: var(--text); font-size: var(--fs-h3); font-weight: 800; line-height: 1.4; } /* «الجهة», as in 751:137809 */
.member-dialog__org { display: inline-flex; align-items: center; gap: var(--sp-5); margin-top: var(--sp-1); color: var(--gold-strong); font-size: var(--fs-h2-sm); font-weight: 800; line-height: 1.4; }
.ministry-icon { width: 76px; height: 66px; flex: none; }
.member-dialog__org .ministry-icon { position: relative; top: -4px; } /* the words sit a little below the icon's middle, as drawn */

@media (max-width: 1360px) {
  .committee__title, .committee-sections { margin-inline: var(--gutter); }
  .committee-members__list { gap: var(--sp-5) var(--sp-7); }
  .committee-members__item:nth-child(3n+1):nth-last-child(2) { margin-inline-end: 0; }
  .members-enhanced .member:hover, .member:focus-visible { width: 294px; margin-inline: 0; }
  .committee-members__title { padding-inline: var(--gutter); }
}
@media (max-width: 640px) {
  .committee { padding-top: var(--sp-4); }
  .committee__title { min-height: 0; margin-bottom: var(--sp-5); font-size: var(--fs-h2); line-height: 1.6; }
  .committee-section__head { margin-inline: var(--sp-4); min-height: 72px; align-items: center; }
  .committee-section__title { min-height: 0; font-size: var(--fs-h4); line-height: 1.5; }
  .committee-section__toggle { width: 36px; height: 36px; }
  .committee-section__text { margin-inline: var(--sp-4); font-size: var(--fs-lead); text-align: start; }
  .committee-item { padding-inline: var(--sp-4); }
  .committee-item::before { width: 14px; height: 16px; margin-inline-end: 2px; }
  .committee-section--tasks, .committee-section--goals { padding-bottom: var(--sp-4); }
  .committee-section--tasks .committee-section__head { margin-top: var(--sp-2); }
  .committee-members { margin-top: var(--sp-7); padding-block: var(--sp-6) var(--sp-7); }
  .committee-members__title { font-size: var(--fs-h2); }
  .committee-members__list { gap: var(--sp-2); margin-top: var(--sp-5); }
  .committee-members__item { width: calc(50% - 4px); }
  .member, .members-enhanced .member:hover, .member:focus-visible { width: 100%; min-height: 0; gap: var(--sp-4); padding: var(--sp-4) var(--sp-2); }
  .member__photo { width: 100%; max-width: 180px; }
  .member__name { font-size: var(--fs-lead); }
  .member__role { margin-top: 0; font-size: var(--fs-ui); }
}

/* Page heading as drawn on the committees design: smaller, wider, generous line height. */
