/*
 * MHU Visual Experience 4.3
 * طبقة بصرية وحركية متقدمة، متوافقة مع CSP وإمكانية الوصول وتقليل الحركة.
 */
:root {
  --premium-navy-950: #041525;
  --premium-navy-900: #06233d;
  --premium-navy-800: #083a60;
  --premium-blue-700: #0c628f;
  --premium-blue-600: #147eaf;
  --premium-sky-500: #2aa2d2;
  --premium-sky-300: #7dd3ef;
  --premium-gold-500: #d6a83f;
  --premium-gold-300: #f0cf7a;
  --premium-ink: #10263a;
  --premium-muted: #60788b;
  --premium-surface: #ffffff;
  --premium-soft: #f1f7fb;
  --premium-border: rgba(18, 109, 160, .15);
  --premium-border-strong: rgba(18, 109, 160, .28);
  --premium-shadow-sm: 0 9px 26px rgba(7, 39, 68, .08);
  --premium-shadow: 0 22px 55px rgba(7, 39, 68, .12);
  --premium-shadow-hover: 0 30px 72px rgba(7, 39, 68, .17);
  --premium-radius-sm: 14px;
  --premium-radius: 22px;
  --premium-radius-lg: 30px;
  --premium-ease: cubic-bezier(.2, .75, .25, 1);
  --premium-spring: cubic-bezier(.2, .9, .25, 1.18);
}

html {
  scroll-padding-top: 98px;
  scrollbar-color: var(--premium-blue-600) #e7f0f6;
}

html.mhu-font-85 { --font-scale: .85; }
html.mhu-font-100 { --font-scale: 1; }
html.mhu-font-115 { --font-scale: 1.15; }
html.mhu-font-130 { --font-scale: 1.30; }
html.mhu-font-145 { --font-scale: 1.45; }

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 4% 4%, rgba(42, 162, 210, .10), transparent 27rem),
    radial-gradient(circle at 97% 36%, rgba(214, 168, 63, .09), transparent 25rem),
    linear-gradient(180deg, #f8fbfd 0%, #f3f7fa 48%, #eef4f8 100%) !important;
  color: var(--premium-ink);
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif !important;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: opacity .2s ease, background-color .25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .38;
  background-image:
    linear-gradient(rgba(8, 58, 96, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 58, 96, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

::selection {
  color: #fff;
  background: var(--premium-blue-700);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #e7f0f6; }
::-webkit-scrollbar-thumb {
  border: 3px solid #e7f0f6;
  border-radius: 999px;
  background: linear-gradient(var(--premium-blue-600), var(--premium-navy-800));
}

h1, h2, h3, h4, h5, h6,
.site-title, .header-title, .page-title, .archive-title, .content-title,
.section-title, .item-title, .news-title, .service-title, .single-title {
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif !important;
  text-wrap: balance;
}

p, li, .item-summary, .news-summary, .service-desc, .content-body {
  text-wrap: pretty;
}

img { max-width: 100%; }

a, button, input, textarea, select, .item-card, .news-card, .service-card,
.archive-item, .decision-card, .admin-card {
  transition:
    color .22s ease,
    border-color .22s ease,
    background-color .22s ease,
    box-shadow .28s var(--premium-ease),
    transform .28s var(--premium-ease),
    opacity .22s ease;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(42, 162, 210, .40) !important;
  outline-offset: 3px;
}

/* ===== شريط تقدم القراءة ===== */
.mhu-page-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10050;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(255, 255, 255, .16);
}
.mhu-page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: right center;
  background: linear-gradient(90deg, var(--premium-gold-500), var(--premium-sky-500), var(--premium-blue-700));
  box-shadow: 0 0 14px rgba(42, 162, 210, .65);
  transition: transform .16s linear;
}
html[dir="ltr"] .mhu-page-progress span { transform-origin: left center; }
.mhu-progress-0 span { transform: scaleX(0); }
.mhu-progress-1 span { transform: scaleX(.1); }
.mhu-progress-2 span { transform: scaleX(.2); }
.mhu-progress-3 span { transform: scaleX(.3); }
.mhu-progress-4 span { transform: scaleX(.4); }
.mhu-progress-5 span { transform: scaleX(.5); }
.mhu-progress-6 span { transform: scaleX(.6); }
.mhu-progress-7 span { transform: scaleX(.7); }
.mhu-progress-8 span { transform: scaleX(.8); }
.mhu-progress-9 span { transform: scaleX(.9); }
.mhu-progress-10 span { transform: scaleX(1); }

/* ===== الهيدر والتنقل ===== */
.site-header {
  background: rgba(255, 255, 255, .88) !important;
  border-bottom: 1px solid var(--premium-border) !important;
  box-shadow: 0 8px 30px rgba(8, 39, 68, .06);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  transition: box-shadow .28s ease, background .28s ease, border-color .28s ease !important;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .96) !important;
  border-color: rgba(18, 109, 160, .19) !important;
  box-shadow: 0 15px 38px rgba(8, 39, 68, .11);
}
.header-inner { transition: padding .28s var(--premium-ease); }
.site-header.is-scrolled .header-inner { padding-block: .34rem !important; }
.header-logo, .brand-logo-img, .logo-circle img, .loader-logo-circle img {
  filter: drop-shadow(0 8px 15px rgba(8, 39, 68, .14));
}
.logo-circle, .header-logo, .brand-logo-img {
  transition: transform .35s var(--premium-spring), filter .35s ease;
}
.logo-wrap:hover .logo-circle, .header-brand:hover .header-logo, .brand-link:hover .brand-logo-img {
  transform: rotate(-3deg) scale(1.045);
  filter: drop-shadow(0 12px 20px rgba(8, 39, 68, .20));
}
.site-title, .header-title {
  color: var(--premium-navy-900) !important;
  font-weight: 800 !important;
  letter-spacing: -.018em;
}

.main-nav a, .nav-links a {
  position: relative;
  border-radius: 999px;
  font-weight: 700 !important;
  isolation: isolate;
}
.main-nav a::before, .nav-links a::before {
  content: "";
  position: absolute;
  inset: 2px 4px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(42, 162, 210, .11), rgba(214, 168, 63, .10));
  opacity: 0;
  transform: scale(.86);
  transition: opacity .22s ease, transform .28s var(--premium-spring);
}
.main-nav a::after, .nav-links a::after {
  content: "";
  position: absolute;
  right: 18%;
  left: 18%;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--premium-gold-500), var(--premium-sky-500));
  transform: scaleX(0);
  transition: transform .28s var(--premium-ease);
}
.main-nav a:hover::before, .nav-links a:hover::before,
.main-nav a.is-current::before, .nav-links a.is-current::before {
  opacity: 1;
  transform: scale(1);
}
.main-nav a:hover::after, .nav-links a:hover::after,
.main-nav a.is-current::after, .nav-links a.is-current::after { transform: scaleX(1); }

.mobile-toggle, .menu-toggle, .nav-toggle, .mobile-menu-toggle {
  position: relative;
  overflow: hidden;
  border-color: var(--premium-border-strong) !important;
  background: rgba(255, 255, 255, .78) !important;
  box-shadow: var(--premium-shadow-sm);
}
.mobile-nav {
  border: 1px solid var(--premium-border);
  box-shadow: var(--premium-shadow);
  backdrop-filter: blur(18px);
}
.mobile-nav.open { display: flex !important; animation: mhu-menu-in .28s var(--premium-ease) both; }

/* ===== اللودر المتقدم ===== */
body.mhu-loading { overflow: hidden; }
.page-loader {
  position: fixed !important;
  inset: 0 !important;
  z-index: 12000 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 24% 18%, rgba(42, 162, 210, .28), transparent 25rem),
    radial-gradient(circle at 82% 80%, rgba(214, 168, 63, .17), transparent 24rem),
    linear-gradient(145deg, #031321 0%, #062b49 52%, #084e74 100%) !important;
  opacity: 1;
  visibility: visible;
  transition: opacity .65s var(--premium-ease), visibility .65s ease !important;
}
.page-loader::before, .page-loader::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  pointer-events: none;
}
.page-loader::before {
  width: min(72vw, 680px);
  aspect-ratio: 1;
  top: -36vw;
  right: -18vw;
  animation: mhu-loader-float 7s ease-in-out infinite alternate;
}
.page-loader::after {
  width: min(58vw, 540px);
  aspect-ratio: 1;
  bottom: -32vw;
  left: -12vw;
  animation: mhu-loader-float 8s 1s ease-in-out infinite alternate-reverse;
}
.page-loader.is-hidden, .page-loader.hidden {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  position: relative;
  z-index: 2;
  display: flex !important;
  width: min(100%, 360px);
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  color: #fff !important;
  text-align: center;
}
.loader-emblem {
  position: relative;
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  margin-bottom: 22px;
}
.loader-emblem::before, .loader-emblem::after, .loader-orbit {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.loader-emblem::before {
  border: 1px solid rgba(255, 255, 255, .22);
  animation: mhu-orbit 5.4s linear infinite;
}
.loader-emblem::after {
  inset: 11px;
  border: 1px dashed rgba(240, 207, 122, .48);
  animation: mhu-orbit-reverse 7.2s linear infinite;
}
.loader-orbit {
  inset: 2px;
  border-top: 2px solid var(--premium-sky-300);
  border-right: 2px solid transparent;
  border-bottom: 2px solid var(--premium-gold-300);
  border-left: 2px solid transparent;
  filter: drop-shadow(0 0 8px rgba(125, 211, 239, .45));
  animation: mhu-orbit 2.1s linear infinite;
}
.loader-orbit-two {
  inset: 19px;
  border-width: 1px;
  opacity: .68;
  animation-duration: 3.2s;
  animation-direction: reverse;
}
.loader-logo-circle {
  position: relative;
  z-index: 2;
  display: grid !important;
  width: 86px !important;
  height: 86px !important;
  place-items: center !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 27px !important;
  background: linear-gradient(145deg, #fff, #eef7fc) !important;
  box-shadow: 0 22px 48px rgba(0, 10, 25, .34), inset 0 1px 0 #fff !important;
  animation: mhu-logo-breathe 2.2s ease-in-out infinite !important;
}
.loader-logo-circle img { width: 76% !important; height: 76% !important; object-fit: contain; }
.loader-kicker {
  margin: 0 0 5px;
  color: var(--premium-gold-300);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.loader-title {
  margin: 0;
  color: #fff;
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  font-size: clamp(1.08rem, 3vw, 1.38rem);
  font-weight: 800;
  line-height: 1.6;
}
.loader-caption {
  margin: 5px 0 18px;
  color: rgba(226, 241, 250, .78);
  font-size: .82rem;
}
.loader-progress {
  position: relative;
  width: min(100%, 260px);
  height: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}
.loader-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--premium-gold-300), var(--premium-sky-300), transparent);
  animation: mhu-loader-progress 1.45s var(--premium-ease) infinite;
}
.loader-dots { display: flex; gap: 7px; margin-top: 13px; }
.loader-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  animation: mhu-dot 1.2s ease-in-out infinite;
}
.loader-dots i:nth-child(2) { animation-delay: .15s; }
.loader-dots i:nth-child(3) { animation-delay: .3s; }
.page-loader.is-complete .loader-progress span { width: 100%; animation: none; background: linear-gradient(90deg, var(--premium-gold-300), var(--premium-sky-300)); }

/* ===== Hero ===== */
.hero, .hero-section, .hero-inner, .archive-hero { position: relative; }
.hero::before, .archive-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -120px;
  inset-inline-end: -130px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 162, 210, .17), transparent 68%);
  animation: mhu-ambient 8s ease-in-out infinite alternate;
}
.hero-grid, .hero-inner, .hero-card, .archive-hero-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--premium-border) !important;
  border-radius: var(--premium-radius-lg) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(237, 248, 254, .94)) !important;
  box-shadow: var(--premium-shadow) !important;
}
.hero-grid::before, .hero-inner::before, .hero-card::before, .archive-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--premium-gold-500), var(--premium-sky-500), var(--premium-navy-800));
}
.hero-grid::after, .archive-hero-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  bottom: -120px;
  inset-inline-start: -80px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 168, 63, .12), transparent 70%);
}
.hero-kicker, .badge-pill, .badge, .hero-meta-chip, .service-pill, .archive-chip {
  border: 1px solid rgba(18, 109, 160, .13) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 6px 16px rgba(8, 58, 96, .05);
  backdrop-filter: blur(8px);
}
.hero-title, .archive-title, .page-title, .content-title {
  color: var(--premium-navy-900) !important;
  font-weight: 900 !important;
  letter-spacing: -.025em;
  line-height: 1.42 !important;
}
.hero-sub, .archive-sub, .page-sub {
  color: var(--premium-muted) !important;
  line-height: 2 !important;
}
.hero-stat-card {
  border: 1px solid var(--premium-border) !important;
  background: rgba(255, 255, 255, .84) !important;
  box-shadow: var(--premium-shadow-sm);
}
.hero-stat-card:hover { transform: translateY(-4px); box-shadow: var(--premium-shadow); }

.hero-slider, .hero-main-slide {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 52px rgba(4, 29, 49, .22) !important;
}
.hero-main-slide { isolation: isolate; }
.hero-main-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .13) 45%, transparent 70%);
  transform: translateX(130%);
  transition: transform .75s var(--premium-ease);
}
.hero-main-slide:hover::after { transform: translateX(-130%); }
.hero-main-slide img, .item-card img, .news-card img, .archive-thumb img, .minister-photo img {
  transition: transform .75s var(--premium-ease), filter .45s ease, opacity .45s ease;
}
.hero-main-slide:hover img, .item-card:hover img, .news-card:hover img, .archive-thumb:hover img, .minister-card:hover img {
  transform: scale(1.055);
  filter: saturate(1.07) contrast(1.02);
}
.hero-main-overlay {
  background: linear-gradient(180deg, transparent 18%, rgba(4, 25, 44, .94)) !important;
}
.hero-main-slide.active .hero-main-content { animation: mhu-slide-content .65s .08s var(--premium-ease) both; }
.hero-dot {
  box-shadow: 0 0 0 4px rgba(18, 109, 160, .08);
  transition: width .25s ease, transform .25s ease, background .25s ease !important;
}
.hero-dot.active { width: 24px !important; border-radius: 999px !important; }

/* ===== الأزرار ===== */
.btn-primary, .contact-submit, .primary-btn, button[type="submit"].btn-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0 !important;
  background: linear-gradient(135deg, var(--premium-navy-800), var(--premium-blue-600) 55%, var(--premium-sky-500)) !important;
  color: #fff !important;
  box-shadow: 0 13px 28px rgba(18, 109, 160, .24) !important;
  font-weight: 800 !important;
}
.btn-primary::before, .contact-submit::before, .primary-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, .26) 44%, transparent 66%);
  transform: translateX(135%);
  transition: transform .65s var(--premium-ease);
}
.btn-primary:hover::before, .contact-submit:hover::before, .primary-btn:hover::before { transform: translateX(-135%); }
.btn-primary:hover, .contact-submit:hover, .primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 19px 38px rgba(18, 109, 160, .32) !important;
}
.btn-primary:active, .contact-submit:active, .primary-btn:active { transform: translateY(0) scale(.985); }
.btn-secondary, .secondary-btn, .details-link, .item-link, .service-link, .section-link {
  position: relative;
  overflow: hidden;
  border-color: rgba(18, 109, 160, .22) !important;
  color: var(--premium-navy-800) !important;
  font-weight: 800 !important;
}
.btn-secondary:hover, .secondary-btn:hover, .details-link:hover, .item-link:hover, .service-link:hover {
  transform: translateY(-2px);
  border-color: var(--premium-sky-500) !important;
  background: #fff !important;
  box-shadow: var(--premium-shadow-sm);
}
button.is-loading, input.is-loading {
  cursor: wait !important;
  opacity: .82;
}
button.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-inline-start: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: mhu-orbit .7s linear infinite;
}

/* ===== عناوين الأقسام ===== */
.section-header, .section-title-row, .section-head { margin-bottom: 1.35rem !important; }
.section-title, .section-header h2, .section-head h2, .results-head h2 {
  position: relative;
  color: var(--premium-navy-900) !important;
  font-weight: 900 !important;
  letter-spacing: -.018em;
}
.section-title::before, .section-header h2::before, .section-head h2::before, .results-head h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 27px;
  margin-inline-end: 11px;
  border-radius: 999px;
  vertical-align: middle;
  background: linear-gradient(var(--premium-gold-500), var(--premium-sky-500));
  box-shadow: 0 7px 18px rgba(42, 162, 210, .22);
}
.section-sub { color: var(--premium-muted) !important; line-height: 1.9; }
.section-link::after, .item-link::after, .service-link::after, .details-link::after {
  content: "←";
  display: inline-block;
  margin-inline-start: 5px;
  transition: transform .25s var(--premium-spring);
}
html[dir="ltr"] .section-link::after,
html[dir="ltr"] .item-link::after,
html[dir="ltr"] .service-link::after,
html[dir="ltr"] .details-link::after { content: "→"; }
.section-link:hover::after, .item-link:hover::after, .service-link:hover::after, .details-link:hover::after { transform: translateX(-4px); }
html[dir="ltr"] .section-link:hover::after,
html[dir="ltr"] .item-link:hover::after,
html[dir="ltr"] .service-link:hover::after,
html[dir="ltr"] .details-link:hover::after { transform: translateX(4px); }

/* ===== البطاقات ===== */
.item-card, .service-card, .news-card, .decision-card, .dec-card,
.contact-card, .minister-profile, .minister-card, .content-card, .archive-card,
.archive-item, .single-card, .side-card, .panel-card, .section-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--premium-border) !important;
  border-radius: var(--premium-radius) !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, .99), rgba(248, 252, 255, .97)) !important;
  box-shadow: var(--premium-shadow-sm) !important;
}
.item-card::before, .service-card::before, .news-card::before, .decision-card::before,
.archive-item::before, .contact-card::before, .single-card::before, .side-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 88% 8%, rgba(42, 162, 210, .10), transparent 35%);
  opacity: 0;
  transition: opacity .32s ease;
}
.item-card:hover, .service-card:hover, .news-card:hover, .decision-card:hover, .dec-card:hover,
.archive-item:hover, .contact-card:hover, .minister-card:hover, .side-card:hover {
  transform: translateY(-7px);
  border-color: rgba(42, 162, 210, .36) !important;
  box-shadow: var(--premium-shadow-hover) !important;
}
.item-card:hover::before, .service-card:hover::before, .news-card:hover::before,
.decision-card:hover::before, .archive-item:hover::before, .contact-card:hover::before,
.single-card:hover::before, .side-card:hover::before { opacity: 1; }
.item-title, .service-title, .news-title, .archive-item-title, .dec-title, .minister-name {
  color: var(--premium-navy-900) !important;
  font-weight: 800 !important;
}
.item-summary, .service-desc, .news-summary, .archive-item-summary, .dec-summary,
.minister-bio, .single-body, .content-body {
  color: var(--premium-muted) !important;
  line-height: 1.9 !important;
}
.item-meta, .news-meta, .archive-meta, .single-meta, .content-date, .results-meta { color: #6b8294 !important; }

/* ===== النماذج ===== */
.contact-grid { gap: 1.35rem !important; }
.contact-card { padding: clamp(1.15rem, 2.5vw, 1.65rem) !important; }
.contact-card h3 { color: var(--premium-navy-900) !important; font-size: 1.18rem !important; }
input, textarea, select,
.field-input, .field-select, .contact-form-group input, .contact-form-group textarea, .contact-form-group select {
  border: 1px solid #cbdbe7 !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--premium-ink) !important;
  box-shadow: inset 0 1px 2px rgba(8, 39, 68, .03);
}
input:hover, textarea:hover, select:hover { border-color: #a8c7da !important; }
input:focus, textarea:focus, select:focus,
.field-input:focus, .field-select:focus, .contact-form-group input:focus, .contact-form-group textarea:focus {
  border-color: var(--premium-sky-500) !important;
  box-shadow: 0 0 0 4px rgba(42, 162, 210, .12), 0 8px 25px rgba(8, 58, 96, .06) !important;
}
label, .field-label { color: var(--premium-navy-800) !important; font-weight: 700 !important; }
.hp-field {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
form.is-submitting { cursor: wait; }

/* ===== الصور ===== */
.mhu-visual-ready .mhu-image { opacity: .01; filter: blur(5px); }
.mhu-visual-ready .mhu-image.is-ready { opacity: 1; filter: none; }
.item-thumb, .news-thumb, .archive-thumb, .content-media, .single-image, .minister-photo {
  overflow: hidden;
  background: linear-gradient(110deg, #eaf2f7 25%, #f8fbfd 45%, #eaf2f7 65%);
  background-size: 220% 100%;
  animation: mhu-skeleton 1.8s linear infinite;
}
.mhu-image-ready { animation: none !important; background: transparent !important; }

/* ===== الجداول والتصفح ===== */
.table-wrapper, .admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--premium-border);
  border-radius: 18px;
  box-shadow: var(--premium-shadow-sm);
}
table thead th { color: var(--premium-navy-800); background: #edf6fb !important; }
table tbody tr { transition: background-color .2s ease, transform .2s ease; }
table tbody tr:hover { background: #f3f9fc !important; }
.pagination, .hero-slider-dots { gap: 7px !important; }
.page-link { box-shadow: 0 7px 18px rgba(8, 58, 96, .06); }
.page-link:hover, .page-link.active { transform: translateY(-2px); border-color: var(--premium-sky-500) !important; }

/* ===== الخريطة والفوتر ===== */
.mhu-map-frame, .footer-map iframe {
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 20px !important;
  box-shadow: 0 20px 44px rgba(4, 27, 48, .22) !important;
  filter: saturate(.9) contrast(1.02);
}
.site-footer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 12%, rgba(125, 211, 239, .15), transparent 22rem),
    radial-gradient(circle at 6% 92%, rgba(214, 168, 63, .13), transparent 20rem),
    linear-gradient(140deg, #041525, #073254 58%, #0a5579) !important;
  color: #eaf5fc !important;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--premium-gold-500), var(--premium-sky-500), var(--premium-gold-500));
  background-size: 200% 100%;
  animation: mhu-footer-line 5s linear infinite;
}
.site-footer::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  bottom: -280px;
  inset-inline-end: -130px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}
.site-footer a { transition: color .2s ease, transform .22s var(--premium-spring); }
.site-footer a:hover { color: #fff !important; transform: translateX(-4px); }
html[dir="ltr"] .site-footer a:hover { transform: translateX(4px); }
.footer-col-title, .footer-col h3 { color: #fff !important; }
.footer-text, .footer-about, .footer-contact { color: #d4e7f4 !important; }

/* ===== أزرار المشاركة والتسهيلات ===== */
.share-btn, .social-icon, .header-social a, .footer-social a, .accessibility-toggle, .access-btn {
  box-shadow: 0 8px 20px rgba(8, 39, 68, .11);
}
.share-btn:hover, .social-icon:hover, .header-social a:hover, .footer-social a:hover,
.accessibility-toggle:hover, .access-btn:hover { transform: translateY(-3px) scale(1.03); }
.accessibility-panel {
  border: 1px solid var(--premium-border) !important;
  border-radius: 18px !important;
  box-shadow: var(--premium-shadow) !important;
  backdrop-filter: blur(16px);
}
.accessibility-panel.open { display: block !important; animation: mhu-pop-in .25s var(--premium-spring) both; }

/* ===== زر العودة للأعلى ===== */
.mhu-scroll-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 8900;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--premium-navy-800), var(--premium-blue-600));
  color: #fff;
  box-shadow: 0 14px 30px rgba(8, 58, 96, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.92);
}
.mhu-scroll-top span { font-size: 1.2rem; line-height: 1; }
.mhu-scroll-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.mhu-scroll-top:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 19px 38px rgba(8, 58, 96, .36); }

/* ===== كشف العناصر والانتقالات ===== */
.mhu-js .mhu-reveal {
  opacity: 0;
  transform: translateY(24px) scale(.985);
  filter: blur(2px);
  transition:
    opacity .72s var(--premium-ease),
    transform .72s var(--premium-ease),
    filter .72s ease;
}
.mhu-js .mhu-reveal.is-visible { opacity: 1; transform: none; filter: none; }
.mhu-js .mhu-delay-1 { transition-delay: .07s; }
.mhu-js .mhu-delay-2 { transition-delay: .14s; }
.mhu-js .mhu-delay-3 { transition-delay: .21s; }
.mhu-page-leaving main, .mhu-page-leaving .site-header, .mhu-page-leaving .site-footer {
  opacity: .38;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease !important;
}

/* ===== وضع التباين العالي ===== */
body.high-contrast {
  background: #07111f !important;
  color: #f8fafc !important;
}
body.high-contrast::before { opacity: .08; }
body.high-contrast .site-header { background: rgba(3, 13, 25, .95) !important; border-color: #334155 !important; }
body.high-contrast .site-title,
body.high-contrast .hero-title,
body.high-contrast .archive-title,
body.high-contrast .page-title,
body.high-contrast .content-title,
body.high-contrast .section-title,
body.high-contrast .item-title,
body.high-contrast .service-title,
body.high-contrast .news-title,
body.high-contrast .archive-item-title { color: #fff !important; }
body.high-contrast .item-card,
body.high-contrast .service-card,
body.high-contrast .news-card,
body.high-contrast .archive-item,
body.high-contrast .contact-card,
body.high-contrast .content-card,
body.high-contrast .side-card,
body.high-contrast .panel-card {
  border-color: #334155 !important;
  background: #0f1d2e !important;
  color: #f8fafc !important;
}
body.high-contrast input, body.high-contrast textarea, body.high-contrast select { background: #07111f !important; color: #fff !important; border-color: #475569 !important; }

/* ===== حركات ===== */
@keyframes mhu-orbit { to { transform: rotate(360deg); } }
@keyframes mhu-orbit-reverse { to { transform: rotate(-360deg); } }
@keyframes mhu-logo-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 22px 48px rgba(0, 10, 25, .34), 0 0 0 0 rgba(125, 211, 239, .20); }
  50% { transform: scale(1.045); box-shadow: 0 25px 55px rgba(0, 10, 25, .42), 0 0 0 12px rgba(125, 211, 239, 0); }
}
@keyframes mhu-loader-progress {
  0% { transform: translateX(170%); }
  100% { transform: translateX(-330%); }
}
html[dir="ltr"] .loader-progress span { animation-direction: reverse; }
@keyframes mhu-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@keyframes mhu-loader-float { to { transform: translate3d(16px, 22px, 0) scale(1.05); } }
@keyframes mhu-ambient { to { transform: translate3d(-18px, 20px, 0) scale(1.08); } }
@keyframes mhu-slide-content { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mhu-menu-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes mhu-pop-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes mhu-footer-line { to { background-position: -200% 0; } }
@keyframes mhu-skeleton { to { background-position: -220% 0; } }

/* ===== تجاوب ===== */
@media (max-width: 760px) {
  :root { --premium-radius: 18px; --premium-radius-lg: 23px; }
  body::before { background-size: 30px 30px; }
  .site-header { backdrop-filter: blur(13px) saturate(130%); }
  .hero-grid, .hero-inner, .hero-card, .archive-hero-card { border-radius: 23px !important; }
  .contact-card, .item-card, .service-card, .news-card, .archive-item { border-radius: 18px !important; }
  .item-card:hover, .service-card:hover, .news-card:hover, .archive-item:hover { transform: translateY(-3px); }
  .mhu-scroll-top { inset-inline-end: 14px; bottom: 14px; width: 42px; height: 42px; }
  .loader-emblem { width: 120px; height: 120px; }
  .loader-logo-circle { width: 76px !important; height: 76px !important; border-radius: 23px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .mhu-js .mhu-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}

@media print {
  .site-header, .site-footer, .share-box, .accessibility-panel, .accessibility-bar,
  .page-loader, .mhu-page-progress, .mhu-scroll-top { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  body::before { display: none !important; }
  .content-card, .archive-card, .item-card, .archive-item { box-shadow: none !important; border: 1px solid #bbb !important; }
  .mhu-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ===== CSP-safe utility replacements for former inline styles ===== */
.logo-fallback {
  color: var(--premium-blue-700);
  font-size: .9rem;
  font-weight: 800;
}
.logo-fallback-wide { font-size: .8rem; }
.mhu-inline-top { margin-top: .7rem; }
.mhu-section-heading { margin: .5rem 0 .4rem; font-size: 1rem; font-weight: 800; color: var(--premium-navy-900); }
.mhu-block-link { display: block; }
.mhu-card-footer, .mhu-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.mhu-card-footer { margin-top: auto; padding-top: .25rem; }
.mhu-side-note {
  padding: .95rem;
  border: 1px solid var(--premium-border);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--premium-shadow-sm);
  font-size: .86rem;
}
.mhu-home-link, .content-back-link { color: var(--premium-blue-700) !important; font-weight: 800; }
.archive-spacer { height: 1rem; }
.empty-state-icon { margin-bottom: .35rem; font-size: 1.8rem; }
.empty-state-title { margin-bottom: .25rem; font-weight: 800; color: var(--premium-navy-900); }
.mhu-empty-grid-card { grid-column: 1 / -1; text-align: center; }
.contact-info-spaced { margin-top: .35rem; }
.content-back-wrap { margin-top: .9rem; }

/* Standalone authenticated archive/detail views */
.admin-public-list-container { padding: 1rem .5rem 2rem; }
.section-empty-spaced { margin-top: 1rem; }
.news-detail-container { padding: 1.2rem .5rem 2rem; }
.news-detail-card {
  max-width: 850px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.7rem);
}
.news-detail-header { margin-bottom: .85rem; }
.news-detail-title {
  margin: 0 0 .25rem;
  color: var(--premium-navy-900);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.5;
}
.news-detail-time { color: var(--premium-muted); font-size: .82rem; }
.news-detail-media {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 18px;
  background: var(--premium-soft);
}
.news-detail-image { display: block; width: 100%; height: auto; border-radius: inherit; }
.news-detail-body { color: var(--premium-ink); font-size: .96rem; line-height: 1.95; }

/* ===== MHU 4.3 Cairo + responsive consistency layer ===== */
:root {
  --mhu-page-gutter: clamp(.875rem, 2.6vw, 1.5rem);
  --mhu-section-gap: clamp(2rem, 5vw, 4.75rem);
  --mhu-control-height: 46px;
}

html {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif !important;
}

body {
  width: 100%;
  min-width: 0;
  line-height: 1.75;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

*, *::before, *::after { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6,
.site-title, .header-title, .page-title, .archive-title, .content-title,
.section-title, .item-title, .news-title, .service-title, .single-title,
.loader-title {
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}

h1, .hero-title, .page-title, .archive-title, .content-title, .single-title {
  font-size: clamp(1.55rem, 3.9vw, 2.75rem) !important;
  line-height: 1.42 !important;
}

h2, .section-title { font-size: clamp(1.3rem, 2.8vw, 2rem) !important; }
h3, .item-title, .news-title, .service-title { font-size: clamp(1rem, 2vw, 1.25rem); }

p, li, dd, dt, td, th, label, small, span, a {
  overflow-wrap: anywhere;
  word-break: normal;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

iframe, embed, object {
  max-width: 100%;
}

.container,
.footer-inner,
.footer-grid,
.content-wrapper,
.single-wrapper,
.admin-public-list-container,
.news-detail-container {
  width: 100% !important;
  min-width: 0;
  padding-inline: var(--mhu-page-gutter) !important;
}

:where(
  .header-inner, .header-brand, .header-right, .main-nav, .mobile-nav,
  .hero-grid, .hero-inner, .hero-text, .hero-panel, .hero-slider,
  .content-grid, .content-layout, .content-card, .content-body,
  .archive-layout, .archive-grid, .archive-cards, .archive-item,
  .contact-grid, .contact-card, .footer-grid, .footer-layout, .footer-cols,
  .services-grid, .grid-list, .news-list, .news-card, .item-card,
  .minister-profile, .minister-card, .panel-card, .side-card,
  .results-head, .toolbar-actions, .filter-form, .search-grid
) > * {
  min-width: 0;
}

.main-sections,
.hero,
.archive-hero,
.section-card,
.contact-card,
.content-card,
.single-card {
  max-width: 100%;
}

.hero-grid,
.hero-inner,
.content-grid,
.content-layout,
.archive-layout,
.contact-grid,
.footer-grid,
.footer-layout,
.minister-profile {
  gap: clamp(1rem, 3vw, 2rem) !important;
}

.services-grid,
.grid-list,
.news-list,
.archive-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)) !important;
  gap: clamp(.85rem, 2.2vw, 1.35rem) !important;
}

.item-card,
.news-card,
.service-card,
.archive-item,
.contact-card,
.content-card,
.single-card,
.panel-card,
.side-card,
.dec-card {
  max-width: 100%;
  min-width: 0;
}

.item-thumb,
.news-thumb,
.archive-thumb,
.content-thumb,
.single-image,
.content-media {
  overflow: hidden;
}

.item-thumb img,
.news-thumb img,
.archive-thumb img,
.content-thumb img,
.single-image img,
.content-media img {
  width: 100%;
  object-fit: cover;
}

button,
input,
select,
textarea {
  max-width: 100%;
  min-width: 0;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.field-input,
.field-select {
  width: 100%;
  min-height: var(--mhu-control-height);
}

textarea { min-height: 120px; resize: vertical; }

.btn-primary,
.btn-secondary,
.primary-btn,
.secondary-btn,
.contact-submit,
.download-btn,
.details-link,
.item-link,
.service-link {
  min-height: 42px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.table-wrapper,
.content-body .table-responsive {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

table {
  max-width: 100%;
  border-collapse: collapse;
}

.content-body pre,
.content-body code,
.single-body pre,
.single-body code {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.header-inner {
  width: 100%;
  min-width: 0;
}

.header-brand,
.logo-wrap,
.brand-link {
  min-width: 0;
  flex-shrink: 1;
}

.header-text,
.brand-text { min-width: 0; }

.header-title,
.site-title,
.brand-title {
  white-space: normal;
  line-height: 1.45;
}

.main-nav,
.nav-links { max-width: 100%; }
.main-nav a, .nav-links a { line-height: 1.55; }

.page-loader { padding: clamp(1rem, 4vw, 2rem) !important; }
.loader-inner { width: min(100%, 340px) !important; }
.loader-title { font-size: clamp(1rem, 4vw, 1.35rem) !important; }
.loader-caption { max-width: 28rem; }

.mhu-scroll-top {
  inset-inline-end: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 1100px) {
  .hero-grid,
  .content-grid,
  .content-layout,
  .archive-layout,
  .contact-grid,
  .footer-layout,
  .minister-profile {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-panel,
  .side-card,
  .panel-card { width: 100%; }
}

@media (max-width: 900px) {
  :root { --mhu-page-gutter: clamp(.8rem, 3vw, 1.1rem); }

  .header-inner {
    gap: .65rem !important;
    padding-block: .55rem !important;
  }

  .header-logo,
  .brand-logo-img { width: 46px !important; height: 46px !important; }

  .header-title,
  .site-title { font-size: clamp(.9rem, 3vw, 1.08rem) !important; }

  .header-subtitle,
  .brand-subtitle { font-size: .72rem !important; }

  .footer-cols,
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  .hero-main-slide { min-height: clamp(190px, 43vw, 260px) !important; }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 76px; }

  body { line-height: 1.7; }

  .header-inner { flex-wrap: wrap; }
  .header-right { margin-inline-start: auto; }

  .main-nav.open,
  .mobile-nav.open {
    width: calc(100% - (var(--mhu-page-gutter) * 2));
    max-width: none;
    inset-inline: var(--mhu-page-gutter) !important;
    border-radius: 18px;
  }

  .main-nav.open a,
  .mobile-nav.open a {
    width: 100%;
    justify-content: flex-start;
    padding: .72rem .9rem;
  }

  .hero,
  .archive-hero,
  .main-sections { padding-block: clamp(1.2rem, 5vw, 2rem); }

  .hero-grid,
  .hero-inner,
  .hero-card,
  .archive-hero-card,
  .content-card,
  .single-card,
  .contact-card {
    border-radius: 20px !important;
  }

  .hero-actions,
  .toolbar-actions,
  .results-head,
  .mhu-flex-between,
  .mhu-card-footer,
  .item-footer,
  .service-footer,
  .archive-item-footer {
    align-items: stretch !important;
    flex-wrap: wrap;
  }

  .hero-actions > *,
  .toolbar-actions > *,
  .filter-form > *,
  .search-grid > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .footer-cols,
  .footer-grid { grid-template-columns: minmax(0, 1fr) !important; }

  .footer-map iframe { height: 220px !important; }

  .share-bar,
  .share-buttons,
  .accessibility-actions { flex-wrap: wrap; }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea { font-size: 16px !important; }

  .pagination { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  :root {
    --mhu-page-gutter: .78rem;
    --premium-radius: 16px;
    --premium-radius-lg: 20px;
  }

  .header-logo,
  .brand-logo-img { width: 42px !important; height: 42px !important; }

  .header-social { display: none; }

  .hero-main-content { padding: 1rem !important; }
  .hero-main-title { font-size: clamp(1rem, 5vw, 1.25rem) !important; }
  .hero-meta-row { gap: .35rem !important; }
  .hero-meta-chip { font-size: .7rem !important; }

  .item-card,
  .news-card,
  .service-card,
  .archive-item,
  .dec-card { border-radius: 16px !important; }

  .item-card,
  .news-card { grid-template-columns: minmax(0, 1fr) !important; }

  .item-thumb,
  .news-thumb { width: 100% !important; min-height: 170px; }

  .loader-emblem { width: 104px; height: 104px; margin-bottom: 16px; }
  .loader-logo-circle { width: 68px !important; height: 68px !important; }
  .loader-progress { width: min(100%, 220px); }

  .mhu-scroll-top { width: 40px; height: 40px; border-radius: 13px; }
}

@media (max-width: 380px) {
  .header-title,
  .site-title { font-size: .84rem !important; }
  .header-subtitle,
  .brand-subtitle { display: none; }
  .menu-toggle,
  .mobile-toggle,
  .nav-toggle,
  .mobile-menu-toggle { width: 40px; height: 40px; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .page-loader { align-items: start !important; overflow-y: auto; }
  .loader-inner { margin-block: 1rem; }
  .loader-emblem { width: 88px; height: 88px; margin-bottom: 10px; }
  .loader-logo-circle { width: 58px !important; height: 58px !important; }
  .loader-caption { margin-bottom: 10px; }
}

@media print {
  body,
  button,
  input,
  select,
  textarea { font-family: "Cairo", Tahoma, Arial, sans-serif !important; }
}

