/* WordPress + Elementor adjustments. The design itself is in app.css. */

/* MSF sections: a full-width Elementor container whose widget carries its own spacing. */
body .elementor .e-con.msf-section{
  --padding-top:0px;--padding-right:0px;--padding-bottom:0px;--padding-left:0px;
  --gap:0px;--row-gap:0px;--column-gap:0px;--margin-top:0px;--margin-bottom:0px;
  --width:100%;--content-width:100%;--container-max-width:100%;
  display:block;padding:0;margin:0;max-width:none;
}
body .elementor .e-con.msf-section>.elementor-widget{width:100%;max-width:none;margin:0}
body .elementor .elementor-widget-msf-hero-slider,
body .elementor .elementor-widget-msf-hero-slider>.elementor-widget-container{height:auto}

/* Pages without a hero photo: the header sits on the dark band it normally overlays. */
body .msf-page-head{background:#252d2b;padding-bottom:28px}

/* The mobile menu is closed until opened. */
body [data-msf-sheet][hidden]{display:none!important}
body [data-msf-sheet] [data-slot=sheet-content]{outline:none}

/* Logged-in toolbar: keep the full-height hero below it. */
body.admin-bar .hero{min-height:calc(min(950px,100svh) - 32px)}

/* The design tightens some gaps when one section follows another. In Elementor each section sits in its own
   container, so these rules look at neighbouring containers instead (they still work when sections are reordered). */
body .e-con.msf-section:has(.commemorative-feature)+.e-con.msf-section .about-feature{border-top:1px solid #e5e5e5;padding-top:64px}
body .e-con.msf-section:has(.about-feature)+.e-con.msf-section .latest{padding-top:0}
body .e-con.msf-section:has(#medical-topics)+.e-con.msf-section .about-feature{padding-top:8px}
@media (max-width:800px){body .e-con.msf-section:has(#medical-topics)+.e-con.msf-section .about-feature{padding-top:0}}

/* ───────── News article body: WordPress blocks styled like the approved article design ───────── */
body .msf-article-body>*{margin-top:0;margin-bottom:28px}
body .msf-article-body>*:last-child{margin-bottom:0}
body .msf-article-body .wp-block-image{width:100%;margin:36px 0}
body .msf-article-body .wp-block-image img{border-radius:12px;width:100%;height:auto;display:block;box-shadow:0 10px 30px #0000000f}
body .msf-article-body .wp-block-image figcaption,body .msf-article-body .wp-element-caption{color:#666;margin-top:10px;font-size:14px;font-style:italic;line-height:1.55}
body .msf-article-body .wp-block-quote{border:0;border-left:5px solid var(--red);background:#f7f4ee;border-radius:16px;margin:40px 0;padding:34px 40px 30px 64px;position:relative;font-style:normal}
body .msf-article-body .wp-block-quote:before{content:'“';color:var(--red);opacity:.22;font-family:Georgia,serif;font-size:80px;line-height:1;position:absolute;top:10px;left:18px}
body .msf-article-body .wp-block-quote p{color:#171717;margin:0 0 16px;font-size:clamp(20px,2.2vw,24px);font-style:italic;font-weight:500;line-height:1.45}
body .msf-article-body .wp-block-quote cite{font-family:var(--font-heading),sans-serif;text-transform:uppercase;letter-spacing:1px;color:var(--red);font-size:15px;font-style:normal;font-weight:600;display:block}
body .msf-article-body .wp-block-quote cite:before{content:'— '}
body .msf-article-body .wp-block-gallery{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin:36px 0;display:grid}
body .msf-article-body .wp-block-gallery .wp-block-image{margin:0}
body .msf-article-body .wp-block-gallery img{aspect-ratio:4/3;object-fit:cover;border-radius:10px;box-shadow:none}
body .msf-article-body .wp-block-separator{background:#e5dfd7;border:0;height:1px;margin:36px 0}
body .msf-article-body .msf-video{aspect-ratio:16/9;width:100%;margin:36px 0;border-radius:12px;overflow:hidden;background:#111}
body .msf-article-body .msf-video iframe{width:100%;height:100%;border:0;display:block}
body .msf-article-body .wp-block-buttons{display:flex;gap:12px;flex-wrap:wrap}
body .msf-article-body .wp-block-button__link{display:inline-flex;align-items:center;gap:14px;background:var(--red);color:#fff;border-radius:40px;padding:16px 28px;font-family:var(--font-heading),sans-serif;font-size:14px;letter-spacing:2px;text-transform:uppercase;text-decoration:none}
body .msf-article-body .wp-block-button__link:hover{background:#b90000;color:#fff}
body .msf-article-body details{border-top:1px solid #e5dfd7;padding:18px 0}
body .msf-article-body details:last-of-type{border-bottom:1px solid #e5dfd7}
body .msf-article-body summary{cursor:pointer;font-family:var(--font-heading),sans-serif;text-transform:uppercase;font-size:20px;color:#171717}
body .msf-article-body details[open] summary{margin-bottom:12px}
body .msf-article-body iframe{max-width:100%}
body .article-content-container.is-arabic .wp-block-quote{border-left:0;border-right:5px solid var(--red);padding:34px 64px 30px 40px}
body .article-content-container.is-arabic .wp-block-quote:before{left:auto;right:18px}
body .article-content-container.is-arabic .article-prose{font-family:Tajawal,sans-serif}
@media (max-width:800px){body .msf-article-body .wp-block-quote{padding:24px 20px 22px 44px}body .msf-article-body .wp-block-quote:before{font-size:56px;left:10px}}

/* Listing filters and page numbers */
body .about-anchors a.is-current{background:#171717;border-color:#171717;color:#fff}
body .msf-pagination{display:flex;justify-content:center;gap:8px;margin:56px 0 24px;flex-wrap:wrap}
body .msf-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0 14px;border:1px solid #d4d4d4;border-radius:30px;font-weight:600;color:#333}
body .msf-pagination .page-numbers.current{background:var(--red);border-color:var(--red);color:#fff}
body .msf-pagination a.page-numbers:hover{border-color:var(--red);color:var(--red)}
body .msf-pagination .dots{border:0}
/* Galleries: the design's even grid instead of WordPress's flexible rows */
body .msf-article-body .wp-block-gallery.has-nested-images{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
body .msf-article-body .wp-block-gallery.has-nested-images figure.wp-block-image{width:auto!important;max-width:none;margin:0;flex:none}
body .msf-article-body .wp-block-gallery.has-nested-images figure.wp-block-image img{height:100%;width:100%;aspect-ratio:4/3;object-fit:cover}

/* ───────── Vacancies ───────── */
body .msf-vacancies-section{padding-block:90px}
body .msf-vac-list{list-style:none;margin:0;padding:0;border-top:1px solid #d8d8d8}
body .msf-vac-list li{margin:0;border-bottom:1px solid #d8d8d8}
body .msf-vac-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 4px;text-decoration:none;color:inherit;transition:background .2s,padding .2s}
body .msf-vac-row:hover{background:#f7f4ee;padding-inline:16px}
body .msf-vac-title{display:block;font-family:var(--font-heading),sans-serif;font-size:clamp(21px,2vw,26px);line-height:1.2;color:#171717}
body .msf-vac-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:8px;font-size:15px;color:#666}
body .msf-vac-meta i{width:4px;height:4px;border-radius:50%;background:var(--red);display:inline-block}
body .msf-vac-arrow{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid #e0dad3;color:var(--red);transition:background .2s,color .2s}
body .msf-vac-row:hover .msf-vac-arrow{background:var(--red);border-color:var(--red);color:#fff}
body .msf-vac-group{font-family:var(--font-heading),sans-serif;text-transform:uppercase;letter-spacing:1px;font-size:20px;margin:48px 0 14px;display:flex;gap:10px;align-items:center}
body .msf-vac-group span{font-size:13px;background:#171717;color:#fff;border-radius:20px;padding:2px 10px;letter-spacing:0}
body .msf-vac-empty{font-size:20px;color:#444;background:#f7f4ee;border-left:5px solid var(--red);padding:28px 32px;border-radius:12px;max-width:820px}
body .msf-open-count{display:inline-block;align-self:flex-start;margin-bottom:12px;background:var(--red);color:#fff;font-family:var(--font-heading),sans-serif;text-transform:uppercase;letter-spacing:1.5px;font-size:13px;padding:6px 12px}
body .msf-vacancy-hero h1{max-width:900px;font-size:clamp(34px,4.4vw,64px);line-height:1.06}
body .msf-vac-closed-badge{display:inline-block;background:#fff;color:#171717;font-family:var(--font-heading),sans-serif;text-transform:uppercase;letter-spacing:1.5px;padding:10px 18px;font-size:14px}
body .msf-vacancy-main{padding-block:72px 40px}
body .msf-vacancy-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:64px;align-items:start}
body .msf-vacancy-body{max-width:780px}
body .msf-vacancy-facts{position:sticky;top:24px;background:#f7f4ee;border-top:4px solid var(--red);padding:28px;border-radius:0 0 12px 12px}
body .msf-vacancy-facts dl{margin:0 0 24px}
body .msf-vacancy-facts dl>div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e5dfd7}
body .msf-vacancy-facts dt{color:#666;font-size:15px}
body .msf-vacancy-facts dd{margin:0;font-weight:600;text-align:right}
body .msf-vacancy-facts dd.is-open{color:#0a7a2f}
body .msf-vacancy-facts dd.is-closed{color:#8a8a8a}
body .msf-vacancy-facts .pill{width:100%;justify-content:center}
body .msf-vac-note{font-size:14px;color:#666;margin:12px 0 0}
body .msf-vac-email{font-weight:600;color:var(--red);word-break:break-word}
body .msf-vac-closed{background:#f3f3f3;padding:18px 22px;border-radius:10px;font-weight:600}
body .msf-apply-section{background:#f3f3f3;padding-block:84px;margin-top:56px}
body .msf-apply-form{max-width:780px;display:grid;grid-template-columns:1fr 1fr;gap:6px 24px}
body .msf-apply-form p{margin:0 0 14px}
body .msf-apply-form p:has(textarea),body .msf-apply-form p:has(input[type=file]),body .msf-apply-form .msf-apply-consent,body .msf-apply-form p:last-of-type,body .msf-apply-error{grid-column:1/-1}
body .msf-apply-form label{display:block;font-weight:600;margin-bottom:6px;font-size:16px}
body .msf-apply-form input[type=text],body .msf-apply-form input[type=email],body .msf-apply-form input[type=tel],body .msf-apply-form textarea{width:100%;border:1px solid #cfcfcf;background:#fff;border-radius:8px;padding:13px 14px;font:inherit;font-size:17px}
body .msf-apply-form input[type=file]{width:100%;background:#fff;border:1px dashed #b9b9b9;border-radius:8px;padding:14px}
body .msf-apply-form input:focus,body .msf-apply-form textarea:focus{outline:2px solid var(--red);outline-offset:1px;border-color:transparent}
body .msf-apply-consent label{font-weight:400;font-size:15px;display:flex;gap:10px;align-items:flex-start;line-height:1.5}
body .msf-apply-consent input{margin-top:4px;flex:none}
body .msf-apply-form button.pill{border:0;cursor:pointer}
body .msf-hp{position:absolute!important;left:-9999px!important;height:1px;overflow:hidden}
body .msf-apply-error{background:#fde8e8;color:#9b1c1c;padding:14px 18px;border-radius:8px;font-weight:600}
body .msf-apply-done{max-width:780px;background:#fff;border-left:5px solid #0a7a2f;padding:26px 30px;border-radius:12px;font-size:18px}
@media(max-width:900px){body .msf-vacancy-grid{grid-template-columns:1fr;gap:40px}body .msf-vacancy-facts{position:static}body .msf-apply-form{grid-template-columns:1fr}}
body .era-panel[hidden]{display:none!important}

/* ───────── Standard pages (migrated) ───────── */
body .msf-page-main .article-content-container{padding-top:64px;padding-bottom:64px}
body .msf-page-main .about-cards-section{margin-top:0}
body .msf-article-body .news-grid,body .msf-article-body .link-cards{margin:32px 0;max-width:none}
body .msf-article-body .news-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
body .msf-figures-list{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}
body .msf-figures-list li{background:#f7f4ee;border-top:4px solid var(--red);padding:20px;margin:0}
body .msf-figures-list strong{display:block;font-family:var(--font-heading),sans-serif;font-size:36px;color:var(--red);line-height:1.1}

/* Arabic (right-to-left): sideways arrows point the reading direction. */
html[dir=rtl] .lucide-arrow-right,html[dir=rtl] .lucide-arrow-left,html[dir=rtl] .lucide-chevron-right,html[dir=rtl] .lucide-chevron-left{transform:scaleX(-1)}

/* Arabic header: logo on the right edge, menu and search to its left (mirror of the English header). */
html[dir=rtl] body .brand{margin-right:0;margin-left:auto}
html[dir=rtl] body .nav-dropdown{left:auto;right:0}
html[dir=rtl] body .nav-dropdown a:hover{padding-left:22px;padding-right:26px}
/* Arabic text everywhere (article bodies, forms, footer) uses Tajawal; no letter-spacing on Arabic. */
body.rtl-layout,body.rtl-layout .msf-article-body,body.rtl-layout footer,body.rtl-layout .msf-vac-title,body.rtl-layout .link-card h3,body.rtl-layout .section-heading h2,body.rtl-layout .amr-breadcrumb,body.rtl-layout .hero-bottom,body.rtl-layout .story-meta,body.rtl-layout .hero-summary>p{font-family:'Tajawal',sans-serif!important;letter-spacing:normal!important}
body.rtl-layout .story-meta,body.rtl-layout .hero-summary>p{font-style:normal}

/* Header dropdowns: same typeface as the main menu (Oswald), so the menu reads as one system. */
body .nav-dropdown{min-width:260px;padding:10px 0}
body .nav-dropdown a{font-family:var(--font-heading-face),'Arial Narrow',sans-serif;font-size:15px;font-weight:500;text-transform:uppercase;letter-spacing:1.2px;color:#171717;padding:12px 24px;line-height:1.3}
body .nav-dropdown a:hover{padding-left:28px}
body .nav-dropdown a.is-indent{font-size:13.5px;font-weight:400;letter-spacing:1px;color:#5a5a5a;padding-left:42px;position:relative}
body .nav-dropdown a.is-indent:before{content:'';position:absolute;left:24px;top:50%;width:9px;height:1px;background:var(--red)}
body .nav-dropdown a.is-indent:hover{padding-left:46px}
html[dir=rtl] body .nav-dropdown a.is-indent{padding-left:24px;padding-right:42px}
html[dir=rtl] body .nav-dropdown a.is-indent:before{left:auto;right:24px}
body.rtl-layout .nav-dropdown a{text-transform:none}

/* Forms inside pages (newsletter, contact, messages) */
body .msf-article-body .contact-form{margin:32px 0;background:#f7f4ee;padding:32px;border-radius:12px}
body .msf-radio{border:0;padding:0;margin:0;display:flex;gap:24px;align-items:center;flex-wrap:wrap}
body .msf-radio legend{font-weight:600;margin-bottom:8px;width:100%}
body .msf-radio label{display:flex;gap:8px;align-items:center;font-weight:400}
body .msf-form-note{font-size:14px;color:#666;margin:0}

/* ───────── Showcase hero: the whole photo, uncropped, beside the title ───────── */
body .hero-showcase{position:relative;background:#141414;color:#fff;padding-bottom:0;overflow:hidden}
body .hero-showcase:before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 78% 55%,rgba(230,0,0,.16),transparent 55%);pointer-events:none}
body .hero-showcase .masthead{position:relative;z-index:3}
body .hero-showcase-inner{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(40px,6vw,96px);align-items:center;max-width:1280px;margin:0 auto;padding:clamp(48px,7vw,96px) 48px clamp(48px,6vw,80px)}
body .hero-showcase h1{font-size:clamp(52px,6vw,92px);line-height:1.02;margin:0 0 28px;color:#fff}
body .hero-showcase .story-meta{margin:0 0 18px;color:#fff}
body .hero-showcase-summary{font-family:Georgia,serif;font-size:clamp(18px,1.6vw,22px);line-height:1.6;color:#e9e9e9;margin:0 0 32px;max-width:520px}
body .hero-showcase-photo{position:relative;margin:0;justify-self:end;width:100%}
body .hero-showcase-photo:before{content:'';position:absolute;left:-18px;bottom:-18px;width:42%;height:42%;border-left:5px solid var(--red);border-bottom:5px solid var(--red);pointer-events:none}
body .hero-showcase-photo img{display:block;width:100%;height:auto;max-height:72vh;object-fit:contain;object-position:center;border-radius:4px;box-shadow:0 30px 70px rgba(0,0,0,.45)}
body .hero-showcase-photo figcaption{font-size:13px;color:#bdbdbd;margin-top:14px;letter-spacing:.3px}
body .hero-showcase .hero-bottom{position:relative;z-index:1}
html[dir=rtl] body .hero-showcase-photo{justify-self:start}
html[dir=rtl] body .hero-showcase-photo:before{left:auto;right:-18px;border-left:0;border-right:5px solid var(--red)}
@media(max-width:900px){body .hero-showcase-inner{grid-template-columns:1fr;padding:36px 26px 40px;gap:36px}body .hero-showcase-photo{order:-1}body .hero-showcase-photo:before{left:-10px;bottom:-10px}body .hero-showcase h1{font-size:54px}}

/* Page hero, "Keep faces clear of the header": the sharp photo starts under the header; a blurred copy fills behind the header. */
body .hero-photo-below .hero-images{background:#1b1b1b}
body .hero-photo-below .hero-photo-fill{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:blur(28px) brightness(.55);transform:scale(1.15)}
body .hero-photo-below .about-slide{top:var(--msf-head,190px)!important;height:calc(100% - var(--msf-head,190px))!important;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 70px);mask-image:linear-gradient(to bottom,transparent 0,#000 70px)}
@media(max-width:800px){body .hero-photo-below{--msf-head:150px}}

/* No sideways scrolling (Arabic + English) */
body .hero-slider-controls{box-sizing:border-box}
body.rtl-layout .nav-dropdown{left:auto;right:0}
body:not(.rtl-layout) .nav-item:last-of-type .nav-dropdown{left:auto;right:0}
html,body{overflow-x:clip}

/* "العربية" in the top bar: the flags of the 22 Arab League countries scroll through the letters */
body .utility a.ar-flags{--fh:30px;display:inline-block;height:var(--fh);line-height:var(--fh);font-weight:800;font-size:19px;color:transparent;
  background:url(../img/arab-flags.svg) 0 50%/auto 100% repeat-x;-webkit-background-clip:text;background-clip:text;
  -webkit-text-stroke:.35px rgba(255,255,255,.55);animation:msf-ar-flags 44s linear infinite}
body .utility a.ar-flags:hover{animation-play-state:paused}
@keyframes msf-ar-flags{to{background-position:calc(var(--fh) * -29.3333) 50%}}
@media (prefers-reduced-motion:reduce){body .utility a.ar-flags{animation:none}}
