* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: rgb(248, 246, 242);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

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);
}

#title {
    color: rgb(18, 45, 82);
    padding: 3px 30px;
    text-align: center;
    font-size: 32px;
    border: 2px solid rgb(18, 45, 82);
    font-weight: bold;
    background: whitesmoke;
    border-radius: 50px;
    width: fit-content;
    margin: 200px auto 0;
    line-height: 1.3;
}

#books img {
    border-radius: 20px;
    width: 250px;
    height: 350px;
    margin-bottom: 15px;
    margin-top: 15px;
}

.cards {
    position: relative;
    background-color: rgb(30, 50, 78);
    border-radius: 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section1,
.section2,
.section3,
.section4 {
    padding: 15px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.section1 div,
.section2 div,
.section3 div,
.section4 div {
    width: 20%;
    margin-right: 11px;
}

.section1 h6,
.section2 h6,
.section3 h6,
.section4 h6 {
    text-align: center;
    color: rgb(241, 240, 231);
    font-size: 25px;
}

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

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

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

.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;
}

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) {
    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;
    }

    .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;
    }

    #title {
        padding-top: 5px 20px;
        text-align: center;
        font-size: 30px;
        margin: 200px auto 0;
        width: fit-content;
        text-align: center;
    }

    #books img {
        width: 100%;
        height: 250px;
    }

    .cards {
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 50px;
    }

    .section1,
    .section2,
    .section3,
    .section4 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin: 20px 0;
        padding: 0;
    }

    .section1 .cards,
    .section2 .cards,
    .section3 .cards,
    .section4 .cards {
        width: calc(50% - 20px);
        max-width: 180px;
        margin: 0;
    }

    .section1 div,
    .section2 div,
    .section3 div,
    .section4 div {
        width: 50%;
        margin-right: 150px;
        gap: 20;
    }

    .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;
    }



}