/* Web Font Declarations for Sakkal Majalla (Desktop & Mobile) */
@font-face {
  font-family: 'Sakkal Majalla';
  font-weight: 400;
  font-style: normal;
  src: local('Sakkal Majalla'), local('Majalla'),
       url('../fonts/majalla.woff2') format('woff2'),
       url('../fonts/majalla.woff') format('woff'),
       url('../fonts/majalla.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Sakkal Majalla';
  font-weight: 700;
  font-style: normal;
  src: local('Sakkal Majalla Bold'), local('Majalla Bold'),
       url('../fonts/majallab.woff2') format('woff2'),
       url('../fonts/majallab.woff') format('woff'),
       url('../fonts/majallab.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Sakkal Majalla';
  font-weight: 800;
  font-style: normal;
  src: local('Sakkal Majalla Bold'), local('Majalla Bold'),
       url('../fonts/majallab.woff2') format('woff2'),
       url('../fonts/majallab.woff') format('woff'),
       url('../fonts/majallab.ttf') format('truetype');
  font-display: swap;
}

:root {
  --maroon: #801424;
  --maroon-dark: #5a0d19;
  --maroon-light: #9e1b2f;
  --gold: #C59B27;
  --gold-light: #e0b541;
  --gold-dark: #9e7a1b;
  --slate-dark: #0f172a;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }
}

body {
  font-family: "Sakkal Majalla", "Majalla", "Traditional Arabic", "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  font-size: 1.05rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

p {
  line-height: 1.8;
}

/* Page Section Animations */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tab Switching */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input Fields */
.inp {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: "Sakkal Majalla", "Majalla", "Tajawal", sans-serif;
  color: #1e293b;
  outline: none;
  transition: all 0.25s ease;
  direction: inherit;
  text-align: inherit;
  width: 100%;
}


.inp:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 4px rgba(128, 20, 36, 0.12);
}

.inp:disabled {
  background: #f8fafc;
  cursor: not-allowed;
}

/* Navigation Buttons - Clean Single-Line Desktop Nav */
.nb {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  border-radius: 10px;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1280px) {
  .nb {
    padding: 7px 16px;
    font-size: 15.5px;
  }
}

/* Header Logo */
.header-logo,
html[lang="en"] .header-logo,
html[lang="ar"] .header-logo {
  height: 100px !important;
  max-height: 100px !important;
  width: auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  .header-logo,
  html[lang="en"] .header-logo,
  html[lang="ar"] .header-logo {
    height: 70px !important;
    max-height: 70px !important;
  }
}

/* English Version: Sakkal Majalla Typography */
html[lang="en"],
html[lang="en"] body,
html[lang="en"] button,
html[lang="en"] input,
html[lang="en"] select,
html[lang="en"] textarea,
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] h5,
html[lang="en"] h6,
html[lang="en"] span,
html[lang="en"] p,
html[lang="en"] a {
  font-family: "Sakkal Majalla", "Majalla", "Traditional Arabic", "Tajawal", "Inter", sans-serif;
}

/* English Custom Header & Nav Typography */
html[lang="en"] .header-title {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  line-height: 1.25;
}

@media (min-width: 1024px) {
  html[lang="en"] .header-title {
    font-size: 0.9rem !important;
  }
}

html[lang="en"] .header-subtitle {
  font-size: 0.70rem !important;
}

html[lang="en"] .lang-btn {
  font-size: 0.8rem !important;
  padding: 5px 12px;
}

html[lang="en"] .nb,
html[lang="en"] .nb span,
html[lang="en"] nav .nb,
html[lang="en"] nav .nb span {
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  padding: 6px 10px;
}

@media (min-width: 1280px) {
  html[lang="en"] .nb,
  html[lang="en"] .nb span,
  html[lang="en"] nav .nb,
  html[lang="en"] nav .nb span {
    font-size: 0.92rem !important;
    padding: 7px 14px;
  }
}

.nb:hover {
  color: var(--maroon) !important;
  background: rgba(128, 20, 36, 0.08) !important;
}

.nb.active {
  color: #ffffff !important;
  background: var(--maroon) !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(128, 20, 36, 0.28);
}

.nb.active::after {
  display: none;
}

/* Mobile Nav Drawer */
.mob-nav {
  display: none;
  background: #ffffff;
  border-bottom: 2px solid rgba(197, 155, 39, 0.3);
  padding: 10px 14px 16px;
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.12);
  max-height: 80vh;
  overflow-y: auto;
}

.mob-nav.open {
  display: block;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Input Zoom Prevention */
@media (max-width: 640px) {
  .inp {
    font-size: 16px !important;
    padding: 10px 14px;
  }
}

/* Modern KPI Card */
.kpi-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(128, 20, 36, 0.1);
  border-color: rgba(197, 155, 39, 0.3);
}

/* Interactive SVG Map */
.gov {
  fill: #88a4bc;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.3s ease, filter 0.3s ease, transform 0.2s ease;
  opacity: 1;
}

.gov:hover {
  fill: #6b8dad !important;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
}

.gov.gov-active {
  fill: #4a7a9b !important;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.25));
}

.gov-amman {
  fill: #f7b7c2 !important;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linejoin: round;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gov-amman:hover {
  fill: #e88d9e !important;
  filter: drop-shadow(0 3px 8px rgba(128,20,36,0.3));
}

.gov-label {
  font-family: "Sakkal Majalla", "Tajawal", "Inter", sans-serif;
  font-size: 10px;
  font-weight: 800;
  fill: #ffffff;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(0,0,0,0.35);
  stroke-width: 2.5px;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

#jizah-zone {
  cursor: pointer;
  transition: transform 0.25s ease;
}

#jizah-zone:hover ellipse {
  fill-opacity: 0.98;
  filter: drop-shadow(0 0 14px rgba(197, 155, 39, 0.9));
}

/* Map responsive */
@media (max-width: 768px) {
  #jordanMap {
    max-height: 400px !important;
  }
  .gov-label {
    font-size: 7px !important;
    stroke-width: 1.5px;
  }
}


/* Modal Overlay */
.s-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(8px);
  animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: white;
  border-radius: 24px;
  padding: 36px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
  animation: scaleUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  direction: inherit;
}


@keyframes scaleUpModal {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Buttons with Ripple & Gradient */
.btn-primary {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: white;
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 24px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(128, 20, 36, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--maroon-light), var(--maroon));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 20, 36, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #5a0d19;
  font-weight: 900;
  border-radius: 12px;
  padding: 12px 24px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(197, 155, 39, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(197, 155, 39, 0.45);
}

/* Print Optimization */
@media print {
  .sticky, nav, header, footer, .btn-primary, .btn-gold, form {
    display: none !important;
  }
  .page {
    display: block !important;
  }
}
