/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}




/* Body */
body {
  background-color: #ffffff;
  color: #333;
  direction: rtl;
  line-height: 1.8;
  overflow-x: hidden; /* يمنع السكرول العرضي تماماً */
}





/* Header */
header {
  background: linear-gradient(135deg, #8e6f3e, #c9a44c);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

header h1 {
  font-size: 36px;
  margin-bottom: 10px;
  transition: 0.3s;
  display: inline-block;

}

header h1:hover {
  color: #c9a44c;
  font-size: 37px;
}

header p {
  font-size: 18px;
  opacity: 0.9;
  transition: 0.3s;
  display: inline-block;

}
header p:hover {
  color: #000000;
}



/* Navbar */
nav {
  background-color: #2c2c2c;
  display: flex;
  justify-content: center;
  gap: 25px;
  padding: 15px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  transition: 0.3s;
}

nav a:hover {
  color: #c9a44c;
}

/* Main Section */
section {
  border-right: 5px solid #8e6f3e; /* لمسة جمالية باللون الذهبي */
  margin:  auto;
  margin-right: 10px;
  padding: 20px;
  background-color: #ffefc2;
  border-radius: 8px;
  display: block;
  max-width: 1200px; 
  width: 95%;
  margin: auto;
  margin-top: 20px;
  margin-bottom: 20px;
}

section h2 {
  color: #8e6f3e;
  margin-bottom: 15px;
  font-size: 26px;
  display: inline-block;
}

section p {
  font-size: 20px;
  color: #555;
  max-width: auto;
  text-align: center;
  font: bold;
} 

img{
  border: 5px solid #130000;
  width: 550px;
  height: 300;
  float: left;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  margin: 20px;
  border-radius: 5px;
  transition: 0.3s;

}

img:hover {
  transform: translateY(-15px);
}



.about {
  padding: 20px;
  margin-top: 50px;
  background-color: #fafafa;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.1s;
  display: inline-block;
  flex-direction: column; /* ده السطر اللي هيخليهم تحت بعض */
  width: 750px;
  border-right: 5px solid #8e6f3e; /* لمسة جمالية باللون الذهبي */
  margin-right: 10px;
  height: auto;
}


.about:hover {
  transform: translateY(-5px);
}


.history{
  padding: 20px;
  margin-top: 50px;
  background-color: #fafafa;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.1s;
  display: inline-block;
  flex-direction: column; /* ده السطر اللي هيخليهم تحت بعض */
  width: 750px;
  border-right: 5px solid #8e6f3e; /* لمسة جمالية باللون الذهبي */
  margin-right: 10px;
  height: auto;
}
.history:hover {
  transform: translateY(-5px);
}


/* Cards Layout */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* كل بطاقة على الأقل 300px */
  gap: 25px;
  margin-top: 20px;
  width: 100%; /* تأكد إنها واخدة العرض كله */
  max-width: 1200px; /* عشان شكلها ميبقاش عريض أوي في الشاشات الكبيرة */
}

.card {
  background-color: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  border: 2px solid #8e6f3e;
  box-sizing: border-box; 
  text-align: center;
  height: 100%; /* عشان كل الكروت تكون طول واحد */
  padding-bottom: 15px;
}


.card img {
  width: auto; /* بدل 100% */
  max-width: 90%; /* عشان ما تعديش حدود الكارد */
  height: 300px;
  object-fit: cover;
  object-position: center; /* يركّز الصورة في النص */
  display: block;
  margin:  auto; /* يخلي الصورة في النص أفقيًا */
  box-sizing: border-box;
  margin-top: 10px;
  transition: none !important;
  transform: none !important;

}



.card:hover {
  transform: translateY(-5px);
}



.card h3 {
  color: #8e6f3e;
  padding: 15px 15px 5px;
  margin: 0;
}

.card p {
  padding: 0 15px 15px;
  color: #555;
  font-size: 15px;
  margin: 0;
  
}





.card1{
  padding: 20px;
  background-color:  #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 750px;
  border-radius: 100px;
  border: solid;
  margin-top: 50px;
  margin-bottom: 50px;
}


.card1 h3 {
  color: #8e6f3e;
  padding: 15px 15px 20x;
  display: inline-block;
}

.card1 p {
  padding: 15px 15px 20px;
  color: #555;
  font-size: 20px;
    
}






.visit {
  padding: 20px;
  background-color: #ffffff;
  border: solid;
  border-radius: 200px;
  border-color: #130000;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: 50px auto; 
  display: flex;
  flex-direction: column; /* ده السطر اللي هيخليهم تحت بعض */
  align-items: center; /* عشان يوسطن الكلام في النص */
  width: 750px;
  text-align: center; /* عشان يخلي النص جوه العناصر في النص */
}



.visit h2 {
  color: #8e6f3e;
 margin-bottom: 10px; /* مسافة بسيطة تحت العنوان */
}


.visit p {
  color: #555;
  font-size: 20px;
  line-height: 1.8; /* عشان الكلام ميبقاش لازق في بعضه */
}



.greatness{
  padding: 20px;
  margin-top: 70px;
  background-color: #fafafa;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.1s;
  display: inline-block;
  flex-direction: column; /* ده السطر اللي هيخليهم تحت بعض */
  width: 750px;
  border-right: 5px solid #8e6f3e; /* لمسة جمالية باللون الذهبي */
  margin-right: 10px;
  height: auto;

}

.greatness h2{
  color: #8e6f3e;
  margin-bottom: 10px; /* مسافة بسيطة تحت العنوان */
  display: inline-block;
}
.greatness p{
  color: #555;
  font-size: 20px;
  line-height: 2; /* عشان الكلام ميبقاش لازق في بعضه */
  display: inline-block;

}

.greatness-img{
  border: 5px solid #130000;
  width: 550px;
  height: auto; /* يفضل جعل الطول تلقائي للحفاظ على أبعاد الصورة */
  display: block; /* تجعل الصورة عنصر كتلة */
  margin: 20px ; /* يوسطن الصورة في نص الصفحة */
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 5px;
  transition: 0.3s;
  flex: 1 1 350px; /* التوسع بمرونة بحد أدنى 350px */
  max-width: 100%;
  object-fit: cover;
}

.greatness:hover {
  transform: translateY(-5px);
}



/* تنسيق قسم الأهمية الجديد */
.importance-section {
  display: block; 
  width: 90%;
  /* التعديل الجوهري هنا */
  margin: 40px auto; /* 40px مسافة أمان من فوق وتحت و auto عشان يجي في النص */
  position: relative; /* يضمن إنه يتحرك في مكانه الطبيعي بدون تداخل */
  clear: both; /* يمنع أي عناصر طائرة (float) إنها تيجي جنبه */
  background-color: #fafafa;
  padding: 30px;
  border-right: 5px solid #8e6f3e; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: 0.3s;
}



.importance-section:hover {
  transform: translateY(-5px);
}


.importance-section ul {
    list-style: none;
    margin-top: 20px;
    padding-right: 0;
}

.importance-section li {
    margin-bottom: 15px;
    font-size: 18px;
    position: relative;
    padding-right: 25px;
}

.importance-section li::before {
    content: "✨";
    position: absolute;
    right: 0;
    color: #8e6f3e;
}



#dust-container {
    position: fixed;
    /* لو الهيدر بتاعك 80px، خلي الـ top هنا 80px */
    top: 80px; 
    left: 0;
    width: 100%;
    /* بنطرح ارتفاع الهيدر من طول الشاشة عشان ميبقاش فيه سكرول */
    height: calc(100vh - 80px); 
    z-index: 9999; 
    background-color: transparent;
    overflow: hidden;
    pointer-events: none;
}

.dust-particle {
    position: absolute;
    background-color: #c2b280; 
    border-radius: 50%;
    opacity: 0;
    /* بتبدأ من أول الحاوية (اللي هي تحت الهيدر مباشرة) */
    top: -5px; 
    box-shadow: 0 0 5px rgba(194, 128, 128, 0.5);
    animation: fallDown linear infinite;
}

@keyframes fallDown {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        /* تنزل لآخر الحاوية */
        transform: translateY(calc(100vh - 80px)) translateX(30px);
        opacity: 0;
    }
}






footer {
  clear: both; /* يضمن نزول الفوتر أسفل الصور التي تستخدم float */
  background-color: #2c2c2c; /* لون الفوتر الحالي في ملفك */
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  z-index: 10001; /* يجعله فوق طبقة التراب لسهولة قراءة الروابط */
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-section h3 {
  color: #c9a44c; /* اللون الذهبي المستخدم في الهيدر */
  margin-bottom: 10px;
}

.footer-section a {
  color: #fff;
  text-decoration: none;
  margin: 0 5px;
}

.footer-section a:hover {
  text-decoration: underline;
  color: #c9a44c;
}

#searchInput {
    display: block;
    width: 90%;
    max-width: 600px;
    margin: 20px auto;
    padding: 12px 20px;
    border: 2px solid #8e6f3e;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}



/* Admin Form */
.admin-form {
  max-width: 700px;
  margin: 30px auto;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: 0.3s;
}


.admin-form:hover {
  transform: translateY(-5px);
}

.admin-form h2 {
  margin-bottom: 20px;
  color: #8e6f3e;
  text-align: center;
  font-size: 28px;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  transition: 0.3s;
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: #8e6f3e;
  box-shadow: 0 0 5px rgba(142,111,62,0.5);
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-form button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #8e6f3e, #c9a44c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.admin-form button:hover {
  opacity: 0.9;
  color: #e2af50;
}

.search{
  margin: 20px auto;
}

ul{
  margin-top: 500pyx;
}


li{
  margin-right:10px ;
}



.search-box {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 20px auto;
}

.search-box input {
  flex: 1; /* 👈 ده السر */
  padding: 12px 15px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  
}

.search-box input:focus {
  border-color: #c59d5f;
}

.search-box button {
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #d4af37, #b8962e);
  color: #fff;
  transition: 0.3s;
}

.search-box button:hover {
  background: linear-gradient(135deg, #b8962e, #d4af37);
  

}




.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #8e6f3e;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.stat-card p {
  font-size: 24px;
  font-weight: bold;
  color: #c9a44c;
}


/* تنسيق بوابة دخول الأدمن */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f4f4f4;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  direction: rtl;
}

.auth-card {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 2px solid #8e6f3e;
  max-width: 400px;
  width: 90%;
}

.auth-card h2 {
  color: #8e6f3e;
  margin-bottom: 15px;
  font-size: 24px;
}

.auth-card p {
  margin-bottom: 20px;
  color: #555;
}

.auth-card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  font-size: 16px;
  text-align: center;
}

.auth-card button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #8e6f3e, #c9a44c);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
}

.auth-card button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.auth-error {
  color: #e74c3c;
  margin-top: 10px;
  display: none;
  font-weight: bold;
}

#logoutBtn {
  background-color: #fa0000; 
  color: white;
  border: 1px solid #fff;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
  padding: 5px 15px;
  border-radius: 5px cursor;
  margin-right: 10px;
  font-family: 'Cairo';
}

#logoutBtn:hover {
  background-color: #0e0101; /* يقلب أسود عند الوقوف عليه */
}



/* شاشة البداية */
#intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; 
  transition: opacity 1s ease;
  z-index: 10000;
}


/* 1. الكلاس الجديد اللي هيشيل الصورة والاسم مع بعض */
.intro-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: flyIn 2.5s ease-out forwards; /* الأنيميشن بقا هنا للكل */
}

/* 2. اللوجو (شيلنا منه الأنيميشن) */
.intro-logo {
  width: 180px;
  display: block;
}

/* 3. الاسم (شيلنا منه الأنيميشن) */
.name {
  font-family: 'Cairo', sans-serif;
  margin-top: 15px; 
  width: auto;
  color: #0410bb;
}

/* كود الـ flyIn بتاعك زي ما هو بالظبط مش هنلمسه */
@keyframes flyIn {
  0% {
    transform: translateY(-200px) scale(0.3);
    opacity: 0;
  }
  60% {
    transform: translateY(30px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
  }
}





/* ================= Media Queries لكل المقاسات الممكنة ================= */

/* --- شاشات الموبايل الصغيرة جداً (أقل من 480px) --- */
@media (max-width: 480px) {
  header h1 { font-size: 22px; }
  header p { font-size: 13px; }
  .about-text { padding: 15px; } /* تقليل الحواف عشان مساحة الشاشة */
  .about-image { flex-basis: 100%; } /* الصورة تاخد العرض كله */
  .cards, .halls { grid-template-columns: 1fr; } /* كارت واحد في السطر */
  nav { gap: 5px; }
  nav a { font-size: 12px; padding: 5px; }
}

/* --- شاشات الموبايل الكبيرة والتابلت الصغير (481px إلى 768px) --- */
@media (max-width: 768px) {
  .about-container { flex-direction: column; text-align: center; } /* رص العناصر رأسي */
  .about-text { border-right: none; border-top: 5px solid #8e6f3e; } /* الخط الذهبي يبقى فوق */
  .cards, .halls { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

/* --- الشاشات المتوسطة واللاب توب (769px إلى 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
  header h1 { font-size: 30px; }
  .cards, .halls { grid-template-columns: repeat(2, 1fr); }
  .about-container { gap: 20px; }
}

/* --- شاشات الديسكتوب الكبيرة (أعلى من 1025px) --- */
@media (min-width: 1025px) {
  .about-container, .cards, .halls {
    max-width: 1300px;
    margin: 0 auto;
  }
  .cards, .halls { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

/* ================= تحسينات عامة لكل العناصر ================= */
* {
  box-sizing: border-box; /* بيضمن إن الـ Padding ميزودش حجم العنصر ويطلعه بره الشاشة */
}

/* للموبايلات (أصغر من 768px) */
@media (max-width: 768px) {
    
    .importance-section {
        flex-direction: column; /* يرتب العناصر تحت بعضها */
    }

    .greatness, .content-wrapper {
        flex: 1 1 100%; /* العرض بالكامل */
        border-right: none;
        border-top: 6px solid #8e6f3e; /* نقل الخط الذهبي للأعلى لشكل أفضل */
    }

    .greatness-img {
        flex: 1 1 100%;
        max-height: 250px; /* تحديد ارتفاع مناسب في الموبايل */
    }
}

/* للشاشات المتوسطة والتابلت */
@media (min-width: 769px) and (max-width: 1100px) {
    .greatness, .content-wrapper {
        flex: 1 1 400px;
    }
    .greatness-img {
        flex: 1 1 300px;
    }
}



/* Halls Layout - نسخة مطابقة تماماً للـ Cards */
#hallsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* نفس التوزيع */
  gap: 25px;
  margin: 20px auto; /* auto عشان يتركز في نص الصفحة */
  width: 100%;
  max-width: 1200px;
}

/* Hall Card Styling */
.hall-card {
  background-color: #fafafa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  border: 2px solid #8e6f3e; /* نفس اللون الذهبي */
  box-sizing: border-box; 
  text-align: center;
  height: 100%; 
  padding-bottom: 15px;
}

/* Hall Image Styling */
.hall-card img {
  width: auto;
  max-width: 90%; 
  height: 300px;
  object-fit: cover;
  object-position: center; 
  display: block;
  margin: auto; 
  margin-top: 10px;
  box-sizing: border-box;
  transition: none !important;
  transform: none !important;
}

/* Hover Effect */
.hall-card:hover {
  transform: translateY(-5px);
}

/* Text Styling */
.hall-card h3 {
  color: #8e6f3e;
  padding: 15px 15px 5px;
  margin: 0;
  font-family: 'Cairo', sans-serif; /* عشان الخط يكون متناسق مع الموقع */
}

.hall-card p {
  padding: 0 15px 15px;
  color: #555;
  font-size: 15px;
  margin: 0;
  line-height: 1.6; /* لإعطاء راحة في قراءة وصف القاعة */
}