/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Tajawal:wght@400;500;700&display=swap");

/* tables color & color */
.pop-bg-blue {
  background-color: blue;
  text-align: center;
}

.pop-bg-white {
  background-color: white;
  text-align: center;
  color: black;
}

:root {
  /* Light Mode Variables */
  --primary-color: #0d47a1;
  /* Strong Navy Blue */
  --secondary-color: #1976d2;
  /* Lighter Blue */
  --accent-color: #fbc02d;
  /* Gold/Yellow Accent */
  --bg-body: #f8f9fa;
  --bg-card: #ffffff;
  --bg-navbar: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --transition-speed: 0.3s;
  --container-width: 1200px;
  --header-height: 80px;
}

[data-theme="dark"] {
  /* Dark Mode Variables */
  --primary-color: #bbdefb;
  /* Light Blue for contrast */
  --secondary-color: #64b5f6;
  --accent-color: #fdd835;
  --bg-body: #0a192f;
  --bg-card: #112240;
  --bg-navbar: #112240;
  --text-primary: #ccd6f6;
  --text-secondary: #8892b0;
  --border-color: #233554;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

body {
  direction: rtl;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  transition:
    background-color var(--transition-speed),
    color var(--transition-speed);
}

span {
  font-size: 20px;
  font-weight: 500;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  height: var(--header-height);
  background-color: var(--bg-navbar);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .logo i {
  font-size: 2rem;
}

.nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

.nav-links li {
  white-space: nowrap;
  flex-shrink: 0; /* بيمنع المتصفح إنه يفعص العنصر عشان يوفر مكان */
}

.nav-links a {
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding: 5px 0;
  font-size: 0.85rem; /* صغر الخط حاجة بسيطة */
  white-space: nowrap; /* عشان الكلمة متتكسرش على سطرين */
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  right: 0;
  background-color: var(--secondary-color);
  transition: width var(--transition-speed);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-primary);
  background: none;
  border: none;
  padding: 5px;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-primary);
}

/* Footer */
footer {
  background-color: var(--bg-card);
  padding: 40px 0 20px;
  margin-top: 50px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-body);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background-color var(--transition-speed);
}

.social-icons a:hover {
  background-color: var(--secondary-color);
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  /* RTL layout, so left side */
  background-color: var(--primary-color);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
  z-index: 900;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Button Component */
.btn {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 5px;
  font-weight: 600;
  transition: all var(--transition-speed);
  cursor: pointer;
  border: none;
  font-family: "Cairo", sans-serif;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Card Component */
.card {
  background-color: var(--bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition-speed);
}

.card:hover {
  transform: translateY(-5px);
}

/* News Ticker */
.news-ticker {
  background-color: var(--primary-color);
  color: white;
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  font-size: 0.9rem;
}

.ticker-title {
  background-color: var(--secondary-color);
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  font-weight: bold;
  z-index: 10;
  position: relative;
}

.ticker-content {
  display: inline-block;
  padding-right: 100%;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: inline-block;
  padding: 0 30px;
}

@keyframes ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(100%, 0, 0);
  }

  /* RTL direction */
}

/* Responsive Design Enhancements */

/* Mobile Devices (phones, less than 992px) */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-navbar);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 50px;
    gap: 15px;
    transition: right var(--transition-speed);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
  }

  .container {
    padding: 0 15px;
  }

  .board-grid,
  .news-grid,
  .cafeteria-list,
  .survey-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Smaller Mobile Devices */
@media (max-width: 768px) {
  :root {
    --header-height: 80px;
  }

  h1 {
    font-size: 2.2rem !important;
  }

  h2 {
    font-size: 1.9rem !important;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.7rem;
    padding: 0 15px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 40px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  /* Sports Page Buttons on Mobile */
  .sport-buttons {
    gap: 10px;
  }

  .sport-buttons .btn {
    width: 100%;
    /* Full width buttons on mobile */
    margin-bottom: 10px;
  }

  /* Contact Form */
  .contact-container {
    grid-template-columns: 1fr;
  }

  /* Navbar Adjustment */
  .navbar {
    padding: 0 20px;
  }
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 30px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  border-radius: 5px;
}

table {
  width: 100%;
  min-width: 600px;
  /* Force scroll on small screens */
}

/* Utility for Sport Buttons Grid */
.sport-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.sport-buttons .btn {
  min-width: 140px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* animation nady el tayaran */
.edara::after {
  content: "";
  animation: edara 5s steps(8) infinite;
  font-size: 48px;
  font-weight: bold;
}

@keyframes edara {
  0% {
    content: "ا";
  }
  10% {
    content: "ال";
  }
  15% {
    content: "الط";
  }
  20% {
    content: "الطي";
  }
  25% {
    content: "الطير";
  }

  30% {
    content: "الطيرا";
  }
  46% {
    content: "الطيران";
  }
  50% {
    content: "الطيرا";
  }
  60% {
    content: "الطير";
  }
  70% {
    content: "الطي";
  }
  75% {
    content: "الط";
  }
  80% {
    content: "ال";
  }
  100% {
    content: "ا";
  }
}

/* animation nady el tayaran */

/* اسأله ف الاستبيان */
/* التصميم الأساسي - افتراضاً للـ Light Mode أو المود العادي */
.custom-faq-section {
  max-width: 700px;
  margin: 20px auto;
  direction: rtl;
  font-family: sans-serif;
}

.faq-box {
  background: #0a192f; /* لون فاتح افتراضي */
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* في حالة الـ Dark Mode - افترضت أن الكلاس هو .dark-mode */
/* غير اسم الكلاس .dark-mode لما هو موجود عندك في ملفاتك */
body.dark-mode .faq-box {
  background: #2a2a2a;
  border-color: #444;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.faq-box summary {
  padding: 18px;
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: white; /* يأخذ اللون من الـ body عندك */
}

/* حركة علامة الـ + */
.plus-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.faq-box[open] .plus-icon {
  transform: rotate(45deg);
  color: #007bff; /* لون مميز عند الفتح، يمكنك تغييره */
}

.faq-content {
  padding: 0 18px 18px;
  line-height: 1.6;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  animation: slideDown 0.3s ease-out;
}

body.dark-mode .faq-content {
  border-top-color: rgba(255, 255, 255, 0.05);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* edara */
.member-photo {
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}
/* end edara */
