@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@400..800&display=swap');
* {
    font-family: "Baloo Bhaijaan 2", sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    direction: unset;
}

body {
    background-color: rgb(77, 129, 175);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: (100vh-120px);
    margin: 0 !important    ;
    padding: 0 !important;
    width: 100%;
    gap: 20px;
    text-align: center;
    margin-bottom:30px !important;
}
.background-draw {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  position: static !important;
  width: 100% ;
  max-width: 280px;
  z-index: -1;
  filter: drop-shadow(0px 0px 50px rgba(30, 90, 140, 0.8));
  object-fit: scale-down;
}
.navbar-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    direction : rtl;
    color : rgb(55, 115, 170);
    background-color : rgba(255, 255, 255, 0.8);
    text-decoration : none; 
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    border-radius: 5px;
    box-sizing: border-box;
    padding: auto;
    margin: 0px;
   
}
 nav a {
    text-decoration: none;
    color: rgb(55, 115, 170);
    font-size: 1.7rem;
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    font-weight: bold;
    height: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: right;
}
nav a:hover {
    color: rgb(30, 90, 140);
    text-decoration: none;
    transition: color 0.3s ease;
}
    .logo {
    display: inline-flex;
    flex-wrap: wrap ;
    align-items: center;
    justify-content: center;
    margin-right: 1vw;
}
span.navdiv button {
    color:rgb(30, 90, 140);
    font-family:'Baloo Bhaijaan 2', sans-serif;
    display:flex; 
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    border: 2px solid rgb(55, 115, 170);
    color:rgb(30, 90, 140);
    background-color: aliceblue;
    transition: background-color 0.3s ease;
    border-radius:64px 48px 96px 16px;
    padding: 1px 1.8px 1px 1.8px;
    align-items: stretch;
    margin-left: 0.9vw;
    cursor: pointer;
    padding: 0.8vw;
}
span.navdiv button:hover {
    background-color: rgb(40, 90, 130);
    border-color: rgb(240, 248, 255);
    color: rgb(240, 248, 255);
    transition: background-color 0.3s, border-color 0.4s;
}
.navdiv-btn{
    color:rgb(30, 90, 140);
    font-family:'Baloo Bhaijaan 2', sans-serif;
    display:flex; 
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    border: 2px solid rgb(55, 115, 170);
    color:rgb(30, 90, 140);
    background-color: aliceblue;
    transition: background-color 0.3s ease;
    border-radius:64px 48px 96px 16px;
    padding: 1px 1.8px 1px 1.8px;
    align-items: stretch;
    margin-left: 0.9vw;
    cursor: pointer;
    padding: 0.8vw;
}
.navdiv-btn:hover{ 
   background-color: rgb(40, 90, 130);
    border-color: rgb(240, 248, 255);
    color: rgb(240, 248, 255);
    transition: background-color 0.3s, border-color 0.4s;  
}
.search {
    display: flex;
    align-items: stretch;
    padding:0.2vw;
    gap: 0.8vw;
    min-width: 0;
}
#search-input {
font-family: 'Baloo Bhaijaan 2', sans-serif;
color: rgb(55, 115, 170);
border: 2px solid rgb(55, 115, 170);
border-radius: 64px 48px 96px 16px;
box-sizing: border-box;
box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
padding: 0.5vw;
margin: 0vw;
max-width: 30vw;
min-width: 35vw;
transition: width 0.3s;
position: inherit;
}
#search-button {
 color:rgb(30, 90, 140);
    font-family:'Baloo Bhaijaan 2', sans-serif;
    display: inline;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 2px solid rgb(55, 115, 170);
    background-color: aliceblue;
    padding: 5px;
    margin: 0px;
    border-radius: 64px 48px 16px 96px;
}
#search-button:hover{
    background-color: rgb(40, 90, 130);
    border-color: rgb(240, 248, 255);
    color: rgb(240, 248, 255);
    transition: background-color 0.3s, border-color 0.4s;
}
.navdiv-btn{
    color:rgb(30, 90, 140);
    font-family:'Baloo Bhaijaan 2', sans-serif;
    display:flex; 
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    border: 2px solid rgb(55, 115, 170);
    color:rgb(30, 90, 140);
    background-color: aliceblue;
    transition: background-color 0.3s ease;
    border-radius:64px 48px 96px 16px;
    padding: 1px 1.8px 1px 1.8px;
    align-items: stretch;
    margin-left: 0.9vw;
    cursor: pointer;
    padding: 0.8vw;
}
.navdiv-btn:hover{ 
   background-color: rgb(40, 90, 130);
    border-color: rgb(240, 248, 255);
    color: rgb(240, 248, 255);
    transition: background-color 0.3s, border-color 0.4s;  
}
/* Container القائمة Dropdown */
.dropdown {
  position: absolute;
  top: 50px; /* اضبطي الارتفاع بحسب مسافة زر القائمة */
  left: 2px; /* نقل القائمة لأقصى اليسار بدلاً من right */
  right: auto; /* لإلغاء أي محاذاة يمين سابقة */
  
  list-style: none;
  padding: 10px 0;
  margin: 0;
  min-width: 160px;
  background-color: aliceblue;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(30, 90, 140, 0.15);
  border: 1px solid rgba(30, 90, 140, 0.12);
  
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

/* إضافة السهم الصغير في الأعلى (Tooltip Arrow) مثل الصورة */
.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px; /* نقل السهم ليكون تحت الأيقونة اليسرى بالضبط */
  right: auto;
  width: 10px;
  height: 10px;
  background-color: aliceblue;
  transform: rotate(45deg);
  border-top: 1px solid rgba(30, 90, 140, 0.12);
  border-left: 1px solid rgba(30, 90, 140, 0.12);
}

/* عناصر القائمة */
.dropdown li {
  padding: 0;
  margin: 0;
  width: 100%;
  list-style: none;
}

/* الخط الفاصل بين العناصر */
.dropdown li:not(:last-child) {
  border-bottom: 1px solid rgba(30, 90, 140, 0.1);
}

/* الروابط داخل القائمة */
.dropdown li a {
  display: block;
  padding: 10px 10px 23px 10px;
  height: 15px;
  font-size: 0.90rem;
  font-weight: normal;
  color: rgb(30, 90, 140); /* لون النص الخاص بكِ */
  text-decoration: none;
  text-align: right;  /* محاذاة النص لليمين داخل المستطيل */
  white-space: nowrap;/* يمنع خروج أو نزول الكلمات بشكل عشوائي */
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* تأثير التمرير (Hover) */
.dropdown li a:hover {
  background-color: rgba(30, 90, 140, 0.06); /* تغيير خفيف جداً يوضح التحديد */
  border-radius: 6px;
}

/* عند التفعيل */
.dropdown.active {
  opacity: 1;
  height: 80px;
  transform: translateY(0);
  pointer-events: auto;
}

pre {
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    direction: unset;
    font-size: 1rem;
    text-decoration: none;
    color: aliceblue;
    text-shadow: 0 0 20px rgb(30, 90, 140) , 0 0 20px rgb(30, 90, 140);
    position: relative;
    text-align: center;
    justify-content: center;
    align-items: center;
    margin-top: 0px;
}
p {
    font-size: 1.2rem;
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    direction: unset;
    color: rgb(240,248,255);
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 30px;
    margin: 10px 10px 0px 0px;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.9);
    direction: rtl;
}
.span {
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    direction: rtl;
    font-size: 0.3rem;
}
a {
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;  
    text-align: center;
}
div a button {
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    direction: rtl;
    font-size: 1rem;
    text-decoration: none;
    display: inline;
    color: rgb(55, 115, 170);
    background-color: aliceblue;
    border-radius: 10px;
    border : 2px solid rgb(55, 115, 170);
    padding: 2px;
    margin: 10px;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: rgb(55, 115, 170);
    color: white;
}
abbr {
    text-decoration: none;
}
footer {
    margin:90px 0px 0px 0px ;
    padding: 0px ;
    background-color: aliceblue;
    width: 100%;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center;
    align-items: flex-end;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
}
footer p {
   font-family: 'Baloo Bhaijaan 2', sans-serif;
    direction: rtl;
    font-size: 0.8rem;
    color: rgb(2, 65, 102);
    padding: 0px;
    margin: 0px 10px ;
    background-color: aliceblue;
    text-shadow: none;
}
footer a.footer-link {
    color: rgb(75, 115, 170);
    text-decoration: underline;
    font-style: oblique;
    font-weight: bold;
}

main {
  flex: 1;
}
/* Base styles: Mobile first */
body {
    font-size: 1rem;
    padding: 0 1vw;
    margin: 0;
    box-sizing: border-box;
}

.container {
    display: grid;
    grid-template-areas: 
        "header"
        "hero"
        "main"
        "sidebar"
        "footer";
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive typography */
h1, h2, h3 {
    font-size: clamp(1.2rem, 2.5vw, 2.5rem);
    margin: 0.5em 0;
}

/* Tablet styles */
@media (min-width: 600px) {
    .container {
        grid-template-areas: 
            "header header"
            "hero hero"
            "main sidebar"
            "footer footer";
        grid-template-columns: 2fr 1fr;
    }
    .box {
        width: 40vw;
        max-width: 16rem;
    }
}

/* Desktop styles */
@media (min-width: 900px) {
    .container {
        grid-template-areas: 
            "header header header"
            "hero main sidebar"
            "footer footer footer";
        grid-template-columns: 2fr 3fr 1fr;
    }
    .box {
        width: 10rem;
        max-width: 100%;
    }
    .background-draw {
    position: relative;
    margin-top: 20vh;
    align-items: center;
    justify-content: center;
    align-content: center;
    margin-bottom: 0px;
   content: center;
    width: 45%;
    height:10%;
    left: 8%;
    size: 250px;
     filter: drop-shadow(0px 0px 50px rgba(30, 90, 140, 1.3));
   
    }
}

/* Navbar responsiveness */
.navbar {
    flex-wrap: wrap;
    padding: 10px 2vw;
    width: 100%;
    align-items: stretch;
    box-sizing: max-content;
}
.nav-links {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1vw;
}
.hamburger {
    display: none;
}

    

/* Show hamburger on small screens */
@media (max-width: 600px) {
  .header {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: stretch;
  }

  .search-bar {
    width: 100%;
    margin: 10px 0;
  }

  .logo {
    margin-bottom: 10px;
    align-self: center;
  }
}
.background-draw {
    position: relative;
    margin-top: 5vh;
    align-items: center;
    justify-content: center;
    align-content: center;
    align-self: center;
   content: center;
    width: 50%;
    height:50%;
    left: 25%;
    object-fit: scale-down;
    filter: drop-shadow(0px 0px 50px rgba(30, 90, 140, 1.3));
    
}


/* Utility: Responsive images */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive blockquote */
blockquote {
    max-width: 95vw;
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin: 1rem auto;
    padding: 1rem;
    box-sizing: border-box;
}

/* Responsive form and buttons */
.search input, .search-button {
    width: 100%;
    align-items: stretch;
    max-width: 300px;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .search input, .search-button {
        width: auto;
        align-items: stretch;
        max-width: none;
    }
}

/* Responsive pre/code blocks */
pre, code {
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100vw;
    overflow-x: auto;
}
