/* ═══════════════════════════════════════════════════════════
   style.css — البوابة المؤسسية
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --on-primary-fixed: #131b2e;
  --outline-variant: #c6c6cd;
  --on-tertiary: #ffffff;
  --inverse-surface: #2d3133;
  --surface-container-high: #e6e8ea;
  --on-secondary-container: #57657b;
  --on-primary-container: #7c839b;
  --surface-bright: #f7f9fb;
  --surface: #f7f9fb;
  --surface-container-highest: #e0e3e5;
  --on-surface: #191c1e;
  --tertiary-container: #001a42;
  --on-tertiary-container: #3980f4;
  --error-container: #ffdad6;
  --outline: #76777d;
  --on-secondary-fixed: #0d1c2f;
  --on-error-container: #93000a;
  --on-secondary-fixed-variant: #3a485c;
  --tertiary: #000000;
  --secondary-fixed-dim: #b9c7e0;
  --surface-container-low: #f2f4f6;
  --on-secondary: #ffffff;
  --on-background: #191c1e;
  --error: #ba1a1a;
  --background: #f7f9fb;
  --surface-variant: #e0e3e5;
  --tertiary-fixed: #d8e2ff;
  --inverse-on-surface: #eff1f3;
  --on-tertiary-fixed-variant: #004395;
  --primary-fixed-dim: #bec6e0;
  --on-surface-variant: #45464d;
  --secondary-fixed: #d5e3fd;
  --primary-container: #131b2e;
  --surface-container-lowest: #ffffff;
  --on-error: #ffffff;
  --inverse-primary: #bec6e0;
  --on-primary: #ffffff;
  --surface-tint: #565e74;
  --surface-container: #eceef0;
  --tertiary-fixed-dim: #adc6ff;
  --primary-fixed: #dae2fd;
  --on-primary-fixed-variant: #3f465c;
  --secondary-container: #d5e3fd;
  --primary: #000000;
  --surface-dim: #d8dadc;
  --on-tertiary-fixed: #001a42;
  --secondary: #515f74;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Segoe UI", Tahoma, "Arabic Typesetting", "Traditional Arabic", sans-serif;
  background: var(--surface);
  color: var(--on-surface);
  direction: rtl;
  text-align: right;
}

a {
  text-decoration: none;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
img {
  display: block;
  max-width: 100%;
}
ul {
  list-style: none;
}

/* ─── Typography Scale ──────────────────────────────────────── */
.display-lg {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.headline-md {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.headline-sm {
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
}
.body-lg {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}
.body-md {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}
.label-md {
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 500;
}
.label-sm {
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

/* ─── Layout Utilities ──────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .container {
    padding: 0 4rem;
  }
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.items-end {
  align-items: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-xs {
  gap: 0.5rem;
}
.gap-sm {
  gap: 1rem;
}
.gap-md {
  gap: 1.5rem;
}
.gap-lg {
  gap: 2rem;
}
.gap-xl {
  gap: 4rem;
}

.mb-xs {
  margin-bottom: 0.5rem;
}
.mb-sm {
  margin-bottom: 1rem;
}
.mb-md {
  margin-bottom: 1.5rem;
}
.mb-lg {
  margin-bottom: 2rem;
}

.mt-xs {
  margin-top: 0.5rem;
}
.mt-md {
  margin-top: 1.5rem;
}

.py-xl {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.py-lg {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.py-sm {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-xs {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.p-lg {
  padding: 2rem;
}
.p-xs {
  padding: 0.5rem;
}
.pb-md {
  padding-bottom: 1.5rem;
}
.px-lg {
  padding-left: 2rem;
  padding-right: 2rem;
}

.hidden {
  display: none;
}
.w-full {
  width: 100%;
}
.min-h-screen {
  min-height: 100vh;
}
.overflow-hidden {
  overflow: hidden;
}

/* ─── 1. Header / TopNavBar ─────────────────────────────────── */
.topnav {
  background: var(--surface-container-lowest);
  border-bottom: 1px solid var(--outline-variant);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topnav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .topnav-inner {
    padding: 0 4rem;
  }
}

.brand-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 500;
  padding: 4px 0;
  color: var(--secondary);
  transition: color 0.2s;
}
.nav-link.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
}
.nav-link:hover {
  color: var(--primary);
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.icon-btn {
  color: var(--primary);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.15s,
    transform 0.15s;
  transform: scale(0.95);
}
.icon-btn:active {
  opacity: 0.8;
}
.icon-btn svg {
  width: 24px;
  height: 24px;
}

/* ─── 2. Hero Section ────────────────────────────────────────── */
.hero {
  background: var(--primary-container);
  color: #fff;
  padding: 4rem 0;
}
.hero-inner {
  display: grid;
  align-items: center;
  gap: 4rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    padding: 0 4rem;
  }
}

.hero-title-img {
  margin-bottom: 1.5rem;
  max-width: 100%;
  height: auto;
}
.hero-subtitle {
  color: var(--primary-fixed-dim);
  margin-bottom: 2rem;
  max-width: 32rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--secondary-fixed);
  color: var(--on-secondary-fixed);
  padding: 1rem 2rem;
  border-radius: 0.25rem;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.2s;
}
.btn-primary:hover {
  background: var(--secondary-fixed-dim);
}

.btn-outline {
  border: 1px solid var(--outline-variant);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.25rem;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-media {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16/9;
  background: var(--surface-container-highest);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── 3. Directory Grid ─────────────────────────────────────── */
.bg-surface {
  background: var(--surface);
}

.section-title-line {
  height: 4px;
  width: 48px;
  background: var(--primary);
  margin-top: 0.5rem;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .dir-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .dir-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dir-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  padding: 2rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.dir-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-container);
}
.dir-card:hover .dir-icon-wrap {
  background: var(--secondary-container);
}
.dir-card:hover .dir-label {
  color: var(--primary);
}

.dir-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--surface-container-low);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: background 0.2s;
}
.dir-icon-wrap img {
  width: 24px;
  height: 24px;
}

.dir-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface);
  transition: color 0.2s;
}

/* ─── 4. News Slider ─────────────────────────────────────────── */
.news-section {
  background: var(--surface-container-low);
  overflow: hidden;
}
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}
.news-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface-variant);
  margin-top: 0.25rem;
}

.slider-nav-btns {
  display: flex;
  gap: 1rem;
}
.slider-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--outline-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface);
  transition: background 0.2s;
}
.slider-btn:hover {
  background: var(--surface-container-high);
}
.slider-btn svg {
  width: 20px;
  height: 20px;
}

.news-track-wrapper {
  overflow: hidden;
}
.news-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-bottom: 1.5rem;
}
.news-track::-webkit-scrollbar {
  display: none;
}

.news-card {
  min-width: 300px;
  scroll-snap-align: start;
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .news-card {
    min-width: 350px;
  }
}

.news-card-img {
  height: 192px;
  overflow: hidden;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.news-card:hover .news-card-img img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 2rem;
}
.news-card-title {
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-read-more {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-tertiary-container);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: text-decoration 0.2s;
}
.news-read-more:hover {
  text-decoration: underline;
}
.news-read-more svg {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}

/* Pagination dots */
.news-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.dot {
  height: 8px;
  border-radius: 999px;
  background: var(--outline-variant);
  width: 8px;
  cursor: pointer;
  transition:
    width 0.3s,
    background 0.3s;
}
.dot.active {
  width: 24px;
  background: var(--primary);
}

/* ─── 5. Footer ──────────────────────────────────────────────── */
footer {
  background: var(--surface-container-low);
  border-top: 1px solid var(--outline-variant);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-brand {
    align-items: flex-start;
    text-align: right;
  }
}

.footer-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--on-primary-fixed);
  margin-bottom: 2px;
}
.footer-copy {
  font-size: 12px;
  color: var(--on-surface-variant);
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-link {
  font-size: 12px;
  color: var(--on-surface-variant);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition:
    color 0.2s,
    text-decoration-color 0.2s;
}
.footer-link:hover {
  color: var(--primary);
  text-decoration-color: currentColor;
}

/* ─── 6. About Page ──────────────────────────────────────────── */
.page-hero {
  background: var(--primary-container);
  color: #fff;
  padding: 3rem 0;
  border-bottom: 3px solid rgba(255, 255, 255, 0.08);
}
.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .page-hero-inner {
    padding: 0 4rem;
  }
}

.page-hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary-fixed-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.page-hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.about-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .about-layout {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem;
  }
}

.about-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: 0.5rem;
  overflow: hidden;
}

.about-card-header {
  background: var(--primary-container);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.about-card-header-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-card-header-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary-fixed-dim);
}
.about-card-header-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.about-card-body {
  padding: 2rem;
}
.about-card-body p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--on-surface-variant);
}
.about-card-body p + p {
  margin-top: 1rem;
}

/* ─── 7. Animations ──────────────────────────────────────────── */
:root {
  --formal-bezier: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

.animate-entrance {
  opacity: 0;
  animation: slideUpFade 0.8s var(--formal-bezier) forwards;
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 1s var(--formal-bezier) forwards;
}

.card-hover-effect {
  transition:
    transform 0.4s var(--formal-bezier),
    box-shadow 0.4s var(--formal-bezier),
    border-color 0.4s var(--formal-bezier);
}
.card-hover-effect:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .animate-entrance,
  .animate-fade-in {
    animation: none !important;
    opacity: 1 !important;
  }
  .card-hover-effect:hover {
    transform: none !important;
  }
}
