:root {
  --bg: #0a0b0c;
  --surface: #111315;
  --surface-2: #15181b;
  --text: #f3f3f1;
  --muted: #9b9d9e;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(225,183,70,.34);
  --gold: #d9ad42;
  --gold-soft: #f0cf77;
  --shadow: 0 24px 70px rgba(0,0,0,.20);
  --radius: 28px;
  --max: 1180px;
  --font: "Noto Sans Arabic", "Noto Sans", "Noto Sans Bengali", "Noto Sans Devanagari", Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #f0f0ed;
  --text: #151617;
  --muted: #676b6e;
  --line: rgba(15,18,20,.10);
  --line-strong: rgba(157,109,14,.32);
  --shadow: 0 24px 70px rgba(33,37,40,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(218,172,61,.07), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
button, select { font: inherit; }

.page-shell {
  width: min(100%, 1500px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  width: min(calc(100% - 48px), var(--max));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 190px;
}
.brand-logo-set { display: inline-grid; place-items: center; line-height: 0; }
.brand-logo-set .brand-horizontal { grid-area: 1 / 1; width: 192px; height: auto; display: block; object-fit: contain; }
.brand-logo-light { display: none !important; }
html[data-theme="light"] .brand-logo-dark { display: none !important; }
html[data-theme="light"] .brand-logo-light { display: block !important; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.language-control,
.theme-toggle {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
}
.language-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.language-control svg,
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.language-control select {
  appearance: none;
  border: 0;
  outline: 0;
  min-width: 88px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.language-control option { color: #111; }
.theme-toggle {
  width: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.theme-toggle .moon { display: none; }
html[data-theme="light"] .theme-toggle .sun { display: none; }
html[data-theme="light"] .theme-toggle .moon { display: block; }

.portal-main {
  width: min(calc(100% - 48px), var(--max));
  margin: auto;
  padding: 56px 0 42px;
}
.intro { margin-bottom: 28px; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.intro h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.25;
  font-weight: 560;
  letter-spacing: -.025em;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.portal-card {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.portal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 45%, rgba(216,171,62,.025) 100%);
  pointer-events: none;
}
.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 90px rgba(0,0,0,.27);
  outline: none;
}
.card-visual {
  height: 300px;
  display: grid;
  place-items: center;
  padding: 18px 30px 0;
}
.card-visual svg {
  width: min(100%, 280px);
  height: 100%;
  fill: none;
  stroke: color-mix(in srgb, var(--text) 75%, transparent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .95;
}
.card-visual svg .accent { stroke: var(--gold-soft); }
.card-visual svg .accent-fill { fill: var(--gold-soft); stroke: none; }

.card-copy {
  margin-top: auto;
  padding: 0 28px 28px;
}
.card-kicker {
  display: inline-block;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.card-copy h2 {
  margin: 0 0 7px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.card-copy p {
  min-height: 50px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .92rem;
}
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: .89rem;
  font-weight: 560;
}
.arrow {
  color: var(--gold);
  font-size: 1.25rem;
  transition: transform .2s ease;
}
html[dir="ltr"] .arrow { transform: rotate(180deg); }
.portal-card:hover .arrow { transform: translateX(-4px); }
html[dir="ltr"] .portal-card:hover .arrow { transform: rotate(180deg) translateX(-4px); }

.service-card { background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 94%, #b27a17 6%), var(--surface-2)); }
.ai-card { background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 95%, #6a5420 5%), var(--surface-2)); }
.join-card { background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 96%, #b28b2d 4%), var(--surface-2)); }

.swipe-hint { display: none; }

.site-footer {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: .78rem;
}
.footer-links a { transition: color .2s ease; }
.footer-links a:hover { color: var(--text); }
.footer-links .admin-link { color: color-mix(in srgb, var(--gold) 72%, var(--muted)); }
.official-footer-badges {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  margin-inline-start: 14px;
  direction: rtl;
}
.official-badge {
  width: 132px;
  min-height: 52px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  line-height: 1;
}
.official-badge img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 31px;
  object-fit: contain;
  background: transparent;
}
.business-center-badge img { height: 29px; }
.official-number {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text);
  direction: rtl;
  transition: color .2s ease;
}
.official-number bdi {
  font-family: Arial, Tahoma, sans-serif;
  font-weight: 800;
  letter-spacing: .1px;
}
.copyright {
  margin: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: .74rem;
}

.official-footer-badges { flex-shrink: 0; }
@media (max-width: 1080px) {
  .official-footer-badges { gap: 22px; }
  .official-badge { width: 122px; }
  .official-badge img { height: 28px; }
  .business-center-badge img { height: 26px; }
  .official-number { font-size: 9px; }
}

@media (max-width: 900px) {
  .site-header,
  .portal-main,
  .site-footer { width: min(calc(100% - 32px), var(--max)); }
  .portal-grid { gap: 14px; }
  .portal-card { min-height: 470px; }
  .card-visual { height: 260px; padding-inline: 18px; }
  .card-copy { padding-inline: 22px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .copyright { white-space: normal; }
}

@media (max-width: 680px) {
  :root { --radius: 24px; }
  .site-header { min-height: 78px; }
  .brand { min-width: 0; }
  .brand-logo-set .brand-horizontal { width: 150px; }
  .language-control { padding-inline: 10px; }
  .language-control select { min-width: 72px; max-width: 96px; font-size: .82rem; }

  .portal-main { padding: 30px 0 34px; overflow: visible; }
  .intro { margin-bottom: 18px; }
  .eyebrow { font-size: .76rem; }
  .intro h1 { font-size: 1.65rem; }

  /* Mobile: all three destinations stay visible together; no horizontal swiping. */
  .portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }
  .portal-card {
    min-width: 0;
    min-height: 248px;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
  }
  .portal-card:hover,
  .portal-card:focus-visible { transform: none; }
  .card-visual { height: 126px; padding: 8px 5px 0; }
  .card-visual svg { width: min(100%, 108px); }
  .card-copy { padding: 0 9px 12px; text-align: center; }
  .card-kicker,
  .card-copy p { display: none; }
  .card-copy h2 {
    margin: 0 0 8px;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(.74rem, 3.45vw, .96rem);
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .card-link {
    min-height: 32px;
    padding-top: 8px;
    justify-content: center;
    gap: 5px;
    font-size: .69rem;
  }
  .arrow { font-size: .9rem; }
  .swipe-hint { display: none; }

  .site-footer { padding-top: 22px; }
  .footer-links { gap: 10px 16px; font-size: .76rem; }
  .official-footer-badges { width: 100%; margin-inline-start: 0; gap: 22px; }
  .official-badge { width: 122px; }
  .copyright { font-size: .72rem; }
}

@media (max-width: 410px) {
  .site-header,
  .portal-main,
  .site-footer { width: calc(100% - 28px); }
  .site-header { gap: 8px; }
  .header-actions { gap: 6px; }
  .brand-logo-set .brand-horizontal { width: 116px; }
  .language-control svg { display: none; }
  .theme-toggle { width: 40px; height: 40px; }
  .language-control { height: 40px; padding-inline: 8px; }
  .language-control select { min-width: 58px; max-width: 68px; font-size: .75rem; }
  .portal-grid { gap: 6px; }
  .portal-card { min-height: 232px; border-radius: 16px; }
  .card-visual { height: 112px; padding-inline: 3px; }
  .card-copy { padding-inline: 7px; }
  .card-copy h2 { font-size: .72rem; }
  .card-link { font-size: .64rem; }
}

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