/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap");


/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 3.5rem;
  
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    --first-color: hsl(230, 62%, 56%);
    --title-color: hsl(230, 70%, 16%);
    --text-color: hsl(230, 16%, 45%);
    --border-color: hsl(230, 50%, 90%);
    --white-color: hsl(0, 0%, 100%);
    --body-color: hsl(230, 100%, 96%);
    --container-color: hsl(230, 100%, 97%);

/*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Tajawal", sans-serif;
  --second-font: "Tajawal", serif;
  --biggest-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 3.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

  

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }



  html {
    scroll-behavior: smooth;
  }
  
  body,
  input,
  button {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
  }


  body {
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color .4s;
    
  }
  
  input,
  button {
    border: none;
    outline: none;
  }


  h1, h2, h3, h4 {
    color: var(--title-color);
    font-family: var(--second-font);
    font-weight: var(--font-medium);
  }
  
  ul {
    list-style: none;
  }
  
  a {
    text-decoration: none;
  }
  
  img {
    display: block;
    max-width: 100%;
    height: auto;
  }



    /*==============  THEME  ===========*/
    /*==============Variables Dark theme ===========*/
body.dark-theme{
    --title-color: hsl(230, 48%, 85%);
    --text-color: hsl(230, 16%, 70%);
    --border-color: hsl(230, 12%, 18%);
    --body-color: hsl(230, 12%, 8%);
    --container-color: hsl(230, 12%, 12%);
}



/*========== 
	Color changes in some parts of 
	the website, in dark theme
==========*/

.dark-theme .shadow-header{
    box-shadow: 0 2px 16px hsla(0, 0%, 0%, .4);
}


.dark-theme .nav__menu{
    box-shadow: 0 -8px 32px hsla(0, 0%, 0%, .4);
}

.dark-theme .scrollup{
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, .4);
}


.dark-theme .search,
.dark-theme .login{
    background-color: hsla(230, 12%, 8%, .6);
}

.dark-theme::-webkit-scrollbar{
    background-color: hsl(230, 16%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb{
    background-color: hsl(230, 16%, 25%);
}

.dark-theme::-webkit-scrollbar-thumb:hover{
    background-color: hsl(230, 16%, 35%);
}


      /*============== REUSABLE CSS CLASSES ===========*/
.container{
    max-width: 1220px;
    margin-inline: 1.5rem;
}
.grid {
    display: grid;
    gap: 1.5rem;
}

.section{
    padding-block: 5rem 1rem;
}



.section__title{
    text-align: center;
    font-size: var(--h1-font-size);
    font-family: var(--second-font);
    margin-bottom: 2rem;
    
    }

    
    .main{
        overflow: hidden; /* for animations */
    }


     /*============== HEADER & NAV ===========*/
.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    z-index: var(--z-fixed);
    transition: box-shadow .4s background-color .4s;
}

.nav{
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo{
    display: inline-flex;
    align-items: center;
    column-gap: .5rem;
    color: var(--first-color);
    font-weight: var(--font-medium);
}

.nav__logo i{
    font-size: 1.25rem;
}

.nav__list{
    display: flex;
    justify-content: space-between;
    }

    .nav__link{
        color: var(--text-color);
        transition: color .4s;
    }


    .nav__link span{
        display: none;
    }

    .nav__link i{
        font-size: 1.25rem;
    }

    .nav__link:hover{
        color: var(--first-color);
    }

    .nav__actions{
        display: flex;
        align-items: center;
        column-gap: 1rem;
    }

    .nav__actions i {
        font-size: 1.25rem;
        color: var(--title-color);
        cursor: pointer;
        transition: color .4s;
    }

    .nav__actions i:hover{
        color: var(--first-color);
    }


         /*====== ADD SHADOW HEADE =====*/

    .shadow-header{
        box-shadow: 0 2px 16px hsla(0, 0%, 0%, .1);
    }


 /*====== active link =====*/
.active-link{
    color: var(--first-color);
}

      /*============== SEARCH ===========*/
/* =========================================
   Light Frosted Glass Overlay (ستايل أبل)
========================================= */

.search {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-fixed);
  
  /* خلفية بيضاء شديدة الشفافية مع ضبابية عالية */
  background: rgba(255, 255, 255, 0.15); 
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  
  padding: 8rem 1.5rem;
  transition: top 0.4s ease-in-out;
  overflow-y: auto; 
}

.show-search {
  top: 0;
}

/* =========================================
   Search Form
========================================= */

.search__form {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  
  /* مربع بحث زجاجي ناعم */
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05); /* ظل خفيف جداً */
  
  padding-inline: 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.search__form:focus-within {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

.search__icon {
  font-size: 1.25rem;
  color: var(--title-color, #333); 
}

.search__input {
  width: 100%;
  padding-block: 1rem;
  background-color: transparent;
  color: var(--text-color, #111);
  border: none;
  outline: none;
  font-size: 1rem;
  text-align: right; /* بناءً على لغة الموقع */
}

.search__input::placeholder {
  color: #777;
}

/* =========================================
   Close Button
========================================= */

.search__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--title-color, #333);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.search__close:hover {
  opacity: 1;
}

/* =========================================
   Books List
========================================= */

#book-list {
  display: none;
  margin-top: 2rem;
}

.book.hidden {
  display: none;
}

.book {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 16px;
  
  /* بطاقات الكتب متناغمة مع الخلفية */
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  
  transition: transform 0.2s ease, background 0.2s ease;
}

.book:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.book-img {
  width: 50px;
  height: 75px;
  margin-right: 1rem;
  object-fit: cover;
  border-radius: 6px;
}

.book-file i {
  font-size: 2rem;
  color: var(--title-color, #333);
  transition: color 0.3s ease;
}

.book-file:hover i {
  color: hsl(230, 62%, 56%); 
}




 
/* خلفية التعتيم الزجاجية */
.loading-overlay {
    position: fixed;
    inset: 0; 
    background: rgba(15, 23, 42, 0.5); /* تعتيم داكن لإبراز الألوان */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    /* افتراضياً يجب أن يكون مخفياً ويتم إظهاره عبر جافاسكريبت */
    display: none; 
}

/* حاوية شريط التحميل */
.progress-bar {
    width: 80%;
    max-width: 380px;
    height: 8px; /* شريط نحيف وأنيق */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
    direction: ltr; /* شريط التحميل يفضل أن يبقى من اليسار لليمين دائماً */
}

/* السائل الملون (استخدام ID progress الخاص بك) */
#progress {
    width: 0%; /* ستبدأ من 0 وتزيد بالجافاسكريبت */
    height: 100%;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    box-shadow: 0 0 15px rgba(0, 198, 255, 0.6);
    border-radius: 20px;
    position: relative;
    transition: width 0.3s ease-out; /* حركة سلسة عند تحديث النسبة */
}

/* لمعة تمر فوق شريط التحميل */
#progress::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shineSwipe 1.5s infinite linear;
}

/* تنسيق النص العربي */
.loading-text {
    color: #ffffff;
    margin-top: 24px;
    font-family: 'Tajawal', 'Cairo', system-ui, sans-serif; /* خطوط عربية جميلة */
    font-size: 15px;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    animation: smoothPulse 2s ease-in-out infinite;
    direction: rtl; /* اتجاه النص من اليمين لليسار */
}

/* الحركات */
@keyframes shineSwipe {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes smoothPulse {
    0%, 100% { opacity: 0.7; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}


  

/* تنسيق اسم الكتاب */
.book-title {
    font-size: 1rem;
    margin: 0;
    color: var(--title-color);
    transition: color 0.3s ease;
}

/* تنسيق اسم المؤلف */
.book-author {
    color: rgba(255, 255, 255, 0.6); /* أبيض شفاف قليلاً ليعطي عمقاً */
    display: block;
    margin-top: 4px;
    color: var(--text-color);
}


/* .book:hover .book-title {
    color: var(--first-color); 
}

.book:hover .book-author {
    color: #ffffff; 
} */











       /*=============== HOME ===============*/
.home__swiper{
    margin: initial;
}

.home__container{
    padding-top: 2rem;
    row-gap: 2.5rem;
}

.home__data{
text-align: center;


}


.home__title{
    font-size: var(--biggest-font-size);
    margin-bottom: 1rem;
    text-align: center;
}


.home__description{
    margin-bottom: 2rem;
    text-align: right;
}
.home__images{
    display: grid;
    box-shadow: rgba(0, 0, 0, .3);
}

.home__article,
.home__img{
    width: 220px;
    transition: scale .4s;
}

.home__article{
    scale: .7;
}


.home__img {
    width: 100%;
    height: auto;
    border-radius: 10px; /* الزوايا المستديرة */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5); /* تكبير الظل */
    transition: box-shadow 0.3s ease; /* تأثير الظل عند المرور */
    
}

.home__img:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7); /* زيادة الظل عند التمرير على الصورة */
}



.home__swiper .swiper-wrapper {
    display: flex;
    gap: 1px; /* المسافة بين الصور */
}




/* Swiper class */
.swiper-slide-active,
.swiper-slide-duplicate-active{
    scale: 1;
}


.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 30px; /* شكل كبسولة أنيق */
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
  letter-spacing: 0.5px;
}

/* تصميم زجاجي احترافي */
.glass-water {
  background: linear-gradient(135deg,
              rgba(255,255,255,0.15) 0%,
              rgba(255,255,255,0.05) 100%),
              linear-gradient(135deg, #007BFF, #00d2ff);
  background-blend-mode: overlay;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.35),
              inset 0 2px 6px rgba(255,255,255,0.3);
}

/* لمعة داخلية متحركة */
.glass-water::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 160%;
  height: 100%;
  background: linear-gradient(120deg,
              rgba(255,255,255,0.6) 0%,
              rgba(255,255,255,0) 60%);
  transform: rotate(15deg);
  border-radius: inherit;
  pointer-events: none;
  animation: shine 3s infinite linear;
}

/* حركة اللمعة */
@keyframes shine {
  0% { transform: translateX(-100%) rotate(15deg); }
  100% { transform: translateX(100%) rotate(15deg); }
}

/* تأثير التحويم */
.glass-water:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 36px rgba(0, 123, 255, 0.45),
              inset 0 3px 8px rgba(255,255,255,0.4);
}

/* حالة الضغط */
.glass-water:active {
  transform: scale(0.98);
  box-shadow: 0 6px 18px rgba(0, 123, 255, 0.35),
              inset 0 2px 6px rgba(255,255,255,0.3);
}





       
       /*=============== FEATURED ===============*/
       .featured__card{
        position: relative;
        text-align: center;
        background-color: var(--container-color);
        padding: 2rem;
        overflow: hidden;
        border: 2px solid var(--border-color);
        transition: border .4s background-color .4s;
        border-radius: 5%;
       }

       .featured__img{
        width: 150px;
        margin: 0 auto .75rem;
        border-radius: 3%;
       }

       .featured__title{
        font-size: var(--h2-font-size);
        margin-bottom: .5rem;
        
       }

       .featured__prices{
        display: flex;
        justify-content: center;
        align-items: center;
        column-gap: .75rem;
        margin-bottom: 1.25rem;
       }

       .featured__discount{
        color: var(--title-color);
       }

       .featured__price{
        font-size: var(--small-font-size);
        text-decoration: line-through;
       }

       .featured__card .button{
        cursor: pointer;
       }



       /* Swiper class */
.swiper-button-prev::after,
.swiper-button-next::after{
    content: '';
    
    }

    .swiper-button-prev,
    .swiper-button-next{
width: initial;
height: initial;
background-color: var(--container-color);
border: 2px solid var(--border-color);
padding: .5rem;
font-size: 1.5rem;
color: var(--first-color);
transition: border .4s background-color .4s;
border-radius: 10%;
    }



 /*=============== DISCOUNT ===============*/
.discount__container{
    row-gap: 3.5rem;
}

.discount__data{
    text-align: center;
    direction: rtl;
}

.discount__title{
    margin-bottom: 1rem;
    
    
}

.discount__description{
    margin-bottom: 2rem;
    text-align: right;
}

.discount__images{
    display: flex;
    justify-content: center;
}
    
.discount__img-1,
.discount__img-2{
    width: 170px;
}

.discount__img-1{
    transform: translateX(1rem) rotate(-10deg);
}

.discount__img-2{
    transform: translateX(-1rem) rotate(10deg);
}

.discount__images img {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 4.4); /* زيادة الظل */
    border-radius: 8px; /* حواف ناعمة */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1); /* تأثير ديناميكي */
}

.discount__images img:hover {
    transform: rotate(5deg) scale(1.1); /* دوران خفيف مع تكبير */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); /* زيادة كبيرة في الظل */
}





/*=============== NEW ===============*/
.new__card{
    display: flex;
    align-items: center;
    column-gap: 2.5rem;
    background-color: var(--container-color);
    padding: 1.5rem 1rem;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    transition: border .4s, background-color .4s;
    border-radius: 5%;
}

.new__card:hover{
    border: 2px solid var(--text-color);
}

.new__img{
    width: 100px;
    border-radius: 3%;
}

.new__title{
    font-size: var(--h2-font-size);
    margin-bottom: .5rem;
    text-align: center;
}


.new__swiper:nth-child(1){
    margin-bottom: 2rem;
}


.new__card span {
    font-size: 14px;  /* تحديد حجم الخط */
    color: var(--title-color);
   
    margin-top: 10px;  /* إضافة مسافة فوق العنصر */
    display: block;    /* جعل العنصر يظهر في سطر جديد */
}


.scroll__hint {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.scroll__hint i {
    font-size: 1.5rem;
    margin: 0 0.5rem;
}

/*=============== TESTIMONIAL ===============*/

.testimonial__card{
    text-align: center;
    background-color: var(--container-color);
    padding: 2rem 3rem 2.5rem;
    border: 2px solid var(--border-color);
    transition: border .4s, background-color .4s;
    border-radius: 5%;
}

.testimonial__img {
    width: 100px; /* حجم الصورة */
    margin: 0 auto 1.5rem; /* تمركز الصورة وإضافة مسافة سفلية */
    border-radius: 8px; /* الزوايا تصبح مستديرة قليلاً */

}


.testimonial__title{
    font-size: var(--h2-font-size);
    margin-bottom: .75rem;
}

.testimonial__description{
    font-size: var(--small-font-size);
    margin-bottom: 1.25rem;
}




/*=============== FOOTER ===============*/
.footer{
    padding-block: 4rem 2rem;
    border-top: 1px solid var(--border-color); /* الخط الفاصل */
    padding-top: 1.5rem; /* الحشوة العلوية داخل الفوتر */
    text-align: center; /* توسيط النص */
    margin-top: 0; /* إزالة أي مسافات إضافية أعلى الفوتر */
    line-height:0px ;
    
}

.footer__copy{
    display: block;
    margin-top: 0rem;
    text-align: center;
    font-size: var(--small-font-size);
    font-family: 'Roboto Slab', serif; /* الخط الجديد */
}
/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar{
    width: .6rem;
    border-radius: .5rem;
    background-color: hsl(230, 16%, 85%);
}

::-webkit-scrollbar-thumb{
    border-radius: .5rem;
    background-color: hsl(230, 16%, 65%);
}

::-webkit-scrollbar-thumb:hover{
    background-color: hsl(230, 16%, 55%);
}
/*=============== SCROLL UP ===============*/
.scrollup{
    position: fixed;
    right: 1rem;
    bottom: -50%;
    background-color: var(--container-color);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, .1);
    display: inline-flex;
    padding: 6px;
    font-size: 1.25rem;
    color: var(--title-color);
    z-index: var(--z-tooltip);
    transition: bottom .4s transform .4s background-color .4s;
    border-radius: 25%;
}

.scrollup:hover{
    transform: translateY(-.5rem);
}
/* Show Scroll Up */
.show-scroll{
    bottom: 6rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */

@media screen  and (max-width: 320px) {
    .container{
        margin-inline: 1rem;
    }


    .nav__menu{
   padding-inline: 3rem;
    }


    .discount__img-1,
    .discount__img-2{
        width: 140px;
    }

    .new__card{
      flex-direction: column;
    }

    .testimonial__card{
      padding-inline: 1rem;
    }
}




/* For medium devices */

@media screen and (min-width: 450px) {
    .featured__card{
        width: 290px;
    }

    .new__card{
        width: 390px;
    }

    .testimonial__card{
        width: 320px;
    }
}





@media screen  and (min-width: 576px) {
    .search__form{
     width: 500px;
     margin-inline: auto;
    }

    
    .search__close,
    .login__close{
        width: max-content;
        top: 4rem;
        left: 0;
        right: 0;
        margin-inline: auto;
    }

    .nav__menu{
        width: 380px;
        margin-inline: auto;
    }
   .home__container,
   .discount__container{
    grid-template-columns: 420px;
    justify-content: center;
   }
}



@media screen  and (min-width: 768px) {
   .home__container{
grid-template-columns:580px ;
   }
   .home__data{
    width: 420px;
    justify-self: center;
   }

   .footer__container{
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
   }
}
/* For large devices */

@media screen  and (min-width: 1150px) {
    .section{
 padding-block: 7rem 2rem;
    }
    .nav{
     height: calc(var(--header-height) + 2rem);
     column-gap: 4rem;
    }
 
    .nav__link i{
   display: none;
    }
 
    .nav__link span{
  display: block;
    }
    .nav__menu{
        width: initial;
        margin-inline: auto 0;
    }
    .nav__list{
        column-gap: 4rem;
    }
    .nav__link{
        font-weight: var(--font-medium);
    }
    .dark-theme .nav__menu{
        box-shadow: none;
    }
    .home__data{
        width: initial;
    }

    .featured__container{
        padding-top: 2rem;
    }
    .featured__title{
        font-size: var(--h3-font-size);
    }
    .discount__container{
        grid-template-columns: 615px 500px;
        justify-content: space-between;
        align-items: center;
    }
    .discount__data{
        order: 1;
    }
    .discount__data,
    .discount__title{
        text-align: initial;
    }
    .discount__description{
        margin-bottom: 3.5rem;
    }

    .discount__img-1,
    .discount__img-2{
        width: 300px;
    }
    .new__container{
        padding-top: 2rem;
    }
    .new__card{
        padding: 1.5rem;
    }
    .new__img{
        width: 120px;
    }
    .new__title{
        font-size: var(--h3-font-size);
    }

    .testimonial__container{
        padding-top: 2rem;
    }
    .testimonial__card{
        padding-inline: 2rem;
    }
    .testimonial__title{
        font-size: var(--h3-font-size);
    }
    .testimonial__description{
        font-size: var(--normal-font-size);
    }
    .footer{
        padding-block: 6rem 3rem;
    }
   
    .footer__copy{
        right: 3rem;
    }
    .show-scroll{
        bottom: 3rem;
    }
 }



 @media screen  and (min-width: 1220px) {
    .container{
 margin-inline: auto;
    }
    
    .home__container{
     grid-template-columns: 435px 745px;
     align-items: center;
     padding-block: 7rem 2rem;
    }
 
    .home__data{
   text-align: initial;
    }
 
    .home__description{
   margin-bottom: 4rem;
    }
    .home__article,
    .home__img{
        width: 290px;
    }

    }
    

    header nav .end_bx ul li .list {
        position: absolute;
        width: 150px;
        height: auto;
        display: flex;
        justify-content: center;
        flex-direction: column;
        top: 30px;
        z-index: 1;
        padding: 10px;
        opacity: 0;
        visibility: hidden;
    }
    
    header nav .end_bx ul li:hover .list {
        opacity: 1;
        visibility: visible;
    }
    
    header nav .end_bx ul li .list::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        background: rgb(184, 184, 184, .1);
        backdrop-filter: blur(5px);
        border-radius: 10px;
        z-index: -1;
    }
    
    header nav .end_bx ul li .list::after {
        content: '';
        position: absolute;
        border-left: 15px solid rgb(184, 184, 184, .1);
        border-right: 15px solid transparent;
        border-bottom: 15px solid transparent;
        backdrop-filter: blur(5px);
        top: -1px;
        left: 20px;
        transform: rotate(45deg);
        z-index: -1;
    }
    
    header nav .end_bx ul li .list a {
        text-decoration: none;
        color: rgb(255, 255, 255, .7);
        padding: 10px 0px 10px 10px;
        font-family: 'Poppins', sans-serif;
        font-size: 13px;
        transition: .3s linear;
    }
    
    header nav .end_bx ul li .list a:hover {
        color: #fff;
    }

    

    
.logo
 {
    /* border: 1px solid #fff; */
    display: flex;
    align-items: center;
    
}

header nav .logo img {
    width: 100px;
}


.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* لعرض الشعار في منتصف الصفحة */
}

.logo {
    width: 150px; /* يمكنك ضبط الحجم حسب الحاجة */
    transition: filter 0.3s ease-in-out;
}


.logo img {
    animation: pulseRotateGlow 6s infinite ease-in-out;
    transition: transform 0.3s ease;
    will-change: transform, filter;
}

/* تكبير خفيف عند التحويم */
.logo img:hover {
    transform: scale(1.08);
}





.subtitle-banner {
    --main: hsl(230, 62%, 56%);
    --glass-bg: rgba(255, 255, 255, 0.15);

    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 16px;
    height: 45px;
    max-width: 85%;
    margin: 20px auto;

    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.25),
        rgba(255,255,255,0.05)
    );

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        0 8px 25px rgba(0,0,0,0.15),
        inset 0 0 0 1px rgba(255,255,255,0.1);

    overflow: hidden;
    font-family: 'Tajawal', sans-serif;
}

.subtitle-banner .icon {
    font-size: 18px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.subtitle-banner p {
    white-space: nowrap;
    font-size: 15px;
    font-weight: 500;
   color: var(--title-color);
    animation: scrollText 22s linear infinite;
}

/* حركة النص */
@keyframes scrollText {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* نبض الأيقونة */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}




/* From Uiverse.io by SelfMadeSystem */ 
.frutiger-button {
  cursor: pointer;
  position: relative;
  padding: 2px;
  border-radius: 6px;
  border: 0;
  text-shadow: 1px 1px #000a;
  background: linear-gradient(#006caa, #00c3ff);
  box-shadow: 0px 4px 6px 0px #0008;
  transition: 0.3s all;
}

.frutiger-button:hover {
  box-shadow: 0px 6px 12px 0px #0009;
}

.frutiger-button:active {
  box-shadow: 0px 0px 0px 0px #0000;
}

.inner {
  position: relative;
  inset: 0px;
  padding: 1em;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 100%, #30f8f8 10%, #30f8f800 55%),
    linear-gradient(#00526a, #009dcd);
  overflow: hidden;
  transition: inherit;
}

.inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(-65deg, #0000 40%, #fff7 50%, #0000 70%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: thing 3s ease infinite;
}

@keyframes thing {
  0% {
    background-position: 130%;
    opacity: 1;
  }

  to {
    background-position: -166%;
    opacity: 0;
  }
}

.top-white {
  position: absolute;
  border-radius: inherit;
  inset: 0 -8em;
  background: radial-gradient(
    circle at 50% -270%,
    #fff 45%,
    #fff6 60%,
    #fff0 60%
  );
  transition: inherit;
}

.inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: inherit;
  box-shadow: inset 0px 2px 8px -2px #0000;
}

.frutiger-button:active .inner::after {
  box-shadow: inset 0px 2px 8px -2px #000a;
}

.text {
  position: relative;
  z-index: 1;
  color: white;
  font-weight: 550;
  transition: inherit;
}



/* ======== HEADER & NAV ======== */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================
   زر الهمبرغر احترافي
========================= */
.hamburger-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;

    width: 40px;
    height: 32px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    cursor: pointer;
    padding: 6px;
    z-index: 1200;

    transition: transform 0.3s ease;
}
.hamburger-btn:hover {
    transform: scale(1.05);
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 4px;

    background-color: var(--text-color);
    border-radius: 10px;

    transition: transform 0.4s ease, opacity 0.3s ease, background 0.3s ease;
}

/* التحول إلى X */
.hamburger-btn.open span:nth-child(1) {
    transform: translateY(12px) rotate(45deg);
    background: var(--first-color);
}
.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg);
    background: var(--first-color);
}

/* =========================
   قائمة كاملة الشاشة زجاجية احترافية
========================= */
.hamburger-menu {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    padding: 50px 25px;

    /* background: linear-gradient(
        135deg,
        rgba(255,255,255,0.25),
        rgba(255,255,255,0.08)
    ); */
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);

    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1100;
}

/* فتح القائمة */
.hamburger-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* =========================
   رأس القائمة وزر الإغلاق
========================= */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 22px;
    font-weight: bold;
    color: var(--first-color);
    letter-spacing: 1px;
}

/* =========================
   قائمة أفقية احترافية
========================= */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 70px 0 0 0;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px;
}

.menu-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    height: 90px;
    padding: 16px;

    text-align: center;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);

    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);

    transition: transform 0.35s ease,
                background 0.35s ease,
                color 0.35s ease,
                box-shadow 0.35s ease;
}

.menu-list a:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-6px) scale(1.05);
    color: var(--first-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* =========================
   استجابة الشاشات
========================= */
@media screen and (max-width: 768px) {
    .nav__list {
        display: none;
    }

    .nav__actions {
        transform: translateX(-100px);
    }

    #hamburger-btn {
        font-size: 1rem;
    }

    .menu-list {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 14px;
        margin-top: 55px;
    }

    .menu-list a {
        height: 75px;
        font-size: 14px;
    }
}




/* تخطيط الشبكة */
.novels__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  direction: rtl;
}

/* النصوص */
.novels__content {
  text-align: right;
  direction: rtl;
  padding: 1rem;
  max-width: 500px;
}

.novels__description {
  margin-bottom: 2rem;
  text-align: right;
}

/* الصور */
.novels__images {
  position: relative;
  height: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* الصور منفصلة ولكن تتحرك */
.novel__img {
  position: absolute;
  width: 250px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 1; /* تأكدت من ظهور الصور */
  animation-duration: 6s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

/* ترتيب الصور مع أنيميشن تجمع وتتفرق */
.img-1 {
  animation-name: gatherSpread1;
  z-index: 4;
  transform-origin: center center;
}
.img-2 {
  animation-name: gatherSpread2;
  z-index: 3;
  transform-origin: center center;
}
.img-3 {
  animation-name: gatherSpread3;
  z-index: 2;
  transform-origin: center center;
}
.img-4 {
  animation-name: gatherSpread4;
  z-index: 1;
  transform-origin: center center;
}


/* أنيميشن تجمع وتتفرق */
@keyframes gatherSpread1 {
  0%, 100% {
    transform: rotate(-15deg) translateX(-180px) translateY(0);
  }
  50% {
    transform: rotate(0deg) translateX(0) translateY(10px);
  }
}
@keyframes gatherSpread2 {
  0%, 100% {
    transform: rotate(-5deg) translateX(-80px) translateY(0);
  }
  50% {
    transform: rotate(0deg) translateX(0) translateY(5px);
  }
}
@keyframes gatherSpread3 {
  0%, 100% {
    transform: rotate(5deg) translateX(80px) translateY(0);
  }
  50% {
    transform: rotate(0deg) translateX(0) translateY(-5px);
  }
}
@keyframes gatherSpread4 {
  0%, 100% {
    transform: rotate(15deg) translateX(180px) translateY(0);
  }
  50% {
    transform: rotate(0deg) translateX(0) translateY(-10px);
  }
}

/* تأثير Hover على الصور */
.novel__img:hover {
  transform: scale(1.1);
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation-play-state: paused; /* يوقف الأنيميشن عند التمرير */
}

@media screen and (max-width: 600px) {
  .novels__container {
    grid-template-columns: 1fr;
    gap: 1.5rem; /* زيادة طفيفة بالمسافة */
    padding: 1rem;
  }

  .novels__content {
    padding: 1rem;
    max-width: 100%;
  }

  .novels__images {
    height: 240px; /* تكبير ارتفاع الصور */
  }

  .novel__img {
    width: 140px; /* تكبير عرض الصور */
  }

  /* تحديث خفيف للحركات حتى تناسب الحجم الجديد */
  @keyframes gatherSpread1 {
    0%, 100% {
      transform: rotate(-12deg) translateX(-100px);
    }
    50% {
      transform: rotate(0deg) translateX(0);
    }
  }
  @keyframes gatherSpread2 {
    0%, 100% {
      transform: rotate(-4deg) translateX(-50px);
    }
    50% {
      transform: rotate(0deg) translateX(0);
    }
  }
  @keyframes gatherSpread3 {
    0%, 100% {
      transform: rotate(4deg) translateX(50px);
    }
    50% {
      transform: rotate(0deg) translateX(0);
    }
  }
  @keyframes gatherSpread4 {
    0%, 100% {
      transform: rotate(12deg) translateX(100px);
    }
    50% {
      transform: rotate(0deg) translateX(0);
    }
  }
}


  

.fade-in {
  opacity: 0;
  transform: translateY(20px); /* ينزل شوي لتحت بالبداية */
  animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}







.highlights-container {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 15px;
  user-select: none;
  cursor: grab;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.highlights-container::-webkit-scrollbar {
  display: none;
}


.highlight {
  flex: 0 0 auto;
  text-align: center;
  cursor: pointer;
}

.highlight img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #ff4081;
  object-fit: cover;
  transition: transform 0.3s;
}

.highlight span {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: var(--text-color);
}

.highlight:hover img {
  transform: scale(1.1);
}

#storyModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#storyModal.active {
  display: flex;
}

#storyImage {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

#progressBar {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 5px;
  background: rgba(255,255,255,0.3);
}

#progressFill {
  height: 100%;
  width: 0%;
  background: #ff4081;
  transition: width 0.1s linear;
}



















