/* Parts of department pages drawn by inc/page-parts.php (listings, sub-menu, card grids, panels), and headings
   inside table cells. Sehha tokens only, so light and dark follow the theme; logical properties for RTL/LTR. */

/* ---------------------------------------------------------------- headings written inside table cells
   (job descriptions pasted from Word put <h1> in cells: it broke words letter by letter in narrow columns) */
.pv-content :is(td,th) :is(h1,h2,h3,h4,h5,h6){font:inherit;font-weight:700;color:inherit;margin:0;letter-spacing:0}
.pv-content :is(td,th) :is(h1,h2,h3,h4,h5,h6):empty{display:none}
.pv-content td[width],.pv-content th[width]{width:auto}
.pv-content table[width],.pv-content table[style*="width"]{width:100%!important;height:auto!important}

/* ---------------------------------------------------------------- the page's sub-menu (a row of links) */
.pv-subnav{padding:var(--space-3) var(--space-4)}
.pv-subnav .moh-part--menu{display:flex;flex-wrap:wrap;gap:var(--space-2);margin:0;padding:0;list-style:none}
.pv-subnav .moh-part--menu li{margin:0}
.pv-subnav .sh-chip{min-height:44px;display:inline-flex;align-items:center;text-decoration:none}
@media (max-width:699px){
  .pv-subnav .moh-part--menu{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:4px;margin-inline:-4px;padding-inline:4px}
  .pv-subnav .sh-chip{white-space:nowrap}
}
/* a section reached from the sub-menu does not hide under the top of the window */
.pv-doc-main [id]{scroll-margin-top:24px}

/* ---------------------------------------------------------------- listings (الأخبار، إعلانات، أنشطة وفعاليات) */
.pv-part-sect{display:flex;flex-direction:column;gap:var(--space-4)}
.pv-part-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);flex-wrap:wrap}
.pv-part-head .sh-h2{margin:0}
.pv-part-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
@media (max-width:1100px){.pv-part-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.pv-part-grid{grid-template-columns:minmax(0,1fr)}}
.pv-part-grid .sh-news-excerpt{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* ---------------------------------------------------------------- grids of cards (Avada content / flip boxes) */
.pv-content .moh-boxes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-4);margin:var(--space-2) 0 var(--space-4)}
@media (max-width:1100px){.pv-content .moh-boxes{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.pv-content .moh-boxes{grid-template-columns:minmax(0,1fr)}}
.pv-content .moh-box{display:flex;flex-direction:column;gap:var(--space-2);min-width:0;padding:var(--space-5);border-radius:var(--radius-lg);
  background:var(--surface-solid);border:1px solid var(--hairline);border-block-start:3px solid var(--primary)}
.pv-content .moh-box>:where(h3,h4){margin:0;font-size:1.125rem;line-height:1.75rem}
.pv-content .moh-box>h4{font-size:1rem;color:var(--ink-muted)}
.pv-content .moh-box p{margin:0!important;min-height:0!important;line-height:1.875rem!important;font-size:1rem;text-align:start!important}
.pv-content .moh-box :is(ul,ol){margin:0}
.pv-content .moh-box img{border-radius:var(--radius-md)}
/* the card's «تفاصيل» link sits at its foot */
.pv-content .moh-box>p:has(>.moh-modal-link:only-child){margin-top:auto!important;padding-top:var(--space-2)}
.pv-content a.moh-modal-link{display:inline-flex;align-items:center;gap:var(--space-1);min-height:44px;font-weight:600;color:var(--primary-text)}

/* ---------------------------------------------------------------- panels that open in place (Avada pop-ups) */
.pv-content details.moh-modal{margin:0 0 var(--space-3);border:1px solid var(--hairline);border-radius:var(--radius-md);background:var(--surface-solid)}
.pv-content details.moh-modal>summary{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4);
  cursor:pointer;list-style:none;font:600 1.0625rem/1.625rem var(--font-display);color:var(--ink);border-radius:var(--radius-md)}
.pv-content details.moh-modal>summary::-webkit-details-marker{display:none}
.pv-content details.moh-modal>summary::after{content:"";flex:none;margin-inline-start:auto;width:10px;height:10px;
  border-inline-end:2px solid currentColor;border-block-end:2px solid currentColor;transform:rotate(45deg);transition:transform .2s ease;color:var(--primary-text)}
.pv-content details.moh-modal[open]>summary::after{transform:rotate(-135deg)}
.pv-content details.moh-modal>summary:hover{background:var(--primary-soft)}
.pv-content details.moh-modal>summary:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}
.pv-content details.moh-modal[open]>summary{border-block-end:1px solid var(--hairline);border-end-start-radius:0;border-end-end-radius:0}
.pv-content details.moh-modal>:not(summary){margin-inline:var(--space-4)}
.pv-content details.moh-modal>:not(summary):first-of-type{margin-top:var(--space-4)}
.pv-content details.moh-modal>:last-child{margin-bottom:var(--space-4)}
.pv-content details.moh-modal.is-flash>summary{animation:pv-flash 1.2s ease}
@keyframes pv-flash{0%,40%{background:var(--primary-soft)}100%{background:transparent}}
@media (prefers-reduced-motion:reduce){.pv-content details.moh-modal>summary::after{transition:none}.pv-content details.moh-modal.is-flash>summary{animation:none}}

/* ---------------------------------------------------------------- a group title over the cards that follow */
.pv-group-title{margin:var(--space-4) 0 calc(var(--space-2) * -1);padding-inline-start:var(--space-4);border-inline-start:4px solid var(--primary);
  font:600 1.625rem/2.375rem var(--font-display);color:var(--ink);scroll-margin-top:24px}

/* text the old builder sized and coloured for its own boxes (12px text, white links on a picture) */
.pv-content .moh-box :is(p,span,div){font-size:1rem!important;color:inherit}
.pv-content .moh-box a[style*="color"]{color:var(--primary-text)!important}
/* a box's closing link alone in its paragraph («دخول», «للتسجيل»): a button */
.pv-content .moh-box>p:last-child:has(>a:only-child){margin-top:auto!important;padding-top:var(--space-2);text-align:start!important}
.pv-content .moh-box>p:last-child>a:only-child:not(.moh-modal-link){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 var(--space-5);
  border-radius:var(--radius-md);background:var(--primary);color:var(--on-primary)!important;text-decoration:none;box-shadow:var(--shadow-button)}
.pv-content .moh-box>p:last-child>a:only-child:not(.moh-modal-link):hover{background:var(--primary-hover)}
.pv-content .moh-box>a.moh-modal-link{margin-top:auto;align-self:flex-start}
