/* ------------------------------------------------------------------------------------- GENERAL CLASSES */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

:root {
    --first-color: #000;
    --second-color: rgba(106, 105, 105, 0.6);
    --third-color: #fefefe;
    --fourth-color: #4f88ba;
    --card-background: #b49d65;
}

::-webkit-scrollbar {
    width: 10px; 
}

::-webkit-scrollbar-track {
    background-color: var(--third-color); 
}

::-webkit-scrollbar-thumb {
    background-color: var(--fourth-color);
    border-radius: 10px;
}

/* ------------------------------------------------------------------------------------- MAIN PART */
/* -------------------------------------------- INDEX */
/* ------------------------- header */

.header {
    width: 100%;
    height: 7vh;
    background: var(--third-color);
    top: 0;
    right: 0;
    z-index: 100;
    position: fixed;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    align-items: center;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    
    section {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        justify-content: space-between;
        padding: 0 30px;
    }
    
    /* ------------------------- logo */

    h3 {
        color: var(--fourth-color);
        font-weight: 600;
        font-size: 1.5rem;
    }
}

/* ------------------------- search-bar */

.search-bar input {
    width: 400px;
    background: var(--third-color);
    color: var(--first-color);
    height: 40px;
    padding: 0 0 0 30px;
    font-size: 15px;
    border: 1px solid var(--first-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.search-bar input::placeholder {
    color: var(--first-color);
    font-style: italic;
    font-size: 15px;
}

.search-bar input:focus,
.search-bar input:active,
.search-bar input:hover {
    outline: none;
}

.search-bar:focus,
.search-bar:active,
.search-bar:hover {
    box-shadow: 0 0 30px var(--second-color);
    border-radius: 10px;
}

.search-bar{
    position: relative;
}

.search-bar a{
    color: var(--first-color);
    position: absolute;
    left: 10px;
    top: 10px;
}

/* ------------------------- nav */

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    a{
        display: flex;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        color: var(--first-color);
        transition: all 0.3s ease-in-out;
        font-size: 1rem;

        button{
            font-size: 1rem;
            cursor: pointer;
            border: none;
            background: none;
            display: flex;
            justify-content: center;
            align-items: center;
            text-decoration: none;
            color: var(--first-color);
            transition: all 0.3s ease-in-out;
        }

        button:hover{
            color: var(--fourth-color);
        }
    }
    
    a:hover{
        color: var(--fourth-color);
    }
}

/* Hide the checkbox */
#menu-toggle {
    display: none;
}

/* Style the button */
.menu-button {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}

/* Style the dropdown menu */
.dropdown-menu {
    display: none;
    position: absolute;
    background: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Show menu when checkbox is checked */
#menu-toggle:checked + .menu-button + .dropdown-menu {
    display: block;
}

/* Style menu items */
.dropdown-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    background: #ddd;
}

/* ------------------------- home-page */

.home-page {
    background: url("../img/home.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    
    div{
        color: var(--third-color);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        text-align: center;
        
        p{
            font-weight: 400;
            font-size: 1rem;
        }
        
        h1{
            font-weight: 500;
            font-size: 4rem;
            font-family: "Prata", serif;
        }
    }
    
    a{
        margin-top: 4rem;
        
        button{
            background-color: transparent;
            color: var(--third-color);
            border: 1px solid var(--third-color);
            font-size: 18px;
            width: 200px;
            height: 60px;
            cursor: pointer;
            transition: all 0.3s ease-in-out;
        }
        
        button:hover {
            background-color: var(--third-color);
            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
            color: var(--first-color);
        }
    }
}

/* ------------------------- slider-books */

.slider-books {
    text-align: center;
    margin: 5rem auto 0rem;
    padding: 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    width: 100%;
    
    h2 {
        font-size: 2rem;
    }

    .slider{
        display: flex;
        justify-content: space-between;
        align-items: center;

        .slider-btn{
            font-size: 5rem;
            text-decoration: none;
            color: var(--fourth-color);
            cursor: pointer;
        }

        .cards {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            padding: 5rem 0;
            
            .card {
                display: flex;
                justify-content: space-between;
                flex-direction: column;
                padding: 1rem;
                border-radius: 40px;
                overflow: hidden;
                position: relative;
                transition: all 0.3s ease-in-out;
                min-width: 400px;
                
                .card-body{
                    height: 250px;
                }
    
                img {
                    height: 450px;
                    object-fit: cover;
                    border-radius: 5px;
                    margin: auto;
                    transition: all 0.3s ease-in-out;
                }
                
                p {
                    font-style: italic;
                }
    
                .availability {
                    display: inline-block;
                    padding: 3px 8px;
                    border-radius: 4px;
                    font-size: 0.8em;
                    font-weight: bold;
                    margin-bottom: 5px;
                }
                
                .available {
                   background-color: #4CAF50;
                   color: white;
                }
                
                .unavailable {
                   background-color: #f44336;
                   color: white;
                }
                
                .due-date {
                   font-size: 0.8em;
                   color: #666;
                   margin-top: 3px;
                }
                
                .card-actions{
                    margin-top: 25px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    gap: 5px;
    
                    a{
                        .borrow-btn{
                            border: none;
                            background-color: var(--fourth-color);
                            font-weight: 600;
                            padding: 10px 20px;
                            border-radius: 10px;
                            cursor: pointer;
                            transition: all 0.3s ease-in-out;
                            color: var(--third-color);
                            i {margin-right: 0.5rem;}
                        }
                        .borrow-btn:hover{
                            background-color: var(--first-color);
                            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
                            color: white;
                        }
                        
                        .Book-Review-btn {
                            border: none;
                            background-color: var(--fourth-color);
                            font-weight: 600;
                            padding: 10px 20px;
                            border-radius: 10px;
                            cursor: pointer;
                            transition: all 0.3s ease-in-out;
                            color: var(--third-color);
                            i {margin-right: 0.5rem;}
                        }
                        
                        .Book-Review-btn:hover {
                            background-color: var(--first-color);
                            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
                            color: white;
                        }
                    }
                }
            }
            
            .card img:hover {
                transform: scale(1.015);
                box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
            }
        }
    }
}

.slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.center-slide {
    transform: scale(1.15);
    z-index: 2;
}

.side-slide {
    transform: scale(0.9);
    opacity: 0.8;
    z-index: 1;
}

.slider-btn.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

/* ------------------------- feed-back */

.feed-back{
    background-color: var(--third-color);
    width: 100%;
    padding: 5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 50px;
    
    h2 {
        font-size: 2rem;
    }
    
    .feed-slides{
        display: flex;
        gap: 1rem;
        position: relative;
        overflow: hidden;
        justify-content: center;
        align-items: center;
        
        div{
            display: none;
        }
        
        .slide{
            gap: 15px;
            align-items: center;
            justify-content: center;
            width: 800px;
            
            p{
                height: 100px;
            }
            
            .customerFeedback {
                align-content: center;
            }
            
            img{
                border-radius: 20rem;
                width: 275px;
                height: 275px;
                transition: all 0.3s ease-in-out;
            }
            
            img:hover{
                box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
            }
        }
    }
    
    div.display-slide{
        display: block;
    }
}

/* ------------------------- footer */

.footer{
    background-color: rgb(27, 26, 26);
    width: 100%;
    height: 30vh;
    color: var(--third-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    
    h2{
        font-weight: 500;
    }
    
    a{
        text-decoration: none;
        color: var(--third-color);
        font-size: 1rem;
        transition: all 0.3s ease-in-out;
        
        i{
            font-size: 2rem;
            transition: all 0.3s ease-in-out;
        }
    }
    
    a:hover, i:hover{
        color: var(--fourth-color);
        transform: scale(1.05);
    }
    
    .accounts{
        padding-bottom: 20px;
    }
    
    .foot1{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 25px;
        padding-bottom: 30px;
    }
}

/* -------------------------------------------- Log-In */

.logInPage {
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    align-content: center;
    
    .logInForm {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
        padding: 2.5rem;
        border-radius: 15px;
        max-width: 35%;
        background-color: #f1f1f1;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
        
        h1 {
            font-size: 2.5rem;
        }
        
        h1, label {
            color: var(--first-color);
        }
        
        form {
            width: 100%;
            .inputData {
                display: flex;
                flex-direction: column;
                gap: 1rem;
                margin: 3rem auto;
                .userName, .password{
                    display: flex;
                    flex-direction: column;
                    input {
                        border: 1px solid var(--first-color);
                        height: 40px;
                        padding: 0 10px;
                        font-size: 15px;
                        border-radius: 10px;
                        transition: all 0.35s ease;
                    }
                    
                    input::placeholder {
                        font-style: italic;
                        font-size: 15px;
                    }
                }
                
                .radioChoices{
                    display: flex;
                    label{
                        min-width: fit-content;
                        cursor: pointer;
                    }
                    .choices{
                        width: 100%;
                        display: flex;
                        padding: 0 3.5rem;
                        justify-content: space-between;
                        input {
                            accent-color: var(--fourth-color);
                        }
                    }
                }
            }
            
            .formBtn {
                display: flex;
                flex-direction: column;
                justify-content: center;
                text-align: center;
                gap: 2rem;
                .logInBtn{
                    border: none;
                    background-color: var(--fourth-color);
                    color: var(--third-color);
                    font-size: 1rem;
                    font-weight: 600;
                    padding: 10px 20px;
                    border-radius: 10px;
                    cursor: pointer;
                    transition: all 0.3s ease-in-out;
                }
                
                .logInBtn:hover {
                    background-color: var(--first-color);
                    color: white;
                    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
                }
                
                p {
                    color: var(--first-color);
                    a {
                        color: var(--fourth-color);
                        margin-left: 0.5rem;
                        transition: all 0.3s ease-in-out;
                    }
                    a:hover {
                        color: var(--first-color);
                    }
                }
            }
        }
    }
}

/* -------------------------------------------- Sign-Up */

.signUpPage {
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    align-content: center;
    
    .signUpForm {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 5rem auto;
        padding: 2rem;
        border-radius: 15px;
        max-width: 35%;
        background-color: #f1f1f1;
        box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
        
        h1 {
            font-size: 2.5rem;
        }
        
        form {
            width: 100%;
            .inputData {
                display: flex;
                flex-direction: column;
                gap: 1rem;
                margin: 2rem auto;
                .userName, .password, .email, .confirmPassword{
                    display: flex;
                    flex-direction: column;
                    input {
                        border: 1px solid var(--first-color);
                        height: 40px;
                        padding: 0 10px;
                        font-size: 15px;
                        border-radius: 10px;
                        transition: all 0.35s ease;
                    }
                    
                    input::placeholder {
                        font-style: italic;
                        font-size: 15px;
                    }
                }
                
                .radioChoices{
                    display: flex;
                    label{
                        min-width: fit-content;
                        cursor: pointer;
                    }
                    .choices{
                        width: 100%;
                        display: flex;
                        padding: 0 3.5rem;
                        justify-content: space-between;
                        input {
                            accent-color: var(--fourth-color);
                        }
                    }
                }
            }
            
            .formBtn {
                display: flex;
                flex-direction: column;
                justify-content: center;
                text-align: center;
                gap: 1.5rem;
                .signUpBtn{
                    border: none;
                    background-color: var(--fourth-color);
                    color: var(--third-color);
                    font-size: 1rem;
                    font-weight: 600;
                    padding: 10px 20px;
                    border-radius: 10px;
                    cursor: pointer;
                    transition: all 0.3s ease-in-out;
                }
                
                .signUpBtn:hover {
                    background-color: var(--first-color);
                    color: white;
                    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
                }
                
                p {
                    color: var(--first-color);
                    a {
                        color: var(--fourth-color);
                        margin-left: 0.5rem;
                        transition: all 0.3s ease-in-out;
                    }
                    a:hover {
                        color: var(--first-color);
                    }
                }
            }
        }
    }
}

/* -------------------------------------------- About-Us*/

.about-us{
    padding: 100px 15px;
    background: var(--third-color);
    color: var(--first-color);
    text-align: center;
    
    h2{
        font-size: 3.5rem;
        margin-bottom: 5rem;
    }
}

.items{
    max-width: 800px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    
    .item{
        margin-bottom: 40px;
        width: 100%;
        position: relative;
        
        .dot{
            height: 21px;
            width: 21px;
            background-color: var(--fourth-color);
            box-shadow: 0 0 25px  var(--fourth-color),
                        0 0 50px  var(--fourth-color);
            position: absolute;
            left: calc(50% - 8px);
            border-radius: 50%;
            top: 10px;
        }
        
        h3{
            font-size: 25px;
            color: var(--first-color);
            margin-bottom: 15px;
            font-weight: 800;
            margin: 6px 0 15px;
        }
        
        .content{
            background-color: var(--third-color);
            border: 3px solid var(--fourth-color);
            padding: 30px;
            border-radius: 2rem ;
            box-shadow: 0 0 10px var(--fourth-color);
            transition: all 0.3s ease-in-out;
            
            p{
                color: var(--first-color);
                margin-bottom: 20px;
                font-size: 16px;
                font-weight: 300;
                line-height: 22px;
            }
        }
        
        .content:hover{
            transform: scale(1.015);
            box-shadow: 0 0 25px var(--fourth-color);
        }
        
        .accounts-individual{
            display: flex;
            justify-content: center;
            gap: 30px;
            
            a {
                display: flex; 
                justify-content: center;
                align-items: center;
                transition: all 0.3s ease-in-out;
                color: var(--first-color);
                font-size: 40px;
                width: 60px; 
                height: 60px;
                border-radius: 50%;
                background: transparent; 
                border: none;
                text-decoration: none; 
            }
            
            a:hover {
                transform: scale(1.025);
                color: var(--fourth-color);
                box-shadow: var(--fourth-color) 0px 5px 15px;
            }
        }
    }
    
    .item:last-child{
        margin-bottom: 0;
    }
    
    .item:nth-child(odd){
        padding-right: calc(50% + 30px);
    }
    
    .item:nth-child(even){
        padding-left: calc(50% + 30px);
    }
}

.items::before{
    content: "";
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--fourth-color);
    left: calc(50% - 1px);
}

/* ------------------------------------------------------------------------------------- RESPONSIVE PART */
/* -------------------------------------------- INDEX */

@media screen and (max-width: 1024px) {

    /* ------------------------- logo */

    .header h3 {
        font-size: 1rem;
    }

    /* ------------------------- search-bar */

    .search-bar input {
        width: 300px;
        height: 35px;
        font-size: 13px;
    }

    .search-bar input::placeholder {
        font-size: 13px;
    }

    .search-bar a{
        top: 5px;
        font-size: 0.8rem;
    }

    /* ------------------------- nav-buttons */

    .nav-buttons button {
        height: 35px;
        font-size: 13px;
    }

    /* ------------------------- sentences */

    .sentence-container {
        .sentences {
            .sentence {
                width: 210px;
                height: 40px;
                font-size: 1.03rem;
            }
        
            .sentence:nth-child(1) {
                transform: translateX(-180px);
            }
        
            .sentence:nth-child(2) {
                transform: translateX(-105px);
            }
        
            .sentence:nth-child(3) {
                transform: translateX(-30px);
            }
        
            .sentence:nth-child(4) {
                transform: translateX(35px);
            }
        
            .sentence:nth-child(5) {
                transform: translateX(110px);
            }
        
            .sentence:nth-child(6) {
                transform: translateX(185px);
            }
        
            .sentence:nth-child(7) {
                transform: translateX(260px);
            }
        }    
    }

    /* ------------------------- buttons */

    .buttons button {
        width: 160px;
        height: 60px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 768px) {

    /* ------------------------- header */

    .header section {
        padding: 0 15px;
        
        /* ------------------------- logo */

        h3 {
            font-size: 0.8rem;
        }
    }

    /* ------------------------- search-bar */


    .search-bar input {
        width: 170px;
        height: 30px;
        font-size: 11px;
        padding: 0 0 0 25px;
    }

    .search-bar input::placeholder {
        font-size: 11px;
    }

    .search-bar a{
        top: 7px;
        font-size: 0.8rem;
    }

    /* ------------------------- nav-buttons */

    .nav-buttons {
        gap: 0px;
        
        button {
            display: none;
        }
    }

    /* ------------------------- sentences */

    .sentence-container {
        .sentences {
            width: 85%;
            margin-top: 8rem;
    
            .sentence {
                width: 185px;
                height: 30px;
                font-size: 0.9rem;
            }
        
            .sentence:nth-child(1) {
                transform: translateX(-65px);
            }
        
            .sentence:nth-child(2) {
                transform: translateX(-35px);
            }
        
            .sentence:nth-child(3) {
                transform: translateX(-5px);
            }
        
            .sentence:nth-child(4) {
                transform: translateX(25px);
            }
        
            .sentence:nth-child(5) {
                transform: translateX(55px);
            }
        
            .sentence:nth-child(6) {
                transform: translateX(85px);
            }
        
            .sentence:nth-child(7) {
                transform: translateX(115px);
            }
        }    
    }

    /* ------------------------- buttons */

    .buttons button {
        width: 120px;
        height: 50px;
        font-size: 1rem;
    }
}

@media screen and (max-width: 425px) {

    /* ------------------------- sentences */

    .sentence-container {
        .sentences {
            width: 85%;
            margin-top: 8rem;
        
            .sentence {
                width: 142px;
                height: 20px;
                font-size: 0.7rem;
            }
        
            .sentence:nth-child(1) {
                transform: translateX(-55px);
            }
        
            .sentence:nth-child(2) {
                transform: translateX(-35px);
            }
        
            .sentence:nth-child(3) {
                transform: translateX(-15px);
            }
        
            .sentence:nth-child(4) {
                transform: translateX(5px);
            }
        
            .sentence:nth-child(5) {
                transform: translateX(25px);
            }
        
            .sentence:nth-child(6) {
                transform: translateX(45px);
            }
        
            .sentence:nth-child(7) {
                transform: translateX(65px);
            }
        }
    }
}

/* -------------------------------------------- Log-In */

@media screen and (max-width: 768px) {
    .logInPage {
        .logInForm {
            max-width: 80%;
            
            h1 {
                font-size: 2rem;
            }
            
            form {
                font-size: 0.8rem;
                .inputData {
                    margin: 2rem auto;
                    
                    .userName, .password {
                        input {
                            height: 30px;
                        }
                        
                        input::placeholder {
                            font-size: 0.75rem;
                        }
                    }
                    .radioChoices {
                        .choices {
                            padding: 0 1.5rem;
                        }
                    }
                }
                
                .formBtn{
                    gap: 1rem;
                                       
                    .logInBtn {
                        font-size: 0.85rem;
                        padding: 7.5px 10px;
                    }
                }
            }
        }
    }
}

@media screen and (max-width: 425px) {
    .logInPage {
        .logInForm {
            max-width: 90%;
            padding: 2rem 1.25rem;
            
            form {
                .inputData .radioChoices {
                    flex-direction: column;
                    gap: 0.5rem;
                    .choices {
                        padding: 0;
                    }
                }
            }
        }
    }
}

/* -------------------------------------------- Sign-Up */

@media screen and (max-width: 768px) {
    .signUpPage {
        .signUpForm {
            max-width: 80%;
            
            h1 {
                font-size: 2rem;
            }
            
            form {
                font-size: 0.8rem;
                .inputData {
                    margin: 2rem auto;
                    
                    .userName, .password, .email, .confirmPassword {
                        input {
                            height: 30px;
                        }
                        
                        input::placeholder {
                            font-size: 0.75rem;
                        }
                    }
                    .radioChoices {
                        .choices {
                            padding: 0 1.5rem;
                        }
                    }
                }
                
                .formBtn{
                    gap: 1rem;
                    
                    .signUpBtn {
                        font-size: 0.85rem;
                        padding: 7.5px 10px;
                    }
                }
            }
        }
    }
}

@media screen and (max-width: 425px) {
    .signUpPage {
        .signUpForm {
            max-width: 90%;
            padding: 2rem 1.25rem;
            
            form {
                .inputData .radioChoices {
                    flex-direction: column;
                    gap: 0.5rem;
                    .choices {
                        padding: 0;
                    }
                }
            }
        }
    }
}
