:root{
  --bg: #ffffff;
  --text: #0b1220;
  --muted: rgba(11,18,32,.66);
  --glass: rgba(255,255,255,.68);
  --glass2: rgba(255,255,255,.82);
  --stroke: rgba(11,18,32,.10);
  --stroke2: rgba(11,18,32,.14);
  --shadow: 0 18px 60px rgba(0,0,0,.20);
  --shadow2: 0 12px 30px rgba(0,0,0,.14);
  --accent: #1976d2; /* أزرق */
  --accent2: #0ea5e9;
  --radius: 18px;
  --topbar-height: 72px;
  --bottombar-height: 84px;
}

*{ box-sizing: border-box; }
html, body{
  height: 100%;
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: var(--text);
  overflow: hidden; /* هذا اللي يمنع السكرول */
}


body{
  background-color: #e5e5f3;
}

body.home{
  background-color: #000;
}

body.services{
  background-color: #f3f6ff;
}

body.services .bg{
  background: linear-gradient(180deg, #fdfdfd, #e1e8ff);
}


a{ color: inherit; text-decoration: none; }

.bg{
  position: fixed;
  inset: 0;
  z-index: -3;
  background: #e5e5f3;
}

body.home .bg{
  background: #000;
}

.bg__loader{
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(0,0,0,.84);
  color: #fff;
  transition: opacity .4s ease;
}
.bg__loader.is-hidden{
  opacity: 0;
  pointer-events: none;
}

.ring{
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid rgba(124,195,255,.6);
  background: transparent;
  text-align: center;
  line-height: 150px;
  font-size: 18px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #cbe7ff;
  text-shadow: 0 0 10px rgba(124,195,255,.8);
  box-shadow: 0 0 20px rgba(124,195,255,.35);
}
.ring::before{
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 3px solid transparent;
  border-top-color: #7cc3ff;
  border-right-color: #7cc3ff;
  animation: ring-spin 2s linear infinite;
}

.my-progress-bar{
  width: 220px;
  height: 6px;
  border-radius: 999px;
  background: #1f1f1f;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(255,255,255,.2);
}

.my-progress-bar__fill{
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(124,195,255,.35), #7cc3ff);
  animation: progress-glow 1.8s ease-in-out infinite;
}

@keyframes ring-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

@keyframes progress-glow{
  0%{ width: 0; }
  60%{ width: 100%; }
  100%{ width: 45%; }
}

.bg__video,
.bg__iframe{
  position: absolute;
  inset: 0;
  min-width: 100vw;
  min-height: 100vh;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  opacity: 1;
  border: none;
  pointer-events: none;
}

.bg__overlay{
  position: absolute;
  inset: 0;
  background: transparent;
  display: none;
}

body.services .bg__overlay{
  display: block;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(206,225,255,.6));
}

.bg__noise{
  position: absolute;
  inset: 0;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.bg__video,
.bg__iframe{
  transition: transform .35s ease;
}

@media (min-width: 1440px){
  .bg__video,
  .bg__iframe{
    inset: auto;
    top: 50%;
    left: 50%;
    width: 140vw;
    height: 140vh;
    transform: translate(-50%, -50%);
  }
}

.app{
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Topbar */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 72px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, var(--glass2), var(--glass));
  border-bottom: 1px solid var(--stroke);
}

.topbar__right{
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__left{
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--stroke2);
  padding: 4px;
  overflow: hidden;
}

.brand__mark img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.brand__title{
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.brand__sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar__meta{
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill{
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.72);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: rgba(11,18,32,.78);
}

.pill--btn{
  cursor: pointer;
}

.iconbtn{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow2);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
}

.iconbtn__bars{
  width: 20px;
  height: 2px;
  background: rgba(11,18,32,.78);
  border-radius: 2px;
  position: relative;
}
.iconbtn__bars::before,
.iconbtn__bars::after{
  content: "";
  position: absolute;
  right: 0;
  width: 20px;
  height: 2px;
  background: rgba(11,18,32,.78);
  border-radius: 2px;
}
.iconbtn__bars::before{ top: -6px; }
.iconbtn__bars::after{ top: 6px; }

/* Main */
.main{
  height: calc(100vh - var(--topbar-height) - var(--bottombar-height));
  margin: calc(var(--topbar-height)) auto calc(var(--bottombar-height)) auto;
  padding: 18px 18px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.hero,
.media-hero{
  width: min(1180px, 100%);
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.64);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 12px;
  overflow: hidden;
}

.hero__badge{
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.72);
  font-weight: 700;
  color: rgba(11,18,32,.78);
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 6px rgba(25,118,210,.12);
}

.hero__title{
  margin: 0;
  font-size: clamp(26px, 3.1vw, 44px);
  letter-spacing: .2px;
  line-height: 1.15;
}

.hero__desc{
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 17px);
  max-width: 70ch;
}

.hero__visual{
  width: 100%;
  min-height: 220px;
  border-radius: 22px;
  margin-top: 14px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.55), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(14,165,233,.45), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(6,18,38,.85));
  box-shadow: var(--shadow2);
  overflow: hidden;
}

.hero__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 1px solid var(--stroke2);
}

.btn--primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 40px rgba(25,118,210,.22);
}

.btn--ghost{
  background: rgba(255,255,255,.78);
  color: rgba(11,18,32,.85);
}

.hero__cards{
  margin-top: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  overflow: hidden;
}

.hero-stage{
  width: min(1220px, 100%);
  border-radius: 40px;
  background: rgba(7,11,23,0.75);
  padding: clamp(28px, 3.4vw, 40px);
  box-shadow: 0 40px 90px rgba(2,6,23,0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
  min-height: 260px;
  position: relative;
}

.hero-stage::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.05);
  pointer-events: none;
}

.hero-stage__preview{
  width: min(520px, 100%);
  background: rgba(255,255,255,0.98);
  border-radius: 28px;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid rgba(37,99,235,0.12);
  box-shadow: 0 25px 45px rgba(3,8,30,0.45);
  text-align: right;
  direction: rtl;
}

.hero-stage__preview-kicker{
  margin: 0;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(14,23,45,0.9);
}

.hero-stage__preview-title{
  margin: 8px 0 6px;
  font-size: 22px;
  line-height: 1.3;
  color: #111a2b;
}

.hero-stage__preview-copy{
  margin: 0;
  color: rgba(17,26,43,0.85);
  font-size: 14px;
  line-height: 1.6;
}

.hero-stage__preview-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-stage__preview-btn{
  min-width: 48%;
  justify-content: center;
}

.hero-stage__preview-tags{
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-stage__preview-tags span{
  font-size: 12px;
  color: #111a2b;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(37,99,235,0.15);
}

.services-hero{
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 22px;
  padding: clamp(28px, 2.6vw, 36px);
  border-radius: 40px;
  border: 1px solid rgba(11,18,32,.08);
  background: rgba(255,255,255,.85);
  box-shadow: 0 30px 70px rgba(15,30,80,.18);
  margin-top: 24px;
}

.services-hero__intro{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.services-hero__intro-copy{
  margin: 0;
  color: rgba(11,18,32,.75);
  line-height: 1.7;
  font-size: 15px;
}

.services-hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.services-hero__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.services-board{
  width: min(1220px, 100%);
  border-radius: 40px;
  padding: clamp(28px, 2.8vw, 46px);
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,30,60,.12);
  box-shadow: 0 40px 90px rgba(15,30,60,.25);
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: right;
}

.services-board__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.service-tile{
  border-radius: 30px;
  padding: 24px;
  min-height: 150px;
  color: #0f172a;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  box-shadow: 0 20px 45px rgba(15,23,42,.18);
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-tile__title{
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
}

.service-tile__tagline{
  margin: 0;
  font-size: 14px;
  color: rgba(15,23,42,.75);
  line-height: 1.5;
}

.service-tile:hover{
  transform: translateY(-6px);
  box-shadow: 0 32px 55px rgba(15,23,42,.25);
}

.service-tile--cobalt{
  background: linear-gradient(145deg, #d7e4ff, #a1b9ff);
}
.service-tile--orchid{
  background: linear-gradient(145deg, #f6e6ff, #d1b8ff);
}
.service-tile--sky{
  background: linear-gradient(145deg, #cdeafe, #8aceff);
}
.service-tile--mint{
  background: linear-gradient(145deg, #d1f5e3, #94d7bd);
}
.service-tile--pearl{
  background: linear-gradient(145deg, #fff8f3, #fbd9c7);
}
.service-tile--lavender{
  background: linear-gradient(145deg, #e7dfff, #c1b0ff);
}
.service-tile--citrus{
  background: linear-gradient(145deg, #ffe6c4, #ffc383);
}
.service-tile--aqua{
  background: linear-gradient(145deg, #d6fcff, #94dce6);
}
.service-tile--peach{
  background: linear-gradient(145deg, #ffe1d0, #ffb69b);
}

.service-card{
  border-radius: 22px;
  padding: 20px 18px;
  min-height: 128px;
  border: 1px solid rgba(255,255,255,.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  text-decoration: none;
  color: #111a2b;
  box-shadow: 0 18px 35px rgba(8,18,36,.18);
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 25px 45px rgba(8,18,36,.25);
}

.service-card__label{
  font-weight: 700;
  font-size: 16px;
  color: inherit;
}

.service-card__tagline{
  margin: 0;
  font-size: 13px;
  color: rgba(11,18,32,.7);
  line-height: 1.4;
}

.service-card--blue{
  background: linear-gradient(145deg, #dbe8ff, #9fb8ff);
}
.service-card--violet{
  background: linear-gradient(145deg, #f6e9ff, #e1b3ff);
}
.service-card--cyan{
  background: linear-gradient(145deg, #e0f5ff, #9dd6ff);
}
.service-card--peach{
  background: linear-gradient(145deg, rgba(255,224,185,1), rgba(255,182,143,1));
}
.service-card--mint{
  background: linear-gradient(145deg, #d8fff4, #aee6d6);
}
.service-card--pearl{
  background: linear-gradient(145deg, #fff6f3, #fbd5cd);
}
.service-card--lapis{
  background: linear-gradient(145deg, #c7d6ff, #8692f0);
}
.service-card--lavender{
  background: linear-gradient(145deg, #e9deff, #c7b5ff);
}
.service-card--aqua{
  background: linear-gradient(145deg, #d7fcff, #9fe5f4);
}

.services-highlights{
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.highlight-card{
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(11,18,32,.08);
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow2);
  text-align: right;
}

.highlight-card h3{
  margin: 0 0 6px;
  font-size: 18px;
}

.highlight-card p{
  margin: 0;
  color: rgba(11,18,32,.65);
  line-height: 1.6;
  font-size: 14px;
}

@media (min-width: 1200px){
  .hero-stage{
    padding-bottom: 180px;
  }

  .hero-stage__preview{
    position: fixed;
    bottom: calc(var(--bottombar-height) + 20px);
    left: 28px;
    max-width: 420px;
    width: min(420px, 92vw);
    box-shadow:
      0 30px 60px rgba(3,8,30,0.45),
      0 18px 45px rgba(0,0,0,0.2);
    z-index: 32;
  }
}

.quick-links{
  width: min(1220px, 100%);
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.quick-link-card{
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(248,250,255,0.95);
  padding: 16px 20px;
  box-shadow: 0 18px 40px rgba(3,8,28,0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}

.quick-link-card h2{
  margin: 0;
  font-size: 18px;
  text-align: right;
}

.quick-link-card p{
  margin: 0;
  color: rgba(11,18,32,0.7);
  font-size: 14px;
  line-height: 1.4;
  text-align: right;
}

.quick-link-card__icon{
  font-size: 24px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(37,99,235,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
}

.quick-link-card a{
  align-self: flex-end;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 900px){
  .hero-stage{
    padding: 22px;
  }
}

@media (max-width: 640px){
  .hero-stage__preview-btn{
    width: 100%;
  }
}

.about{
  width: min(1180px, 100%);
  margin-top: 34px;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: flex-start;
}

.about.split-layout{
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
}

.about__cards{
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.info-card{
  border-radius: 22px;
  padding: 20px 22px;
  color: #fff;
  box-shadow: 0 25px 40px rgba(4,18,38,.22);
}

.info-card__title{
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 6px;
}

.info-card__desc{
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
  opacity: .95;
}

.info-card--data{
  background: linear-gradient(135deg, #00c6a7, #1dd9c2);
}

.info-card--knowledge{
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.info-card--partnership{
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.info-card--insight{
  background: linear-gradient(135deg, #8258ff, #a855f7);
}

.about__content{
  background: rgba(255,255,255,.75);
  border-radius: 24px;
  padding: 10px;
  border: 1px solid var(--stroke);
  box-shadow: 0 20px 45px rgba(0,0,0,.08);
  max-width: 100%;
}

.about__eyebrow{
  font-size: 14px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 8px;
}

.section__title,
.about__content h2{
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 34px);
}

.about__content p{
  margin: 0 0 12px;
  line-height: 1.9;
  color: rgba(11,18,32,.78);
}

.about__closing{
  font-weight: 700;
  color: var(--accent);
}

.about__grid{
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* عرض بطاقات المكتبة في صف واحد بعرض كامل الصفحة */
body.library .about__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  overflow: visible;
}


.about__card{
  min-height: 220px;
  border-radius: 24px;
  padding: 26px;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.about__card--vision{
  background-image: linear-gradient(135deg, rgba(25,118,210,.85), rgba(14,165,233,.82));
}

.about__card--mission{
  background-image: linear-gradient(135deg, rgba(227,54,61,.88), rgba(249,115,22,.78));
}

.about__card--goals{
  background-image: linear-gradient(135deg, rgba(16,185,129,.85), rgba(6,182,212,.78));
}

.about__card h3{
  margin: 0 0 8px;
  font-size: 22px;
}

.about__card p{
  margin: 0;
  line-height: 1.6;
}

body.contact{
  background: linear-gradient(180deg, #f7f8ff, #e3e8ff);
}

body.contact .bg{
  background: linear-gradient(180deg, #fdfdfd, #e7edff);
}

body.suggestions{
  background: linear-gradient(180deg, #fcf5ff, #e1ebff);
}

body.suggestions .bg{
  background: linear-gradient(180deg, #ffffff, #e4ecff);
}

.contact-hero{
  width: min(1220px, 100%);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.95);
  padding: clamp(28px, 2.4vw, 42px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  text-align: right;
}

.contact-hero__eyebrow{
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 13px;
}

.contact-hero__title{
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 36px);
}

.contact-hero__desc{
  margin: 0 0 18px;
  line-height: 1.7;
  color: var(--muted);
}

.contact-hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-hero__card{
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(25,118,210,.12), rgba(14,165,233,.18));
  border: 1px solid rgba(25,118,210,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

.contact-hero__card-title{
  margin: 0 0 12px;
  font-weight: 800;
  color: #0f172a;
}

.contact-hero__list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-hero__list span{
  display: block;
  font-size: 13px;
  color: rgba(11,18,32,.7);
}

.contact-hero__list a{
  font-weight: 700;
  color: #0f172a;
}

.contact-cards{
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.contact-card{
  border-radius: 24px;
  border: 1px solid rgba(11,18,32,.08);
  background: rgba(255,255,255,.95);
  padding: 22px;
  box-shadow: var(--shadow2);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.contact-card h3{
  margin: 0;
  font-size: 18px;
}

.contact-card__link{
  margin-top: auto;
  font-weight: 700;
  color: var(--accent);
}

.contact-card__meta{
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.contact-form-card{
  width: min(1180px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(11,18,32,.12);
  background: rgba(255,255,255,.96);
  padding: clamp(24px, 3vw, 44px);
  box-shadow: var(--shadow);
}

.contact-form-card__header p{
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact-form-card__actions{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.contact-form-card__note{
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 860px){
  .contact-hero{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px){
  .about{
    grid-template-columns: 1fr;
  }
  .about__cards{
    flex-direction: row;
    flex-wrap: wrap;
  }
  .info-card{
    flex: 1 1 45%;
    min-width: 48%;
  }
}

.card{
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.76);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  min-height: 112px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card__body{
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card__media{
  width: 100%;
  margin-bottom: 12px;
}
.card__media img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--stroke);
}

.card__icon{
  font-size: 20px;
  margin-bottom: 10px;
}

.card__title{
  font-weight: 900;
  margin-bottom: 6px;
}

.card__text{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card__actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  margin-top: auto;
}

.card__actions .btn{
  width: 100%;
}

.card__actions .meta{
  align-self: flex-start;
}

.card-grid{
  width: min(1180px, 100%);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-card,
.table-card{
  width: min(1180px, 100%);
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.9);
  padding: 26px;
  box-shadow: 0 18px 45px rgba(0,0,0,.08);
}

.form-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-grid label,
.form-block{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: rgba(11,18,32,.7);
  font-size: 13px;
}

.form-grid input,
.filters input,
.form-card select,
.filters select,
.form-card textarea{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(11,18,32,.18);
  padding: 10px 14px;
  font-size: 14px;
  background: rgba(255,255,255,.94);
}

.form-card textarea{
  min-height: 120px;
  resize: vertical;
}

.table-wrap{
  overflow-x: auto;
  margin-top: 16px;
}

.table-wrap table{
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td{
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
  text-align: left;
}

.table-wrap tbody tr:last-child td{
  border-bottom: none;
}

.alert{
  width: min(1180px, 100%);
  border-radius: 16px;
  border: 1px solid transparent;
  padding: 12px 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.alert--success{
  background: rgba(16,185,129,.12);
  border-color: rgba(16,185,129,.35);
  color: rgba(16,185,129,.9);
}

.alert--error{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.4);
  color: rgba(239,68,68,.9);
}

.empty-state{
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.filters{
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 24px 0 16px;
}

.filters button{
  height: 48px;
}

.documents-grid .document-card,
.releases-grid .document-card{
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
}

.pagination{
  width: min(1180px, 100%);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pagination a{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-weight: 700;
  color: rgba(11,18,32,.8);
}

.pagination a.active{
  background: rgba(25,118,210,.12);
  border-color: rgba(25,118,210,.4);
  color: var(--accent);
}

.media-controls{
  width: min(1180px, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.media-controls__tabs{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.media-controls__tab{
  flex: 1 1 160px;
  min-width: 160px;
  justify-content: center;
  text-align: center;
}

.media-controls__summary{
  margin: 0;
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}

.gallery-grid{
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.media-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  grid-auto-rows: minmax(0, 1fr);
  align-items: stretch;
}

@media (max-width: 1120px){
  .media-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  .media-grid{
    grid-template-columns: 1fr;
  }
}

.media-item{
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.94);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.media-item img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.media-item figcaption{
  padding: 12px 16px;
  font-weight: 600;
  color: rgba(11,18,32,.8);
  margin-top: auto;
}

.video-card{
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.94);
  padding: 18px;
  box-shadow: 0 12px 35px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.video-card h3{
  margin: 0;
  font-size: 18px;
}

.video__embed{
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding-top: 56.25%;
  border: 1px solid var(--stroke);
  margin-top: auto;
}

.video__embed iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.media-grid--videos .video-card{
  min-height: 320px;
}

.media-item[data-media-trigger],
.video-card[data-media-trigger]{
  cursor: pointer;
}

.media-item[data-media-trigger]:focus-visible,
.video-card[data-media-trigger]:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.video-card .video__embed iframe{
  pointer-events: none;
}

.media-modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
  pointer-events: none;
}

.media-modal.is-open{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.media-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
}

.media-modal__panel{
  position: relative;
  width: min(720px, calc(100% - 32px));
  background: rgba(255, 255, 255, .98);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .25);
  z-index: 2;
}

.media-modal__close{
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: rgba(0, 0, 0, .65);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.media-modal__content{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.media-modal__media img,
.media-modal__media iframe{
  width: 100%;
  border-radius: 16px;
  display: block;
  max-height: 480px;
  object-fit: contain;
}

.media-modal__media iframe{
  height: 360px;
  border: none;
}

.media-modal__text{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.media-modal__title{
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: right;
}

.media-modal__caption{
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

.media-modal__fallback{
  margin: 0;
  font-weight: 500;
  color: var(--text);
}

.documents-grid .document-card .btn,
.releases-grid .document-card .btn{
  align-self: flex-start;
}
.documents-grid .document-card .btn,
.releases-grid .document-card .btn{
  align-self: flex-start;
}

/* News modal */
.news-modal{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.news-modal.is-open{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.news-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
}
.news-modal__panel{
  position: relative;
  width: min(760px, calc(100% - 32px));
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(255,255,255,.94);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  padding: 24px;
  box-shadow: var(--shadow);
  z-index: 2;
}
.news-modal__close{
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(11,18,32,.08);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.news-modal__content{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-modal__title{
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
}
.news-modal__body{
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}
.news-modal__gallery{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.news-modal__gallery img{
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  height: 160px;
  object-fit: cover;
}

/* Bottom bar */
.bottombar{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 84px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  backdrop-filter: blur(14px);
  background: linear-gradient(0deg, var(--glass2), var(--glass));
  border-top: 1px solid var(--stroke);
}

.bottombar__item{
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.70);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px 6px;
}

.bottombar__item.is-active{
  border-color: rgba(25,118,210,.35);
  box-shadow: 0 12px 30px rgba(25,118,210,.12);
}

.bottombar__icon{ font-size: 18px; }
.bottombar__label{
  font-size: 12px;
  font-weight: 800;
  color: rgba(11,18,32,.78);
}

/* Side menu */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.sidemenu{
  position: fixed;
  top: 12px;
  bottom: 12px;
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 50;
  transform: translateX(110%);
  transition: transform .22s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.sidemenu.is-open{
  transform: translateX(0);
}

.sidemenu__head{
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--stroke);
}

.sidemenu__title{
  font-weight: 900;
}

.sidemenu__nav{
  padding: 10px;
  display: grid;
  gap: 8px;
  overflow: auto; /* داخل القائمة فقط */
}

.sidemenu__link{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.76);
  font-weight: 800;
  color: rgba(11,18,32,.82);
}

.sidemenu__link.is-active{
  border-color: rgba(25,118,210,.35);
  background: linear-gradient(135deg, rgba(25,118,210,.12), rgba(14,165,233,.08));
}

.sidemenu__foot{
  padding: 12px 14px;
  border-top: 1px solid var(--stroke);
  display: grid;
  gap: 10px;
}

.mini__label{
  color: var(--muted);
  font-size: 12px;
}
.mini__value{
  font-weight: 800;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 980px){
  .hero__cards{ grid-template-columns: repeat(2, 1fr); }
  .bottombar{ grid-template-columns: repeat(3, 1fr); height: 92px; }
  .hero{ padding: 18px; }
}

@media (max-width: 520px){
  .topbar{ height: 68px; }
  .brand__sub{ display: none; }
  .hero__cards{ grid-template-columns: 1fr; }
  .bottombar{ grid-template-columns: repeat(3, 1fr); }
}

/* Control panel auth */
.auth-page{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% -15%, rgba(14,165,233,.25), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(25,118,210,.2), transparent 40%);
  position: relative;
  padding: 40px 24px;
  font-family: "Cairo", sans-serif;
}

.auth-page__overlay{
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,.92), rgba(2,6,23,.9));
  z-index: -1;
}

.auth-card{
  width: min(480px, 100%);
  background: rgba(255,255,255,.92);
  border-radius: 24px;
  border: 1px solid rgba(11,18,32,.12);
  padding: 32px 36px;
  box-shadow: 0 38px 60px rgba(2,6,23,.45);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-card__tag{
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--accent2);
  margin-bottom: 8px;
}

.auth-card__header h1{
  margin: 0;
  font-size: 32px;
  font-weight: 700;
}

.auth-card__subtitle{
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form__label{
  font-size: 13px;
  font-weight: 600;
}

.auth-form__input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(11,18,32,.24);
  font-size: 16px;
  background: rgba(255,255,255,.98);
}

.auth-form__input:focus{
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(25,118,210,.18);
}

.auth-form__row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.auth-form__checkbox{
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.auth-form__link{
  color: var(--accent);
  font-weight: 700;
}

.auth-form__notice{
  min-height: 32px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.auth-card__security h2{
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.auth-card__security ul{
  margin: 8px 0 0;
  padding-right: 16px;
  list-style: disc;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card__security-footnote{
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(11,18,32,.62);
}

.auth-support{
  margin-top: 32px;
  width: min(480px, 100%);
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.85);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 640px){
  .auth-card{
    padding: 28px 22px;
  }

  .auth-support{
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }
}

/* تعطيل أقسام البطل في الصفحات التي لا تحتاجها */
.hero, .media-hero{
  display: none !important;
}

/* ===== تعديلات صفحة المكتبة الإلكترونية ===== */
body.library .about{
  display: block;
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 0 12px 24px;
}

body.library .about__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  overflow: visible;
  padding: 0;
}

body.library .about__grid .card{
  min-width: 0;
}
