/* ============================================
   🎨 الألوان - غيّر من هنا بس وكل الموقع هيتغير
   ============================================ */
:root {
  --primary: #1a5276;        /* اللون الأساسي */
  --primary-light: #2980b9;  /* الأساسي فاتح */
  --primary-dark: #0e2f44;   /* الأساسي غامق */
  --accent: #c0954d;         /* اللون الذهبي */
  --accent-light: #d4af6e;
  --bg: #f8f6f2;             /* خلفية الصفحة */
  --bg-card: #ffffff;        /* خلفية الكروت */
  --text: #2c2c2c;           /* لون النص */
  --text-light: #666666;     /* نص فاتح */
  --text-on-primary: #ffffff;
  --border: #e0dcd5;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --radius: 10px;
  --header-height: 70px;
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  height: var(--header-height);
  max-width: 1300px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 45px;
  width: auto;
}

.logo-text {
  color: var(--text-on-primary);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-on-primary);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 8px;
}

/* Navigation */
.main-nav {
  background: var(--primary);
}

.nav-list {
  display: flex;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 14px 20px;
  color: var(--text-on-primary);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-item:hover > .nav-link,
.nav-link.active {
  background: var(--accent);
  color: #fff;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  min-width: 220px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, padding-right 0.2s;
}

.dropdown a:last-child { border-bottom: none; }

.dropdown a:hover {
  background: var(--bg);
  padding-right: 28px;
  color: var(--primary);
}

/* Arrow for dropdown items */
.has-dropdown > .nav-link::after {
  content: '▾';
  margin-right: 6px;
  font-size: 0.7em;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  background: var(--primary-dark);
}

.hero-slider .slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slider .slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slider .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  display: flex;
  align-items: flex-end;
  padding: 40px;
}

.hero-slider .slide-caption {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Slider controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 10;
}

.slider-btn:hover { background: var(--accent); }
.slider-btn.prev { right: 20px; }
.slider-btn.next { left: 20px; }

.slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.slider-dots .dot.active {
  background: var(--accent);
  width: 28px;
  border-radius: 5px;
}

/* ============================================
   Section Common
   ============================================ */
.section {
  padding: 50px 30px;
  max-width: 1300px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ============================================
   Partners Carousel
   ============================================ */
.partners-section {
  background: var(--bg-card);
  border-top: 3px solid var(--accent);
}

.partners-track-wrapper {
  overflow: hidden;
  position: relative;
  padding: 10px 0;
}

.partners-track {
  display: flex;
  gap: 30px;
  animation: scrollPartners 20s linear infinite;
  width: max-content;
}

.partners-track:hover { animation-play-state: paused; }

.partner-logo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--bg);
  padding: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.partner-logo:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow);
}

@keyframes scrollPartners {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* ============================================
   Book Section
   ============================================ */
.book-section {
  text-align: center;
  padding: 60px 30px;
}

.book-cover {
  width: 220px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  box-shadow: 6px 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.4s;
}

.book-cover:hover { transform: scale(1.04) rotate(-1deg); }

.book-author {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 14px;
}

/* ============================================
   Under Development
   ============================================ */
.under-dev {
  text-align: center;
  padding: 50px 30px;
  background: var(--bg-card);
}

.under-dev p {
  font-size: 1.2rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 20px;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Category / Sub-category Pages
   ============================================ */
.page-banner {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
  background: var(--primary-dark);
}

.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-banner .banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,82,118,0.7), transparent);
  display: flex;
  align-items: flex-end;
  padding: 30px 40px;
}

.page-banner h1 {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

/* Content cards grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  padding: 40px 30px;
  max-width: 1300px;
  margin: 0 auto;
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.content-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.content-card .card-body {
  padding: 18px 20px;
}

.content-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  line-height: 1.5;
}

.content-card .card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.content-card .card-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.content-card .card-link:hover { color: var(--primary); }

/* Video embed */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 15px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
  padding: 14px 30px;
  max-width: 1300px;
  margin: 0 auto;
  font-size: 0.88rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a {
  color: var(--primary-light);
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 4px; opacity: 0.4; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px;
  font-size: 0.88rem;
  margin-top: 40px;
}

.site-footer a {
  color: var(--accent-light);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .hero-slider { height: 300px; }
  .page-banner { height: 200px; }
  .header-top { padding: 0 16px; }
  .nav-list { padding: 0 10px; }
  .nav-link { padding: 12px 14px; font-size: 0.85rem; }
  .content-grid { grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 16px; }
}

@media (max-width: 640px) {
  .menu-toggle { display: block; }

  .main-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .main-nav.open { max-height: 600px; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item { border-bottom: 1px solid rgba(255,255,255,0.1); }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0,0,0,0.1);
  }

  .dropdown a { color: var(--text-on-primary); border-color: rgba(255,255,255,0.05); }
  .dropdown a:hover { background: rgba(255,255,255,0.1); color: #fff; }

  .hero-slider { height: 220px; }
  .page-banner { height: 160px; }
  .page-banner h1 { font-size: 1.3rem; }
  .content-grid { grid-template-columns: 1fr; }
  .section { padding: 30px 16px; }
  .hero-slider .slide-caption { font-size: 1.1rem; }
  .slider-btn { width: 36px; height: 36px; font-size: 1rem; }
}
