/* =====================================================
   الخط السعودي
===================================================== */
@font-face {
  font-family: 'SaudiFont';
  src: url('/static/Fonts/saudi/Saudi-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* =====================================================
   القاعدة العامة للصفحة
===================================================== */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  direction: rtl;  /* اتجاه الصفحة من اليمين لليسار */
  font-family: 'SaudiFont', 'Traditional Arabic', serif;
  background-color: #f8f9fa;
}

/* =====================================================
   Navbar والعنوان
===================================================== */
.navbar {
  background-color: rgba(102, 102, 255, 0.7) !important; /* لون الهيدر */
  padding: 12px 24px;
}

.navbar-brand {
  color: #fff !important;        /* يخلي اللون أبيض */
  font-weight: bold;
  text-align: center;
  font-size: 28px;               /* يكبر الخط */
}

/* =====================================================
   الأزرار داخل Navbar
===================================================== */
.navbar .btn {
  font-weight: bold;
  border-radius: 8px;
  color: #fff !important;
  border: none !important;
  transition: all 0.3s ease;
  font-size: 16px;
  padding: 10px 24px;   /* حجم افتراضي للشاشات الكبيرة */
  margin: 0 6px;        /* مسافة بين الأزرار */
}

/* ألوان الأزرار */
.btn-map      { background-color: #408080; } 
.btn-calendar { background-color: #a2c41e; } 
.btn-gallery  { background-color: #993366; } 

/* تأثير hover للأزرار */
.btn-map:hover      { background-color: #305f5f; transform: translateY(-2px); }
.btn-calendar:hover { background-color: #769117; transform: translateY(-2px); }
.btn-gallery:hover  { background-color: #77254d; transform: translateY(-2px); }

/* تكبير الأزرار قليلاً في الشاشات الكبيرة */
@media (min-width: 1200px) {
  .navbar .btn {
    font-size: 18px;
    padding: 12px 28px;
  }
}

/* تصغير الأزرار في الشاشات الصغيرة */
@media (max-width: 768px) {
  .navbar .btn {
    font-size: 14px;
    padding: 8px 16px;
    margin: 4px 0;
    width: 100%;
  }
}

/* =====================================================
   Timeline container
===================================================== */
.timeline-container {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  height: calc(100vh - 120px);
  padding-bottom: 20px;
  gap: 0px;
}

/* =====================================================
   البطاقات (Timeline)
===================================================== */
.event-card {
  min-width: 30vw;
  max-width: 30vw;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 0;          /* زوايا حادة */
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
  border: none;
}

.event-card:nth-child(1) { border-top: 4px solid #a2c41e; border-bottom: 8px solid #408080; }
.event-card:nth-child(2) { border-top: 4px solid #796633; border-bottom: 8px solid #3b2929; }
.event-card:nth-child(3) { border-top: 4px solid #8b401e; border-bottom: 8px solid #336655; }
.event-card:nth-child(4) { border-top: 4px solid #993366; border-bottom: 8px solid #d96633; }
.event-card:nth-child(5) { border-top: 4px solid #a2c41e; border-bottom: 8px solid #408080; }
.event-card:nth-child(6) { border-top: 4px solid #796633; border-bottom: 8px solid #3b2929; }
.event-card:nth-child(7) { border-top: 4px solid #8b401e; border-bottom: 8px solid #336655; }
.event-card:nth-child(8) { border-top: 4px solid #993366; border-bottom: 8px solid #d96633; }

.event-card:hover { transform: translateY(-5px); }

.event-card img {
  width: 100%;
  height: 60%;
  object-fit: contain;
  background: #f9f9f9;
  border: none;
}

.event-body {
  padding: 12px;
  text-align: center;
  height: 40%;
  overflow: hidden;
}

.event-body h3 { font-size: 18px; margin-bottom: 8px; }
.event-body p  { font-size: 14px; color: #444; margin-bottom: 6px; }

.card-date {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #e2f0e2;
  color: #796633;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
}

/* =====================================================
   Gallery
===================================================== */
#gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  direction: rtl;
  gap: 20px;
  padding: 20px;
}

#gallery img {
  border: 4px solid;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#gallery img:nth-child(1) { border-color: #a2c41e; }
#gallery img:nth-child(2) { border-color: #408080; }
#gallery img:nth-child(3) { border-color: #796633; }
#gallery img:nth-child(4) { border-color: #3b2929; }
#gallery img:nth-child(5) { border-color: #8b401e; }
#gallery img:nth-child(6) { border-color: #336655; }
#gallery img:nth-child(7) { border-color: #993366; }
#gallery img:nth-child(8) { border-color: #d96633; }

#gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* =====================================================
   تصميم البوب أب (Modal)
===================================================== */
.modal-content {
  background-color: rgba(102, 102, 255, 0.7);
  border-radius: 12px;
  border: 2px solid rgba(150, 150, 150, 0.5);
  padding: 15px;
  color: #fff;
  width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-weight: bold;
  font-size: 22px;
  color: #fff;
  text-align: center;
}

.modal-body p {
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  text-align: justify;
}

#modalImage {
  border: 4px solid rgba(255,255,255,0.3);
  border-radius: 8px;
}

.modal-header .btn-close {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

.modal-header .btn-close:hover {
  background-color: rgba(255,255,255,0.5);
}

/* =====================================================
   الخريطة
===================================================== */
#map {
  height: 70vh;
  border: 4px solid #408080;
  border-radius: 0;
}

/* =====================================================
   Media Queries (Responsive)
===================================================== */
@media (max-width: 1024px) {
  .event-card { min-width: 45vw; max-width: 45vw; }
}

@media (max-width: 768px) {
  .event-card { min-width: 90vw; max-width: 90vw; }
  .timeline-container { gap: 15px; padding-bottom: 15px; }
}
