/* ===== معاشي — طبقة التصميم الاحترافي (هيدر، رئيسية، فوتر، لوحة الموظفين) ===== */
:root { --ivory: #f6f7f4; --gold: #c9a14a; --gold-600: #a7812f; --gold-300: #e2c98c; --line: #e4e7e2; --hdr-h: 76px; }
body { background: #fff; }
.wrap { max-width: 1240px; padding: 0 28px; }
main.wrap { padding-top: 48px; }
body[data-page="home"] main.wrap { padding-top: 0; padding-bottom: 0; }
.bleed { width: 100vw; margin-right: calc(50% - 50vw); margin-left: calc(50% - 50vw); }

/* ===== الهيدر ===== */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.8) blur(16px); -webkit-backdrop-filter: saturate(1.8) blur(16px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(6, 35, 27, .35); }
.hdr { display: flex; align-items: center; gap: 36px; height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green-950); flex: none; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1; display: flex; flex-direction: column; gap: 4px; }
.brand-word small { font-family: var(--body); font-weight: 500; font-size: .72rem; color: var(--gold-600); letter-spacing: 0; }
.brand.light { color: #fff; }
.hdr-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.hdr-nav > a, .menu-btn { font: inherit; font-size: .98rem; font-weight: 500; color: var(--ink-2); background: none; border: 0; padding: 10px 14px; border-radius: 10px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hdr-nav > a:hover, .menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--ivory); color: var(--green-950); }
.hdr-nav > a.active { color: var(--green-950); font-weight: 600; }
.chev { width: 16px; height: 16px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.menu { position: relative; }
.mega { position: absolute; top: calc(100% + 12px); right: -12px; width: 760px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(6, 35, 27, .45); padding: 16px; display: grid; grid-template-columns: 1fr 230px; gap: 12px; animation: megaIn .22s var(--ease); }
.mega[hidden] { display: none; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.mega-item:hover { background: var(--ivory); }
.mega-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--green-50); color: var(--green-800); display: grid; place-items: center; flex: none; }
.mega-item b { display: block; font-family: var(--display); font-weight: 600; color: var(--green-950); font-size: .98rem; }
.mega-item small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.5; margin-top: 2px; }
.mega-promo { position: relative; border-radius: 16px; overflow: hidden; text-decoration: none; display: block; min-height: 220px; }
.mega-promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mega-promo span { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(to top, rgba(6, 35, 27, .92), transparent); color: #fff; }
.mega-promo b { display: block; font-family: var(--display); font-size: 1rem; }
.mega-promo small { color: var(--gold-300); font-size: .82rem; }
.hdr-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); color: var(--green-900); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; min-height: 40px; }
.tool-btn:hover { background: var(--ivory); }
.tool-btn[aria-pressed="true"] { background: var(--green-900); color: var(--gold-300); border-color: var(--green-900); }
.hdr-tools .font-ctl { border-color: var(--line); }
.hdr-tools .font-ctl button { min-height: 38px; }
.hdr-cta { margin: 0; min-height: 44px; padding: 8px 20px; }
.burger { display: none; padding: 8px; }
.mobile-menu { border-top: 1px solid var(--line); background: #fff; padding: 10px 20px 20px; display: grid; gap: 2px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: flex; gap: 14px; align-items: center; padding: 14px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--green-950); font-weight: 500; }
.mobile-menu .ic { color: var(--gold-600); }
.speak, .font-ctl { }

/* ===== الهيرو ===== */
.h-hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: center; overflow: hidden; background: var(--green-950); }
.h-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; animation: heroZoom 14s ease-out both; }
@keyframes heroZoom { from { transform: scale(1.06); } }
.h-hero-shade { position: absolute; inset: 0; background: linear-gradient(to left, rgba(4, 26, 20, .96) 0%, rgba(4, 26, 20, .9) 30%, rgba(4, 26, 20, .55) 46%, rgba(4, 26, 20, .05) 66%, transparent 100%); }
.h-hero-in { position: relative; width: 100%; padding-top: 72px; padding-bottom: 120px; }
.h-hero-copy { max-width: 680px; color: #fff; animation: enter .9s .1s var(--ease) both; }
.h-hero h1 { color: #fff; font-size: clamp(2.2rem, 1.2rem + 2.6vw, 3.3rem); line-height: 1.18; font-weight: 800; letter-spacing: -.02em; margin: 0 0 22px; }
.h-hero h1 span { color: var(--gold-300); }
.h-hero-copy > p { font-size: 1.22rem; color: rgba(255, 255, 255, .85); max-width: 30em; margin-bottom: 32px; }
.h-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.h-hero-cta .btn { margin: 0; }
.btn-gold { background: var(--gold); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.h-hero .btn, .h-cta .btn, .side-foot .btn { box-shadow: none; }
.svc-ic { box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .35); }
.btn-gold:hover { background: #d4ae5c; }

.h-track { position: relative; z-index: 2; max-width: 820px; margin: -56px auto 0; background: #fff; border-radius: 22px; box-shadow: 0 30px 70px -30px rgba(6, 35, 27, .45), 0 0 0 1px var(--line); padding: 14px 14px 14px 14px; display: flex; align-items: center; gap: 16px; }
.h-track-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--green-50); color: var(--green-800); display: grid; place-items: center; flex: none; }
.h-track > div { flex: 1; }
.h-track label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.h-track input { border: 0; padding: 0; min-height: 34px; font-family: var(--display); font-size: 1.25rem; letter-spacing: 2px; background: transparent; text-align: right; }
.h-track input:focus { box-shadow: none; }
.h-track:focus-within { box-shadow: 0 30px 70px -30px rgba(6, 35, 27, .45), 0 0 0 2px var(--green-800); }
.h-track .btn { margin: 0; }

/* ===== أقسام الرئيسية ===== */
.h-sec { padding: 110px 0 0; }
.h-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.h-head h2 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.7rem); line-height: 1.25; margin: 0; font-weight: 800; letter-spacing: -.015em; max-width: 14em; }
.h-head p { margin: 0; color: var(--muted); max-width: 26em; font-size: 1.05rem; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc { display: flex; flex-direction: column; border-radius: 24px; background: #fff; border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.svc:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -32px rgba(6, 35, 27, .4); border-color: transparent; }
.svc-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ivory); }
.svc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.svc:hover .svc-img img { transform: scale(1.05); }
.svc-body { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 30px 24px 24px; flex: 1; }
.svc-ic { position: absolute; top: -26px; right: 22px; width: 52px; height: 52px; border-radius: 16px; background: var(--green-900); color: var(--gold-300); display: grid; place-items: center; box-shadow: 0 10px 24px -10px rgba(6, 35, 27, .6); }
.svc-ic .ic { width: 24px; height: 24px; }
.svc b { font-family: var(--display); font-size: 1.2rem; color: var(--green-950); font-weight: 700; margin-top: 6px; }
.svc-body > span:not(.svc-ic):not(.svc-more) { color: var(--muted); font-size: .97rem; }
.svc-more { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--green-800); font-weight: 600; font-size: .93rem; }
.svc-more .ic { transition: transform .3s var(--ease); }
.svc:hover .svc-more .ic { transform: translateX(-4px); }

.alt { background: var(--ivory); }
.h-steps { margin-top: 110px; padding: 100px 0; }
.steps3 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps3 li { background: #fff; border-radius: 24px; padding: 36px 32px; border: 1px solid var(--line); }
.steps3 .n { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-900); color: var(--gold-300); font-family: var(--display); font-size: 1.5rem; font-weight: 700; margin-bottom: 22px; }
.steps3 h3 { font-size: 1.3rem; margin-bottom: 8px; }
.steps3 p { color: var(--muted); margin: 0; }

.h-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.h-feature.rev .h-feature-img { order: 2; }
.h-feature-img { margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3.3; box-shadow: 0 40px 80px -40px rgba(6, 35, 27, .45); }
.h-feature-img img { width: 100%; height: 100%; object-fit: cover; }
.h-feature-copy h2 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.25; margin: 0 0 16px; font-weight: 800; letter-spacing: -.015em; }
.h-feature-copy .lead { margin-bottom: 26px; }
.ticks { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.ticks .ic { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--green-50); color: var(--green-800); stroke-width: 2.4; }
.chan { display: grid; gap: 12px; }
.chan a { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; transition: border-color .2s, background .2s; }
.chan a:hover { border-color: var(--gold-300); background: #fffdf7; }
.chan .ic { grid-row: span 2; width: 48px; height: 48px; padding: 12px; border-radius: 14px; background: var(--green-900); color: var(--gold-300); }
.chan b { font-family: var(--display); color: var(--green-950); }
.chan span { color: var(--muted); font-size: .92rem; }

.h-cta { margin-top: 110px; background: var(--green-950); color: #fff; padding: 80px 0; position: relative; overflow: hidden; }
.h-cta:before { content: ""; position: absolute; inset: 0; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M17 47V31a15 15 0 0 1 30 0v16' fill='none' stroke='%23e2c98c' stroke-width='3'/%3E%3C/svg%3E"); background-size: 64px 64px; }
.h-cta-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.h-cta h2 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.4rem); margin: 0 0 8px; font-weight: 800; }
.h-cta p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 34em; }
.h-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.h-cta-btns .btn { margin: 0; }

/* ===== الفوتر ===== */
.site-footer { background: #041a14; color: rgba(255, 255, 255, .7); padding: 72px 0 0; font-size: .95rem; }
body:not([data-page="home"]) .site-footer { margin-top: 90px; }
.ftr { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.ftr h3 { color: #fff; font-size: 1rem; margin: 0 0 16px; }
.ftr a:not(.brand) { display: block; color: rgba(255, 255, 255, .7); text-decoration: none; padding: 5px 0; }
.ftr a:not(.brand):hover { color: var(--gold-300); }
.ftr-brand p { margin: 18px 0 0; max-width: 24em; }
.ftr-note { font-size: .85rem; }
.ftr-note .tag { margin-left: 6px; }
.ftr-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; padding-bottom: 28px; font-size: .82rem; color: rgba(255, 255, 255, .5); }

/* ===== لوحة الموظفين: قايمة جانبية ===== */
.staff-side { display: none; }
body.staff-mode .site-header, body.staff-mode .site-footer { display: none; }
body.staff-mode { background: #f3f5f2; }
body.staff-mode .staff-side { display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: 268px; background: #041a14; color: rgba(255, 255, 255, .75); padding: 22px 16px; z-index: 30; overflow-y: auto; }
body.staff-mode main.wrap { width: auto; max-width: none; margin: 0 268px 0 0; padding: 36px 44px 80px; }
.side-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; padding: 4px 8px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 10px; }
.side-brand .logo-mark { width: 40px; height: 40px; }
.side-brand span { font-family: var(--display); font-weight: 800; font-size: 1.25rem; display: flex; flex-direction: column; line-height: 1.1; }
.side-brand small { font-family: var(--body); font-weight: 500; font-size: .75rem; color: var(--gold-300); margin-top: 4px; }
.side-group { font-size: .72rem; font-weight: 600; color: rgba(255, 255, 255, .4); margin: 18px 12px 6px; letter-spacing: .02em; }
.staff-side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: rgba(255, 255, 255, .75); text-decoration: none; font-weight: 500; font-size: .95rem; margin-bottom: 2px; }
.staff-side nav a .ic { width: 20px; height: 20px; color: rgba(255, 255, 255, .45); }
.staff-side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.staff-side nav a.active { background: rgba(201, 161, 74, .14); color: #fff; }
.staff-side nav a.active .ic { color: var(--gold); }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 4px; }
.me { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--green-950); display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.me b { display: block; color: #fff; font-size: .92rem; } .me small { color: rgba(255, 255, 255, .5); font-size: .78rem; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: none; border: 0; color: rgba(255, 255, 255, .65); font: inherit; font-size: .88rem; text-decoration: none; cursor: pointer; text-align: right; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
body.staff-mode .card, body.staff-mode .kpi { border-color: #e6e9e4; box-shadow: 0 1px 2px rgba(6, 35, 27, .04); border-radius: 18px; }
body.staff-mode .page-head h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.01em; }
body.staff-mode .kpi .v { font-size: 2rem; }
body.staff-mode table th { background: #f7f8f6; }

/* ===== صفحات المواطن الداخلية ===== */
body:not(.staff-mode):not([data-page="home"]) main.wrap { padding-top: 56px; }
.narrow { box-shadow: 0 2px 6px rgba(6, 35, 27, .04), 0 40px 80px -48px rgba(6, 35, 27, .35); border-color: var(--line); }

/* ===== الموبايل والتابلت ===== */
@media (max-width: 1080px) {
  .hdr-nav, .hdr-tools .font-ctl { display: none; }
  .burger { display: inline-flex; }
  .speak span { display: none; }
  .hdr { justify-content: space-between; gap: 12px; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .mega { display: none !important; }
}
@media (max-width: 900px) {
  body.staff-mode .staff-side { position: sticky; top: 0; bottom: auto; width: auto; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; overflow-x: auto; gap: 8px; }
  body.staff-mode .staff-side nav { display: flex; gap: 4px; }
  body.staff-mode .side-group, body.staff-mode .side-foot, .side-brand small { display: none; }
  .side-brand { border: 0; padding: 0 4px; margin: 0; }
  .staff-side nav a { white-space: nowrap; margin: 0; }
  body.staff-mode main.wrap { margin: 0; padding: 24px 16px 60px; }
  .steps3, .h-feature { grid-template-columns: 1fr; gap: 28px; }
  .h-feature.rev .h-feature-img { order: 0; }
  .ftr { grid-template-columns: 1fr 1fr; }
  .h-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .hdr-cta { display: none; }
  .brand-word small { display: none; }
  .h-hero { display: block; min-height: 0; background: #041a14; }
  .h-hero-img { position: relative; display: block; height: 300px; object-position: 38% 35%; animation: none; }
  .h-hero-shade { inset: 0 0 auto 0; height: 300px; background: linear-gradient(to top, #041a14 0, rgba(4, 26, 20, 0) 110px); }
  .h-hero-in { padding-top: 4px; padding-bottom: 92px; }
  .h-hero h1 { font-size: 2.1rem; }
  .h-hero-cta .btn { flex: 1 1 100%; }
  .h-track { margin: -52px 18px 0; flex-wrap: wrap; }
  .h-track-ic { display: none; }
  .h-track .btn { width: 100%; }
  .svc-grid { grid-template-columns: 1fr; }
  .h-sec { padding-top: 80px; }
  .h-steps, .h-cta { margin-top: 80px; padding: 64px 0; }
  .ftr { grid-template-columns: 1fr; gap: 28px; }
}
