:root {
  --ink: #14201d;
  --muted: #5b6662;
  --line: #dfe6e1;
  --paper: #ffffff;
  --soft: #f5f8f6;
  --deep: #0d3d34;
  --green: #11634f;
  --green-2: #188465;
  --red: #b83a36;
  --gold: #c59b42;
  --sky: #d9e9ee;
  --shadow: 0 18px 44px rgba(20, 32, 29, 0.12);
  --radius: 8px;
  --max: 1180px;
  --font-latin: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  --font-ar: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-ar-display: "Noto Kufi Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: var(--font-latin);
  line-height: 1.6;
}

body[dir="rtl"] {
  font-family: var(--font-ar);
  line-height: 1.85;
  word-spacing: 0.02em;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] .brand strong,
body[dir="rtl"] .section-eyebrow,
body[dir="rtl"] .eyebrow,
body[dir="rtl"] .primary-button,
body[dir="rtl"] .secondary-button,
body[dir="rtl"] .section-link,
body[dir="rtl"] .site-nav a {
  font-family: var(--font-ar-display);
}

a {
  color: inherit;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 1000;
  transform: translateY(-160%);
  background: var(--paper);
  border: 2px solid var(--green);
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.utility-bar {
  background: var(--deep);
  color: white;
  font-size: 0.9rem;
}

.utility-inner,
.header-inner,
.utility-actions,
.brand,
.site-nav,
.hero-actions,
.meta-row,
.card-link,
.footer-grid {
  display: flex;
  align-items: center;
}

.utility-inner {
  min-height: 40px;
  justify-content: space-between;
  gap: 16px;
}

.utility-actions {
  gap: 16px;
}

.utility-actions a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  overflow-wrap: anywhere;
}

.language-toggle,
.menu-toggle,
.primary-button,
.secondary-button,
.section-link {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
  min-height: 40px;
  border-radius: 4px;
}

.language-toggle {
  color: var(--deep);
  background: white;
  padding: 8px 14px;
}

.header-inner {
  min-height: 76px;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  gap: 12px;
  text-decoration: none;
  min-width: 220px;
}

.brand span {
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
}

.site-nav {
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  padding: 10px 11px;
  border-radius: 4px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--green);
  background: #eef6f2;
}

.menu-toggle {
  display: none;
  color: var(--paper);
  background: var(--green);
  padding: 8px 12px;
}

.hero {
  min-height: 68vh;
  display: grid;
  align-items: end;
  color: white;
  background:
    linear-gradient(90deg, rgba(5, 24, 21, 0.92), rgba(5, 24, 21, 0.72) 48%, rgba(5, 24, 21, 0.18)),
    url("assets/birland-identity.png") center / cover no-repeat;
}

.hero-content {
  width: min(840px, calc(100% - 32px));
  margin-inline: auto;
  padding: 76px 0 58px;
}

.hero-seal {
  width: 92px;
  height: 92px;
  object-fit: contain;
  padding: 8px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(243, 207, 116, 0.82);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.eyebrow {
  margin: 0 0 14px;
  color: #f1dca7;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[dir="rtl"] .eyebrow {
  text-transform: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

body[dir="rtl"] h1 {
  line-height: 1.18;
}

.hero p {
  max-width: 760px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 750;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
}

.primary-button {
  color: var(--deep);
  background: #f3cf74;
}

.secondary-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.08);
}

.band {
  padding: 70px 0;
}

.band.compact {
  padding: 42px 0;
}

.band.paper {
  background: var(--paper);
}

.band.deep {
  background: var(--deep);
  color: white;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(220px, 0.34fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: 0;
}

body[dir="rtl"] .section-head h2 {
  line-height: 1.32;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[dir="rtl"] .section-eyebrow {
  letter-spacing: 0;
  text-transform: none;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.deep .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

.section-link {
  justify-self: end;
  color: var(--green);
  background: #e9f4ef;
  padding: 10px 14px;
}

.deep .section-link {
  color: var(--deep);
  background: #f3cf74;
}

.stats-grid,
.service-grid,
.leader-grid,
.ministry-grid,
.document-grid,
.contact-grid,
.source-grid {
  display: grid;
  gap: 16px;
}

.stats-grid > *,
.service-grid > *,
.leader-grid > *,
.ministry-grid > *,
.document-grid > *,
.contact-grid > *,
.source-grid > *,
.split > *,
.community-layout > * {
  min-width: 0;
}

.identity-strip {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}

.identity-strip img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 126px;
}

.stat strong {
  display: block;
  color: var(--green);
  font-size: 1.55rem;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.leader-card,
.ministry-card,
.document-card,
.contact-card,
.office-card,
.table-wrap,
.notice,
.source-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.service-card,
.ministry-card,
.document-card,
.contact-card,
.office-card,
.source-card {
  padding: 20px;
}

.service-card h3,
.ministry-card h3,
.document-card h3,
.office-card h3,
.contact-card h3,
.source-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.28;
}

.service-card p,
.ministry-card p,
.document-card p,
.office-card p,
.contact-card p,
.source-card p {
  color: var(--muted);
  margin-bottom: 12px;
}

.card-link {
  width: fit-content;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
}

.leader-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.leader-card {
  overflow: hidden;
}

.leader-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  background: var(--sky);
}

.leader-body {
  padding: 20px;
}

.leader-body h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.role {
  display: block;
  color: var(--green);
  font-weight: 800;
  margin-bottom: 10px;
}

.ministry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.government-list {
  margin-top: 20px;
}

.meta-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--deep);
  background: #e9f4ef;
  border: 1px solid #cce2d8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.88rem;
  font-weight: 750;
}

.document-grid {
  grid-template-columns: 0.82fr 1.18fr;
  align-items: start;
}

.document-card.featured {
  padding: 0;
  overflow: hidden;
}

.document-card.featured img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: top center;
  background: var(--paper);
}

.document-card.featured .document-body {
  padding: 18px;
}

.stack {
  display: grid;
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.vision-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(17, 99, 79, 0.08), rgba(197, 155, 66, 0.12)),
    var(--paper);
}

.vision-panel h3 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-inline-start: 28px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(197, 155, 66, 0.18);
}

.office-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.office-highlight {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  color: white;
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(8, 31, 27, 0.95), rgba(17, 99, 79, 0.88)),
    url("assets/birlandgov-hero.jpg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.office-highlight h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.office-highlight p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.office-highlight .section-eyebrow {
  color: #f3cf74;
}

.office-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-button.light {
  color: var(--deep);
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.94);
}

.office-card {
  min-height: 122px;
}

.table-wrap {
  overflow: auto;
  box-shadow: inset 0 -1px 0 var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--paper);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

th {
  color: var(--deep);
  background: #edf5f1;
  font-size: 0.92rem;
}

tr:hover td {
  background: #fbfdfc;
}

.community-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.community-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.community-image img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
}

.notice {
  padding: 18px;
  border-inline-start: 5px solid var(--gold);
  background: #fffdf7;
}

.contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-card a {
  color: var(--green);
  font-weight: 750;
}

.source-card,
.contact-card,
.service-card,
.document-card,
.office-card,
.ministry-card {
  overflow-wrap: anywhere;
}

.source-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-footer {
  color: white;
  background: #081f1b;
  padding: 34px 0;
}

.footer-grid {
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.footer-grid p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

@media (max-width: 980px) {
  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 16px;
    top: 116px;
    padding: 12px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav a {
    white-space: normal;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .stats-grid,
  .service-grid,
  .ministry-grid,
  .contact-grid,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-grid,
  .community-layout,
  .split,
  .vision-panel {
    grid-template-columns: 1fr;
  }

  .office-highlight {
    align-items: flex-start;
    flex-direction: column;
  }

  .office-actions {
    justify-content: flex-start;
  }

  .office-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .utility-inner,
  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .utility-actions {
    width: 100%;
    justify-content: space-between;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand strong {
    font-size: 0.98rem;
  }

  .site-nav {
    top: 148px;
    grid-template-columns: 1fr;
  }

  .site-nav.open {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 58vh;
    background:
      linear-gradient(180deg, rgba(7, 28, 24, 0.84), rgba(7, 28, 24, 0.7)),
      url("assets/birland-identity.png") center / cover no-repeat;
  }

  .hero-content {
    padding: 56px 0 42px;
  }

  .hero-seal {
    width: 76px;
    height: 76px;
  }

  .band {
    padding: 50px 0;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .section-link {
    justify-self: start;
  }

  .stats-grid,
  .service-grid,
  .leader-grid,
  .ministry-grid,
  .contact-grid,
  .source-grid,
  .office-list {
    grid-template-columns: 1fr;
  }

  .leader-card img,
  .document-card.featured img,
  .community-image img {
    height: 300px;
    min-height: 0;
  }
}
