* {
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: Aldhabi;
    src: url("fonts/alfont_com_AlFont_com_4_30.ttf");
}

body {
    font-family: Jomhuria;
    background-color: rgb(248, 246, 242);
    overflow-x: hidden;

}

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;

}

nav {
    display: flex;

    align-items: center;
    height: 120px;
    background-color: white;
    width: 100%;




}

.logo {
    margin-right: 5px;
}

.logo img {
    width: 280px;
    height: auto;
    display: block;
    height: 120px;


}

.navlinks {

    size: 30px;
    display: flex;
    flex: 1;
    justify-content: center;
    margin-left: 90px;
}

.navlinks ul {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    font-size: 25px;


}


.navlinks a {
    text-decoration: none;
    color: rgb(18, 45, 82);
    white-space: nowrap;


}

.navlinks a:hover {
    color: rgb(45, 90, 140);
}

.icons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    font-size: 30px;
    margin-left: 20px;

}

.icons a {
    color: rgb(18, 45, 82);
}

main {
    padding-top: 80px;
}

.categories {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    background-color: rgb(252, 251, 250);
    width: 90%;
    margin: 40px auto;
    padding: 25px 20px;
    border-radius: 20px;
    gap: 40px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    direction: rtl;

}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    text-decoration: none;
    flex: 1;
    transition: transform 0.2s ease;
    flex-direction: column;

}

.category-item:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: rgb(245, 237, 230);
    display: flex;
    justify-content: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.category-item:hover .icon-wrapper {
    background-color: rgb(235, 220, 208);

}

.icon-wrapper a {
    color: rgb(61, 52, 46);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.category-text {
    color: rgb(18, 45, 82);
    font-size: 16px;
    font-weight: 600;
    flex-direction: column;
    font-family: 'Cairo', sans-serif;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
    display: flex;
    justify-content: center;
    margin-top: 150px;
}

.section-title h2 {
    background: whitesmoke;
    font-size: 32px;
    border-radius: 50px;
    border: 2px solid rgb(18, 45, 82);
    font-weight: bold;
    padding: 10px 60px;
}

.books {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 40px 20px;
    z-index: 100;
}

.book-card {
    width: 250px;
    flex-shrink: 0;
    background-color: rgb(30, 50, 78);
    color: rgb(241, 240, 231);
    border: 0px;
    padding: 20px;
    text-align: center;
    border-radius: 20px;


}

.book-card:hover {
    box-shadow: 0 10px 20px rgba(49, 63, 32, 0.792);
    border-color: rgba(49, 63, 32, 0.815);
    transform: translateY(-10px);
}

.book-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;

}

h3 {
    font-size: 25px;
    color: whitesmoke;

}

.price {
    display: block;
    margin: 10px 0;
    font-size: 20px;
    font-weight: bold;
}

.cart-text {
    display: none;
    font-size: 14px;
    font-weight: bold;
    color: whitesmoke;
}

.cart-btn {
    border: none;
    border-radius: 8px;
    color: rgb(18, 45, 82);
    padding: 10px 15px;
}

.book-card h4 {
    font-size: 20px;
    color: rgb(241, 240, 231);
}

footer {
    background-color: white;
    color: rgb(18, 45, 82);
    padding: 40px 60px;
}

.footer-contanier {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-section {
    width: 40%;
}

.footer-section h2,
.footer-section h3 {
    margin-bottom: 15px;
    color: rgb(18, 45, 82);
}

.footer-section p {
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgb(18, 45, 82);
    text-decoration: none;
}

.footer-section a:hover {
    color: rgb(45, 90, 140);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.social-icons a {
    color: rgb(18, 45, 82);
    font-size: 24px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: rgb(45, 90, 140);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgb(220, 220, 220);
    font-size: 14px;
    color: rgb(18, 45, 82);
}

@media(max-width:780px) {
    * {
        box-sizing: border-box;
    }

    nav {
        flex-direction: column;
        height: auto;

    }

    .logo {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .logo img {
        width: 150px;
        height: auto;

    }

    .navlinks {
        margin: 20px 0;
    }

    .navlinks ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 18px;
    }

    .icons {
        margin: 15px 0;
        gap: 20px;
        font-size: 22px;
    }


    main {
        padding-top: 220px;
    }

    .categories {
        display: grid;
        gap: 15px;
        grid-template-columns: repeat(4, 1fr);
        padding: 20px 10px;
    }

    .icon-wrapper {
        width: 45px;
        height: 45px;
    }

    .category-text {
        font-size: 13px;
    }


    .section-title {
        margin-top: 220px;
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 24px;
        padding: 8px 35px;
    }

    .books {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        justify-content: center;
        padding: 10px;
    }

    .book-card {
        width: 100%;
        padding: 12px;
    }

    .book-card img {
        height: 200px;
        width: 100%;
    }

    .book-card h4 {
        font-size: 17px;
    }

    .price {
        font-size: 16px;
    }

    .footer-contanier {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-section {
        width: 100%;
    }

    .social-icons {
        justify-content: center;
    }

    .copyright {
        margin-top: 20px;
        font-size: 13px;
    }

    footer {
        padding: 30px 20px;
    }

}

@media screen and (min-width:768px) and (max-width:1024px) and (orientation:portrait) {

    nav {
        flex-direction: column;
        height: auto;

    }

    .logo {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .logo img {
        width: 150px;
        height: auto;

    }

    .navlinks {
        margin: 20px 0;
    }

    .navlinks ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 18px;
    }

    .icons {
        margin: 15px 0;
        gap: 20px;
        font-size: 22px;
    }


    main {
        padding-top: 220px;
    }

    .section-title {
        margin-top: 220px;
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 24px;
        padding: 8px 35px;
    }



    .books {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        gap: 25px;
    }

    .book-card {
        width: 180px;
    }

    .book-card img {
        height: 230px;
    }

    .footer-contanier {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-section {
        width: 100%;
    }

    .social-icons {
        justify-content: center;
    }

    .copyright {
        margin-top: 20px;
        font-size: 13px;
    }

    footer {
        padding: 30px 20px;
    }


}