:root {
  color-scheme: dark;
  --bg: #071411;
  --bg-soft: #0d211c;
  --surface: rgba(18, 35, 30, 0.88);
  --surface-solid: #10241f;
  --text: #f4f7f3;
  --muted: #bfd0c7;
  --line: rgba(221, 236, 226, 0.18);
  --brand: #88d19a;
  --brand-strong: #46a86b;
  --accent: #f3c567;
  --danger: #e67965;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f2;
  --bg-soft: #e8efe7;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --text: #17241f;
  --muted: #51645a;
  --line: rgba(22, 44, 34, 0.16);
  --brand: #247a4a;
  --brand-strong: #14613b;
  --accent: #ad7b22;
  --danger: #b84d3e;
  --shadow: 0 18px 45px rgba(24, 46, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(136, 209, 154, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(243, 197, 103, 0.12), transparent 28rem),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  font-family: Cairo, Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  animation: fadeInImage 0.8s ease-in-out;
}

/* تأثيرات الظهور والانتقال */
@keyframes fadeInImage {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark,
.svg-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 6px 11px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.tools {
  display: flex;
  gap: 8px;
  justify-content: end;
}

.icon-btn,
.button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 8px;
  animation: slideInUp 0.5s ease-out;
  transition: all 0.3s ease;
}

.button:active {
  transform: scale(0.96);
}

.button.primary {
  background: var(--brand);
  color: var(--bg);
  border-color: transparent;
}

.icon-btn:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}

.hero.compact {
  min-height: 360px;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: heroZoom 1.2s ease-out;
}

@keyframes heroZoom {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 14, 11, 0.28), rgba(4, 14, 11, 0.82));
}

:root[data-theme="light"] .hero::after {
  background: linear-gradient(180deg, rgba(7, 20, 17, 0.1), rgba(7, 20, 17, 0.72));
}

.hero-inner,
.section,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  padding: 80px 0 52px;
  color: #fff;
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--accent);
  font-weight: 800;
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
}

h1 {
  max-width: 850px;
  font-size: clamp(2.35rem, 6vw, 5.1rem);
  font-weight: 900;
  animation: slideInDown 0.7s ease-out;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  margin-bottom: 14px;
  animation: slideInLeft 0.6s ease-out;
}

h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.14rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.section {
  padding: 58px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

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

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

.grid > * {
  animation: slideInUp 0.6s ease-out;
}

.grid > *:nth-child(1) { animation-delay: 0.1s; }
.grid > *:nth-child(2) { animation-delay: 0.2s; }
.grid > *:nth-child(3) { animation-delay: 0.3s; }
.grid > *:nth-child(4) { animation-delay: 0.4s; }
.grid > *:nth-child(5) { animation-delay: 0.5s; }
.grid > *:nth-child(6) { animation-delay: 0.6s; }

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

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

.stat-card strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  color: var(--brand);
  margin-bottom: 10px;
}

.stat-card span {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.stat-card p {
  margin-top: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: slideInUp 0.6s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.card-body {
  padding: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* Media removed */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.84rem;
  animation: slideInRight 0.5s ease-out;
  transition: all 0.3s ease;
}

.pill:hover {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  transform: translateX(-2px);
}

.filterbar,
.weather-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.filterbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.filterbar select {
  min-height: 42px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  animation: fadeIn 0.3s ease-out;
}

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

.modal-panel {
  width: min(780px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  animation: slideInUp 0.4s ease-out;
}

.modal-close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
}

.modal-text {
  color: var(--muted);
}

.modal-text li {
  margin-bottom: 6px;
}

.interactive-map {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 14%, transparent), transparent),
    url("../assets/images/oman.png") center / contain no-repeat,
    var(--surface);
  overflow: hidden;
}

.map-point {
  position: absolute;
  inset-inline-start: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow);
}

html[dir="rtl"] .map-point {
  transform: translate(50%, -50%);
}

.map-point.active,
.map-point:hover {
  background: var(--brand);
  color: var(--bg);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  font-weight: 900;
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tab.active {
  background: var(--brand);
  color: var(--bg);
  border-color: transparent;
}

.map-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.map-svg {
  width: 100%;
  height: 100%;
  min-height: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marker {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 2;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 940px) {
  .nav {
    grid-template-columns: 1fr auto;
    padding: 12px 0;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: start;
  }

  html[dir="rtl"] .nav-links {
    justify-content: end;
  }

  .grid,
  .grid.two,
  .stats-grid,
  .map-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    width: min(100% - 20px, 1180px);
  }

  .hero-inner,
  .section,
  .footer-inner {
    width: min(100% - 20px, 1180px);
  }

  .nav-link {
    font-size: 0.84rem;
    padding-inline: 8px;
  }

  .hero {
    min-height: 500px;
  }

  .hero.compact {
    min-height: 320px;
  }

  .section-head {
    display: block;
  }
}
