/* ============================================================
   قوات الطوارئ الخاصة — Stylesheet
   ============================================================ */

:root {
  --bg: #070d16;
  --card: #0b1728;
  --bg-secondary: #050e1b;
  --blue-light: #152a48;
  --blue-primary-light: #3f7fca;
  --border: rgba(148, 184, 225, .22);
  --text-primary: #eef5ff;
  --text-secondary: #b7c6d9;
  --blue-deep: #79a9d7;
  --button-bg: #285f9f;
  --button-hover: #3f7fca;
  color-scheme: dark;

  --radius-sm: 12px;
  --radius-lg: 18px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .24);
  --shadow-hover: 0 6px 18px rgba(0, 0, 0, .32);
  --transition: 260ms ease;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #10243d 0, #0a1728 420px, #060d17 1100px, #050b13 100%);
  color: var(--text-primary);
  font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

p { margin: 0; }

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; display: block; }

/* ============ NAVBAR ============ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 9, 15, .90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-logo {
  height: 38px;
  width: auto;
}

.navbar-logo.logo-fallback {
  display: none;
}

.navbar-title {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.navbar-links::-webkit-scrollbar { display: none; }

.navbar-links a {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.navbar-links a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.navbar-links a.active {
  color: var(--blue-deep);
  font-weight: 500;
}

.navbar-links a.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 12px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-primary-light);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.navbar-toggle span {
  width: 16px;
  height: 2px;
  background: var(--text-primary);
  margin: 0 auto;
  transition: transform var(--transition), opacity var(--transition);
}

.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */

.hero {
  position: relative;
  padding: 96px 24px 88px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 67, 108, 0.22), rgba(7, 17, 30, 0.12));
}

.hero-bg {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-shape {
  position: absolute;
  opacity: 0.5;
}

.hero-shape circle, .hero-shape rect {
  fill: var(--blue-light);
}

.hero-shape-1 { width: 260px; height: 260px; top: -90px; right: -70px; }
.hero-shape-2 { width: 160px; height: 160px; bottom: -50px; left: -40px; opacity: 0.35; }
.hero-shape-2 rect { fill: var(--bg-secondary); }
.hero-shape-3 { width: 90px; height: 90px; top: 40%; left: 6%; opacity: 0.4; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}

.hero-logo {
  height: 96px;
  width: auto;
  margin: 0 auto 28px;
}

.hero-logo.logo-fallback-hero {
  display: none;
}

.hero-title {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 6px;
}

.hero-subtitle-en {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--blue-deep);
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
}

.btn-primary {
  display: inline-block;
  background: var(--blue-deep);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 34px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

/* ============ SECTIONS ============ */

.section {
  padding: 76px 0;
  scroll-margin-top: 84px;
}

.section-alt {
  background: rgba(12, 25, 42, 0.28);
}

.section-header {
  margin-bottom: 40px;
  text-align: center;
}

.section-header h2 {
  font-size: 26px;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: var(--blue-primary-light);
}

.subsection {
  margin-top: 52px;
}

.subsection-title {
  font-size: 19px;
  margin-bottom: 20px;
  color: var(--text-primary);
  border-right: 3px solid var(--blue-primary-light);
  padding-right: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ============ DEFINITION ============ */

.definition-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 36px;
  max-width: 840px;
  margin: 0 auto;
}

.definition-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  color: var(--blue-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.definition-icon svg { width: 26px; height: 26px; }

.definition-text {
  font-size: 16px;
  color: var(--text-primary);
}

/* ============ RULES ============ */

.rules-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.rule-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}

.rule-group.full-width {
  grid-column: 1 / -1;
}

.rule-group h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--blue-deep);
}

.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rule-counter;
}

.rules-list li {
  counter-increment: rule-counter;
  display: flex;
  gap: 12px;
  padding: 10px 0;
  font-size: 14.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.rules-list li:last-child { border-bottom: none; }

.rules-list li::before {
  content: counter(rule-counter);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--blue-light);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rules-list-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 32px;
}

.rules-list-columns li {
  border-bottom: 1px solid var(--border);
}

/* ============ NOTES ============ */

.notes-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-right: 4px solid var(--blue-primary-light);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  box-shadow: var(--shadow);
}

.notes-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-box li {
  position: relative;
  padding: 9px 0 9px 0;
  padding-right: 22px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
}

.notes-box li:last-child { border-bottom: none; }

.notes-box li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-primary-light);
}

.complaints-group {
  margin-bottom: 28px;
}

.complaints-group:last-child { margin-bottom: 0; }

.complaints-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}

.complaints-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.complaint-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.complaint-card:hover {
  box-shadow: var(--shadow-hover);
}

.complaint-rank {
  font-size: 13px;
  color: var(--blue-deep);
  font-weight: 700;
  margin-bottom: 4px;
}

.complaint-position {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.complaint-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.complaint-name {
  font-weight: 700;
}

.complaint-code {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 3px 9px;
  border-radius: 6px;
}

/* ============ TIMELINE ============ */

.timeline {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-right: 28px;
  border-right: 2px solid var(--border);
}

.timeline-step {
  position: relative;
  margin-bottom: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}

.timeline-step:last-child { margin-bottom: 0; }

.timeline-step::before {
  content: "";
  position: absolute;
  right: -35px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue-deep);
  border: 3px solid var(--blue-light);
}

.timeline-step h3 {
  font-size: 17px;
  color: var(--blue-deep);
  margin-bottom: 14px;
}

.timeline-intro {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.timeline-step .rules-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-primary-light);
  align-self: center;
}

/* ============ SAFE ESCAPE ============ */

.safe-escape-card {
  padding: 30px 32px;
  max-width: 760px;
  margin: 0 auto;
}

/* ============ RANKS ============ */

.ranks-block {
  margin-bottom: 40px;
}

.ranks-block:last-of-type { margin-bottom: 0; }

.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.rank-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 20px 12px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.rank-photo-slot {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.leadership-grid, .weekly-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.weekly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.leader-card { text-align: center; color: var(--text-primary); text-decoration: none; }
.leader-card h3 { overflow-wrap: anywhere; }
.leader-card p { color: var(--text-secondary); margin-top: 12px; }
.member-avatar-placeholder { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-secondary); display: grid; place-items: center; margin: 0 auto 20px; font-size: 30px; color: #d7b65c; }
@media (max-width: 650px) { .leadership-grid, .weekly-grid { grid-template-columns: 1fr; } }
.rank-photo-slot svg { width: 18px; height: 18px; }
.rank-photo-image { background: transparent; border: 0; }
.rank-photo-image img { width: 100%; height: 100%; object-fit: contain; }

.rank-name {
  font-size: 14px;
  font-weight: 500;
}

.rank-index {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.protocol-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.protocol-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  align-items: center;
}

.protocol-range {
  font-size: 14px;
  color: var(--text-primary);
}

.protocol-rule {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.protocol-example {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--blue-light);
  border-radius: 8px;
  padding: 7px 12px;
  text-align: center;
}

.salute-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

/* ============ MILITARY ROWS ============ */

.rows-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.row-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row-card h3 {
  font-size: 17px;
  padding: 22px 24px 0;
}

.row-image-slot {
    margin: 18px 24px 0;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-image-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.row-image-slot svg { width: 26px; height: 26px; opacity: 0.7; }

.row-card ul {
  list-style: none;
  margin: 0;
  padding: 18px 24px 24px;
}

.row-card ul li {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-right: 18px;
}

.row-card ul li:last-child { border-bottom: none; }

.row-card ul li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-primary-light);
}

/* ============ IMMUNITIES ============ */

.immunities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.immunity-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}

.immunity-card[data-tier="1"] { border-top: 4px solid var(--blue-deep); }
.immunity-card[data-tier="2"] { border-top: 4px solid var(--blue-primary-light); }
.immunity-card[data-tier="3"] { border-top: 4px solid var(--blue-primary-light); }

.immunity-card h3 {
  font-size: 17px;
  margin-bottom: 16px;
}

.immunity-members {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  flex-grow: 1;
}

.immunity-members li {
  font-size: 13.5px;
  color: var(--text-primary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.immunity-members li:last-child { border-bottom: none; }

.immunity-authority {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: auto;
}

/* ============ PROTOCOLS ============ */

#protocols .rules-list {
  max-width: 760px;
  margin: 0 auto 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 8px 28px;
}

.wave-card {
  max-width: 340px;
  margin: 0 auto;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wave-label {
  font-size: 15px;
  font-weight: 500;
}

.wave-badge {
  font-size: 22px;
  font-weight: 900;
  color: var(--blue-deep);
  background: var(--blue-light);
  border-radius: 10px;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ FOOTER ============ */

.footer {
  background: var(--bg-secondary);
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.footer-logo {
  height: 44px;
  width: auto;
  margin: 0 auto 16px;
}

.footer-logo.logo-fallback { display: none; }

.footer-title {
  font-weight: 700;
  font-size: 15px;
}

.footer-subtitle {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--blue-deep);
  margin-top: 4px;
  font-weight: 700;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 14px;
}

/* ============ ANIMATION ============ */

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 350ms ease, transform 350ms ease;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 860px) {
  .rules-groups { grid-template-columns: 1fr; }
  .rows-grid { grid-template-columns: 1fr; }
  .immunities-grid { grid-template-columns: 1fr; }
  .protocol-row { grid-template-columns: 1fr; gap: 6px; text-align: center; }
  .rules-list-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .navbar-links {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    bottom: 0;
    background: var(--card);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  .navbar-links.open {
    transform: translateX(0);
  }

  .navbar-links a {
    padding: 14px 16px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .navbar-toggle { display: flex; }

  .navbar-logo { height: 30px; }
  .navbar-title { font-size: 14px; }

  .hero { padding: 64px 20px 56px; }
  .hero-logo { height: 72px; }
  .hero-title { font-size: 26px; }

  .section { padding: 56px 0; }
  .container { padding: 0 18px; }

  .definition-card { flex-direction: column; padding: 26px; }

  .ranks-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  .complaints-grid { grid-template-columns: 1fr; }
}

.search {
    width: 500px;
    height: 60px;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 0 18px;
    margin: 35px auto;

    background: #101722;
    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);

    box-sizing: border-box;
    overflow: hidden;
}

.search input {
    all: unset;

    flex: 1;
    min-width: 0;

    color: #ffffff;
    font-size: 15px;
    font-family: inherit;

    direction: rtl;
    text-align: right;

    cursor: text;
}

.search input::placeholder {
    color: #7f91aa;
    opacity: 1;
}

.search-icon {
    color: #79a9d7;
    font-size: 30px;
    line-height: 1;
    text-shadow: 0 0 10px rgba(121, 169, 215, .35);
}

.search-svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;

    fill: none;
    stroke: #79a9d7;
    stroke-width: 2;
    stroke-linecap: round;
}
/* Shared navy atmosphere from the SEF platform. */
.hero {
  background: radial-gradient(circle at 78% 8%, rgba(40, 95, 159, .22), transparent 34%), linear-gradient(135deg, #070d16 0%, #101722 50%, #152a48 100%);
}
.btn-primary { background: var(--button-bg); }
.btn-primary:hover { background: var(--button-hover); }
.search input { color: var(--text-primary); }
:focus-visible { outline: 2px solid #79a9d7; outline-offset: 4px; }

/* Keep every desktop navigation link visible, including on narrower screens. */
@media (min-width: 761px) {
  .navbar-inner {
    max-width: none;
    width: 100%;
    padding-inline: clamp(16px, 2.5vw, 48px);
    gap: 20px;
  }
  .navbar-links {
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    gap: 4px;
  }
  .navbar-links a {
    flex-shrink: 0;
    padding-inline: 10px;
  }
}
.radio-codes {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.radio-code-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.radio-code {
  flex: 0 0 90px;
  text-align: center;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--blue-light);
  border-radius: 8px;
  padding: 7px 4px;
}
.footer-credit {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-credit strong {
  color: #9aa6b8;
  font-size: 16px;
  margin-inline-start: 6px;
}

.footer-credit-divider {
  width: 1px;
  height: 18px;
  background: #51452a;
}

.footer-credit a {
  color: #9aa6b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: #3f7fca;
}

.footer-credit a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 3px;
}
.headquarters-card {
  margin: 0;
  overflow: hidden;
}
.headquarters-card img {
  display: block;
  width: 100%;
  height: auto;
}
.headquarters-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px;
  font-weight: 700;
}
.location-badge {
  color: var(--blue-deep);
  background: var(--blue-light);
  padding: 6px 16px;
  border-radius: 8px;
}
.promotion-table-wrap {
  overflow-x: auto;
}
.promotion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: right;
}
.promotion-table th,
.promotion-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.promotion-table thead {
  background: var(--blue-light);
  color: var(--blue-deep);
}
.promotion-table tbody th {
  white-space: nowrap;
  color: var(--blue-deep);
}
.promotion-table tbody tr:last-child > * {
  border-bottom: 0;
}
.promotion-table tbody tr:hover {
  background: var(--bg-secondary);
}
#WeaponsGrid .row-image-slot img {
  object-fit: cover;
  object-position: center;
}

/* قيادة القطاع */
#leadership { padding-block: 80px; font-family: 'Cairo', 'Tajawal', sans-serif; }
#leadership .container { max-width: 1400px; }
#leadership .leadership-grid { gap: 26px; }
#leadership .leader-card { min-height: 300px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#leadership .member-avatar-placeholder { width: 112px; height: 112px; margin-bottom: 24px; font-size: 42px; }
#leadership .member-avatar-placeholder img { width: 112px !important; height: 112px !important; border-radius: 50%; object-fit: cover; }
#leadership .leader-card h3 { font-family: 'Cairo', sans-serif; font-size: 18px; font-weight: 700; line-height: 1.8; margin: 0; }
#leadership .leader-card p { font-size: 17px; line-height: 1.9; margin: 14px 0 0; }
#leadership .section-header h2 { font-size: 32px; font-weight: 800; }
@media (max-width: 900px) and (min-width: 651px) { #leadership .leadership-grid { grid-template-columns: 1fr; } }
/* عناوين القيادة وتميز الأسبوع وترتيب القيادة */
#leadership .section-header h2, #weeklyHonors .section-header h2 { font-family: 'DecoType Naskh', 'DecoType Naskh Regular', 'Traditional Arabic', serif; font-size: 42px; font-weight: 400; line-height: 1.6; }
#leadership .leadership-grid { padding-top: 28px; align-items: center; }
#leadership .leader-card:nth-child(1) { grid-column: 2; grid-row: 1; transform: translateY(-24px); }
#leadership .leader-card:nth-child(2) { grid-column: 1; grid-row: 1; }
#leadership .leader-card:nth-child(3) { grid-column: 3; grid-row: 1; }
@media (max-width: 900px) { #leadership .leader-card:nth-child(n) { grid-column: auto; grid-row: auto; transform: none; } #leadership .leader-card:nth-child(1) { order: -1; } }
/* توحيد خط عناوين الأقسام */
.section-header h2, #leadership .section-header h2, #weeklyHonors .section-header h2 { font-family: 'DecoType Naskh', 'DecoType Naskh Regular', 'Traditional Arabic', serif; font-size: 42px; font-weight: 400; line-height: 1.6; }
@media (max-width: 650px) { .section-header h2, #leadership .section-header h2, #weeklyHonors .section-header h2 { font-size: 34px; } }
/* بطاقات تميز الأسبوع */
#weeklyHonors { padding-block: 80px; }
#weeklyHonors .container { max-width: 1400px; }
#weeklyHonors .weekly-grid { gap: 28px; }
#weeklyHonors .leader-card { min-height: 330px; padding: 36px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#weeklyHonors .member-avatar-placeholder { width: 112px; height: 112px; margin-bottom: 24px; font-size: 40px; }
#weeklyHonors .member-avatar-placeholder img { width: 112px !important; height: 112px !important; border-radius: 50%; object-fit: cover; }
#weeklyHonors .leader-card h3 { font-size: 24px; margin: 0; line-height: 1.6; }
#weeklyHonors .leader-card p { font-size: 17px; margin: 12px 0; }
#weeklyHonors .leader-card span { display: block; max-width: 100%; overflow-wrap: anywhere; font-family: 'Cairo', sans-serif; font-size: 17px; line-height: 1.9; margin-top: 6px; }
@media (max-width: 650px) { #weeklyHonors .leader-card { min-height: 300px; padding: 30px 20px; } }
/* البحث في الشريط العلوي الثابت */
.navbar { position: sticky; top: 0; z-index: 1000; }
.navbar-inner { max-width: 1400px; flex-wrap: nowrap; gap: 24px; padding: 14px 24px; }
.navbar .search { width: min(600px, 100%); height: 52px; margin: 0; flex: 1; box-shadow: none; border-radius: 14px; }
.navbar .search input { width: 100%; min-width: 0; }
.navbar .search-svg { flex-shrink: 0; }
section, .subsection, .row-card { scroll-margin-top: 100px; }
@media (max-width: 650px) {
  .navbar-inner { gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
  .navbar-brand { width: 100%; justify-content: center; }
  .navbar .search { flex-basis: 100%; width: 100%; height: 48px; }
  section, .subsection, .row-card { scroll-margin-top: 135px; }
}
/* تحسين الشريط العلوي والبحث */
.navbar { background: rgba(7, 15, 26, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid rgba(111, 169, 225, .16); box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.navbar-inner { max-width: 1400px; min-height: 86px; padding: 16px 28px; gap: 32px; }
.navbar-brand { gap: 14px; }
.navbar-logo { height: 48px; width: 48px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,.3)); }
.navbar-title { font-size: 18px; font-weight: 700; }
.navbar .search { flex: 0 1 680px; margin-inline-start: auto; height: 54px; padding: 0 18px; gap: 12px; background: linear-gradient(135deg, #101d2d, #0c1521); border: 1px solid rgba(115, 172, 229, .22); border-radius: 18px; transition: border-color .2s, box-shadow .2s, background .2s; }
.navbar .search:focus-within { border-color: #5b9de0; box-shadow: 0 0 0 3px rgba(74, 142, 215, .14); background: #122033; }
.navbar .search input { font-size: 15px; background: transparent; }
.navbar .search input::placeholder { color: #94a6bd; }
.navbar .search-svg { width: 23px; height: 23px; color: #7ab3eb; }
@media (max-width: 650px) {
  .navbar-inner { min-height: auto; padding: 12px 18px; gap: 12px; }
  .navbar-brand { justify-content: flex-start; gap: 10px; }
  .navbar-logo { width: 36px; height: 36px; }
  .navbar-title { font-size: 16px; }
  .navbar .search { flex: 1 1 100%; height: 48px; border-radius: 14px; margin: 0; }
}
/* تجربة محلية: توزيع متوازن وحركة خفيفة */
.navbar-inner { display: grid; grid-template-columns: auto minmax(240px, 680px); justify-content: center; gap: 32px; }
.navbar .search { width: 100%; margin: 0; position: relative; overflow: visible; }
.navbar .search:focus-within .search-svg { transform: rotate(-12deg) scale(1.12); }
.navbar .search-svg { transition: transform .25s ease; }
.hero { padding: 70px 24px 64px; }
.hero-content { max-width: 1000px; }
.hero-title { font-size: clamp(30px, 3vw, 46px); }
.hero-content > * { animation: sef-enter .75s ease both; }
.hero-content > :nth-child(2) { animation-delay: .1s; }
.hero-content > :nth-child(3) { animation-delay: .2s; }
.hero-content > :nth-child(4) { animation-delay: .3s; }
.hero-content > :nth-child(5) { animation-delay: .4s; }
.hero-quick-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-quick-links a { text-decoration: none; color: #bdd9f5; border: 1px solid rgba(114,174,231,.23); border-radius: 12px; padding: 11px 20px; background: rgba(13,27,44,.6); transition: transform .2s, background .2s, border-color .2s; }
.hero-quick-links a:hover { transform: translateY(-4px); background: #162d48; border-color: #5b9de0; }
.btn-primary { transition: box-shadow .25s, transform .25s; }
.btn-primary:hover { box-shadow: 0 8px 28px rgba(61,137,219,.3); transform: translateY(-3px); }
.leader-card { transition: box-shadow .25s ease, border-color .25s ease; }
.leader-card:hover { border-color: #5b9de0; box-shadow: 0 12px 35px rgba(0,0,0,.2); }
.search-results { position: absolute; top: calc(100% + 10px); inset-inline: 0; background: #0e1b2c; border: 1px solid #2b4562; border-radius: 16px; padding: 8px; box-shadow: 0 18px 45px rgba(0,0,0,.35); max-height: 320px; overflow-y: auto; animation: sef-enter .2s ease; }
.search-results[hidden] { display: none; }
.search-results button { display: block; width: 100%; text-align: right; font: inherit; color: #dceafa; background: transparent; border: 0; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.search-results button:hover, .search-results button:focus-visible { background: #1a3555; }
.search-results p { padding: 14px; color: #9db5ce; margin: 0; }
@keyframes sef-enter { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 650px) { .navbar-inner { grid-template-columns: 1fr; gap: 12px; } .hero { padding: 48px 20px; } .hero-quick-links a { padding: 10px 14px; } }
@media (prefers-reduced-motion: reduce) { .hero-content > *, .search-results { animation: none; } .btn-primary, .leader-card, .search-svg, .hero-quick-links a { transition: none; } }

/* تدرج بطاقات القيادة وتميز الأسبوع */
#leadership .leader-card, #weeklyHonors .leader-card {
  background: radial-gradient(ellipse at 100% 0%, rgba(57, 125, 195, .18), transparent 65%), linear-gradient(145deg, #142c46 0%, #0e1e32 48%, #091423 100%);
  border-color: rgba(109, 166, 222, .32);
  box-shadow: inset 0 1px 0 rgba(169, 207, 245, .06), 0 12px 30px rgba(0, 0, 0, .16);
}
#leadership .leader-card:first-child { background: radial-gradient(ellipse at 50% 0%, rgba(78, 151, 226, .24), transparent 65%), linear-gradient(145deg, #193857, #10263e 48%, #0b192b); border-color: rgba(116, 180, 241, .45); }
#leadership .leader-card:hover, #weeklyHonors .leader-card:hover { border-color: #6baae8; box-shadow: inset 0 1px 0 rgba(169, 207, 245, .1), 0 14px 34px rgba(10, 53, 98, .24); }