:root {
  --shell-bg: #0f172a;
  --shell-card: #172033;
  --shell-line: #334155;
  --shell-text: #f8fafc;
  --shell-muted: #cbd5e1;
  --shell-accent: #38bdf8;
}

.site-shell-header,
.site-shell-footer {
  font-family: 'Noto Sans Arabic', 'Cairo', system-ui, sans-serif;
}

.site-shell-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, .97);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}

.site-shell-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-shell-brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--shell-text);
  text-decoration: none;
  font-weight: 900;
  font-size: 21px;
  white-space: nowrap;
}

.site-shell-brand img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
}

.site-shell-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-inline-start: auto;
}

.site-shell-nav a,
.site-shell-footer a {
  color: var(--shell-muted);
  text-decoration: none;
  font-weight: 700;
}

.site-shell-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-shell-nav a:hover,
.site-shell-footer a:hover {
  color: #fff;
}

.site-shell-actions {
  display: flex;
  gap: 9px;
}

.site-shell-btn {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #475569;
  border-radius: 11px;
  color: var(--shell-text) !important;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-shell-btn:hover {
  background: rgba(255, 255, 255, .08);
}

.site-shell-btn-primary {
  background: #0369a1;
  border-color: #0284c7;
}

.site-shell-btn-primary:hover {
  background: #075985;
}

.site-shell-mobile {
  display: none;
  margin-inline-start: auto;
  position: relative;
}

.site-shell-mobile summary {
  width: 46px;
  height: 46px;
  border: 1px solid #475569;
  border-radius: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  list-style: none;
  color: #fff;
}

.site-shell-mobile summary::-webkit-details-marker { display: none; }
.site-shell-mobile summary svg { width: 24px; height: 24px; }

.site-shell-mobile-menu {
  position: absolute;
  top: 54px;
  inset-inline-end: 0;
  width: min(300px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--shell-line);
  background: var(--shell-card);
  border-radius: 15px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .3);
  display: grid;
  gap: 5px;
}

.site-shell-mobile-menu a {
  min-height: 46px;
  padding: 10px 12px;
  color: var(--shell-text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
}

.site-shell-mobile-menu a:hover { background: rgba(255, 255, 255, .07); }

.site-shell-footer {
  margin-top: 64px;
  background: var(--shell-bg);
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--shell-muted);
}

main + .site-shell-footer { margin-top: 0; }

.site-shell-footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 44px 0 28px;
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr;
  gap: 36px;
}

.site-shell-footer p { max-width: 45ch; line-height: 1.8; }
.site-shell-footer-links { display: grid; gap: 10px; }

.site-shell-footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-shell-footer h3 {
  color: var(--shell-text);
  font-size: 16px;
  margin: 0 0 14px;
}

.site-shell-footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
}

.site-shell-header a:focus-visible,
.site-shell-header summary:focus-visible,
.site-shell-footer a:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  .site-shell-nav, .site-shell-actions { display: none; }
  .site-shell-mobile { display: block; }
  .site-shell-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .site-shell-inner { min-height: 68px; width: calc(100% - 24px); }
  .site-shell-brand { font-size: 19px; }
  .site-shell-brand img { width: 40px; height: 40px; }
  .site-shell-footer-grid { grid-template-columns: 1fr; gap: 26px; width: calc(100% - 24px); }
  .site-shell-footer-bottom { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
