#hero{
    background: linear-gradient(180deg, #fff, #f5f4f4);
    color: #f39c12;
    height: 30vh;
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:0 20px;
}

/* ebooks section */
#ebooks{
  padding:60px 20px;
  max-width:1200px;
  margin:auto;
}

.section-title{
  text-align:center;
  margin-bottom:30px;
  font-size:2rem;
  color:#fff;
}

.ebooks-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(157px, 1fr));
  gap:20px;
}

.ebook-card{
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  padding: 9px;
}

.ebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgb(243 156 18);
}

.ebook-card img{
  width:100%;
  height:240px;
  object-fit:cover;
  display:block;
  border-radius: 6px;
}

.ebook-info{
  padding:8px;
  text-align:center;
}

.ebook-info h3{
  font-size:1rem;
  margin:5px 0;
  line-height:1.4;
  height:2.8em;
  overflow:hidden;
}

.ebook-info .author{
  font-size:.85rem;
  color:#aaa;
  margin-bottom:8px;
}

.ebook-btn{
  display:inline-block;
  padding:6px 12px;
  border-radius:6px;
  background:#fc0f3b;
  color:#fff;
  text-decoration:none;
  font-size:.85rem;
  transition:.2s;
}

.ebook-btn:hover{
  background:#fff;
  color:#fc0f3b;
}

/* mobile tweaks */
@media(max-width:600px){
  .ebook-card img{
    height:200px;
  }
}

/* badge new on books sytle */

.ebook-card,
.book-card {
  position: relative;
  overflow: hidden;
}

.badge-new {
    position: absolute;
  top: 12px;
  left: -35px;
  background: linear-gradient(45deg, #ff0000, #ff6a00);
  color: #fff;
  padding: 5px 40px;
  font-size: 11px;
  font-weight: bold;
  transform: rotate(-45deg);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 2;
}
#badge-top {
    position: absolute;
    top: 5px;
    right: 7px;
    background: #f39c12;
    color: #fff;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
    border-radius: 5px;
}


/* slide novel and books style */
#popularBooks{
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
}
#novelSlider{
    max-width: 1200px;
    margin: auto;
}

.books-slider-section {
  padding: 40px 20px;
}

.books-slider-section h2 {
  margin-bottom: 20px;
  font-size: 1.6rem;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.books-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.books-slider::-webkit-scrollbar {
  display: none;
}

.book-card img {
  width: 100%;
  height: 260px;
  border-radius: 6px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.book-card h3 {
  margin-top: 10px;
  font-size: 14px;
}

#novels {
    position: relative;
    max-width: 1200px;
    margin: auto;
}

.slider-btn{
position:absolute;
top:50%;
transform:translateY(-50%);
background:#000;
color:#fff;
border:none;
width: 40px;
height: 40px;
cursor:pointer;
z-index:10;
font-size:24px;
opacity:.7;
border-radius: 6px;
}

.slider-btn:hover{
opacity:1;
}

.slider-btn.prev{
left:0px;
}

.slider-btn.next{
right:0px;
}

/* style slider most popular */

.books-slider {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  scroll-behavior: smooth;
  padding: 10px 0;
}
.books-slider::-webkit-scrollbar {
  display: none; /* إخفاء شريط التمرير */
}

.book-card {
  min-width: 179px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 114px;
  padding: 9px;
  transition: 0.3s;
}

.book-card h3 {
  font-size: 1rem;
  margin: 5px 0;
}

.book-card .author {
  font-size: 0.85rem;
  color: #555;
}

/* carousel top books */

.carousel-section {
  margin: 40px 0;
}

.carousel-section h2 {
  margin-bottom: 15px;
  font-size: 22px;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.carousel-btn {
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 10;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background: rgba(0,0,0,0.9);
}

.carousel-btn.left {
  position: absolute;
  left: 0;
}

.carousel-btn.right {
  position: absolute;
  right: 0;
}

.books-slider {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  scroll-behavior: smooth;
}

.books-slider::-webkit-scrollbar {
  display: none;
}

.book-card h3 {
  font-size: 14px;
  margin: 6px 0;
}

.author {
  font-size: 12px;
  color: #777;
}
a {
    text-decoration: none;
    color: #000;
}

#sectiontitle{
  display: flex;
  justify-content: space-between;
}
div#headtitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#headtitle a:hover, #sectiontitle a:hover {
    color: #f39c12;
    transition: 0.2s;
}

/*======================== responsive ===============*/

@media (max-width: 768px) {
    div#sectiontitle {
        flex-wrap: wrap;
        gap: 8px;
    }

    div#sectiontitle h2 {
        font-size: 16px;
        line-height: 1.4;
        margin: 0;
        max-width: 70%;
    }

    #showmore a {
        font-size: 14px;
        white-space: nowrap;
    }
}
