/* =========================
   GLOBAL STYLING
========================= */

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

body{
    font-family:Arial, sans-serif;
    background-color:#381212;
    color:#6276ad;
    line-height:1.6;
}

/* =========================
 HEADER SECTION
========================= */

header{
    background:
    linear-gradient(rgba(0,0,0,0.6),
    rgba(0,0,0,0.6)),
    url("images/novel1.png");

    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;

    height:100vh;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    color:white;
    text-align:center;
    padding:20px;
}

/* =========================
   NAVIGATION
========================= */

nav{
    position:absolute;
    top:30px;
    width:100%;
}

nav ul{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:60px;
    list-style:none;
}

nav ul li a{
    text-decoration:none;
    color:rgb(228, 213, 213);
    font-size:22px;
    font-weight:500;
    position:relative;
    transition:0.3s ease;
}

/* Hover Effect */

nav ul li a:hover{
    color:#ffb703;
}

/* Underline Animation */

nav ul li a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-8px;

    width:0%;
    height:2px;

    background-color:#ffb703;
    transition:0.3s ease;
}

nav ul li a:hover::after{
    width:100%;
}

/* Active Link */

nav ul li a.active::after{
    width:100%;
}

/* =========================
   HERO CONTAINER (The Wrapper)
========================= */
.hero {
    display: flex;
    justify-content: center;  /* Centers content horizontally */
    align-items: center;      /* Centers content vertically */
    min-height: 80vh;         /* Gives the section substantial height to notice the centering */
    width: 100%;
    text-align: center;
}

/* =========================
   HERO CONTENT 
========================= */
.hero-text {
    display: flex;
    flex-direction: column;  
    align-items: center;      
    justify-content: center;
    max-width: 800px;         
    margin: 0 auto;
}

.hero-text h1, 
.hero-text h2 {
    font-size: 70px;
    margin-bottom: 20px;
    padding: 0 20px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-text p {
    font-size: 22px;
    margin-bottom: 30px;
    max-width: 700px;
    padding: 0 20px;
    color: #e4d5d5;
}

/* =========================
   SEARCH BAR ACTION BLOCK
========================= */

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
}

.hero-text input {
    width: 300px;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 5px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.hero-text input:focus {
    border-color: #ffb703;
}

.hero-text button {
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    background-color: #ffb703;
    color: #000000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s ease;
}

.hero-text button:hover {
    background-color: white;
    color: #000000;
}

/* =========================
   FEATURED BOOKS
========================= */

.featured-books{
    padding:80px 40px;
    text-align:center;
}

.featured-books h2{
    font-size:45px;
    margin-bottom:50px;
}

.book-container{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(250px,1fr));

    gap:30px;
}

.book-card{
    background-color:white;
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 4px 10px rgba(0,0,0,0.1);

    transition:0.3s ease;
}

.book-card:hover{
    transform:translateY(-10px);
}

.book-card img{
    width:100%;
    height:300px;
    object-fit:cover;
}

.book-card h3{
    margin:15px 0;
    font-size:25px;
}

.book-card p{
    padding:0 20px;
    margin-bottom:20px;
}

.book-card button{
    margin-bottom:20px;
    padding:10px 20px;
    border:none;
    background-color:#1e1e2f;
    color:white;
    border-radius:5px;
    cursor:pointer;
}

.book-card button:hover{
    background-color:#ffb703;
    color:black;
}

/* =========================
   GENRES SECTION
========================= */

#genres{
    background-color:#471f1f;
    padding:80px 40px;
    text-align:center;
}

#genres h2{
    font-size:45px;
    margin-bottom:50px;
}

.genre-container{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:20px;
}

.genre-card{
    background-color:#1e1e2f;
    color:white;

    width:220px;
    padding:30px;

    border-radius:10px;

    transition:0.3s ease;
    cursor:pointer;
}

.genre-card:hover{
    background-color:#ffb703;
    color:black;
    transform:scale(1.05);
}

/* =========================
   BOOKS PAGE
========================= */

#books{
    padding:80px 40px;
}

#books h2{
    text-align:center;
    font-size:45px;
    margin-bottom:50px;
}

.book-list{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(250px,1fr));

    gap:30px;
}

.book-item{
    background-color:white;
    padding:25px;
    border-radius:10px;

    box-shadow:0 4px 10px rgba(0,0,0,0.1);
}

.book-item h3{
    margin-bottom:15px;
}

.book-item p{
    margin-bottom:15px;
}

.book-item span{
    display:block;
    margin-bottom:20px;
    font-weight:bold;
}

.book-item button{
    padding:10px 15px;
    border:none;
    border-radius:5px;

    background-color:#1e1e2f;
    color:white;
    cursor:pointer;
}

.book-item button:hover{
    background-color:#ffb703;
    color:black;
}

/* =========================
   CONTACT FORM
========================= */

#contact{
    padding:80px 40px;
}

#contact h2{
    text-align:center;
    font-size:45px;
    margin-bottom:40px;
}

.contact-form{
    max-width:700px;
    margin:auto;

    background-color:white;

    padding:40px;
    border-radius:10px;

    box-shadow:0 4px 10px rgba(0,0,0,0.1);
}

.form-group{
    margin-bottom:25px;
}

.form-group label{
    display:block;
    margin-bottom:10px;
}

.form-group input,
.form-group textarea{
    width:100%;
    padding:15px;
    border:1px solid #ccc;
    border-radius:5px;
    outline:none;
}

.contact-form button{
    padding:15px 20px;
    border:none;

    background-color:#36151a;
    color:rgb(180, 166, 166);

    border-radius:5px;
    cursor:pointer;
}

.contact-form button:hover{
    background-color:#ffb703;
    color:black;
}

/* =========================
   FOOTER
========================= */

footer{
    background-color:#1e1e2f;
    color:white;

    padding:60px 40px;
}

.footer-content{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(200px,1fr));

    gap:30px;
}

.footer-section h3{
    margin-bottom:15px;
}

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

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

.footer-section ul li a{
    text-decoration:none;
    color:white;
}

.footer-section ul li a:hover{
    color:#ffb703;
}

.footer-bottom{
    text-align:center;
    margin-top:40px;
    border-top:1px solid #444;
    padding-top:20px;
}

/* =========================
   DARK MODE
========================= */

.dark-mode{
    background-color:#121212;
    color:white;
}

.dark-mode .book-card,
.dark-mode .book-item,
.dark-mode .contact-form{
    background-color:#1f1f1f;
    color:white;
}

/* =========================
   LARGE SCREENS
========================= */

@media (max-width:1200px){

    nav ul{
        gap:40px;
    }

    .hero-text h1{
        font-size:60px;
    }

    .hero-text p{
        font-size:20px;
    }
}

/* =========================
   LAPTOPS
========================= */

@media (max-width:992px){

    header{
        padding:20px;
    }

    nav ul{
        gap:30px;
    }

    nav ul li a{
        font-size:20px;
    }

    .hero-text h1{
        font-size:50px;
    }

    .hero-text p{
        font-size:18px;
    }

    .book-container,
    .book-list{
        grid-template-columns:
        repeat(2,1fr);
    }
}

/* =========================
   TABLETS
========================= */

@media (max-width:768px){

    header{
        height:auto;
        padding:40px 20px;
    }

    nav{
        position:relative;
        top:0;
        margin-bottom:40px;
    }

    nav ul{
        flex-direction:column;
        gap:20px;
    }

    nav ul li a{
        font-size:18px;
    }

    .hero-text h1{
        font-size:40px;
    }

    .hero-text p{
        font-size:16px;
    }

    .hero-text input{
        width:100%;
        margin-bottom:15px;
    }

    .hero-text button{
        width:100%;
    }

    .book-container,
    .book-list{
        grid-template-columns:1fr;
    }

    .genre-container{
        flex-direction:column;
        align-items:center;
    }

    .genre-card{
        width:90%;
    }

    .contact-form{
        padding:25px;
    }

    .footer-content{
        grid-template-columns:1fr;
        text-align:center;
    }
}

/* =========================
   SMALL PHONES
========================= */

@media (max-width:576px){

    .hero-text h1{
        font-size:32px;
    }

    .hero-text p{
        font-size:15px;
    }

    nav ul li a{
        font-size:16px;
    }

    .featured-books h2,
    #genres h2,
    #books h2,
    #contact h2{
        font-size:32px;
    }

    .book-card,
    .book-item{
        width:100%;
    }

    .hero-text input{
        padding:12px;
    }

    .hero-text button{
        padding:12px;
    }

    .contact-form{
        padding:20px;
    }
}

/* =========================
   EXTRA SMALL DEVICES
========================= */

@media (max-width:400px){

    .hero-text h1{
        font-size:26px;
    }

    .hero-text p{
        font-size:14px;
    }

    nav ul{
        gap:15px;
    }

    nav ul li a{
        font-size:15px;
    }

    .genre-card{
        padding:20px;
    }

    .contact-form{
        padding:15px;
    }
}