/* Reset margin and padding for all elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Cinzel, sans-serif;
}

/* Ensure both html and body take full height */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    scroll-behavior: smooth;
}

/* Apply background to body */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(to bottom, #000000, #470b9c);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow-x: none;
}

/* Ensure the star field stretches with the page */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: white;
    border-radius: 50%;
    opacity: 0.7;
    box-shadow: 0 0 3px white, 0 0 6px white, 0 0 10px white;
}

/* Hero Section */
#hero {
    color: white;
    height: 100vh; /* Full screen height for hero */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Hero Title */
#hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 4em;
    text-shadow: 0 0 10px #fff, 0 0 20px #ff4c00;
    margin-bottom: 20px;
}

/* Hero Subtitle */
#hero p {
    font-size: 1.5em;
    margin-bottom: 30px;
    font-style: italic;
}

/* Button styling */
#hero button, #about button {
    padding: 15px 30px;
    background-color: #ff4c00;
    color: white;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#hero button:hover, #about button:hover {
    background-color: #e03a00;
}

#hero button a, #about button a {
    text-decoration: none;
    color: white;
}

/* Navigation Bar */
nav {
    background-color: rgba(0, 0, 0, 0.8); /* Transparent background */
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 1000; /* Ensure navigation is on top */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Optional: shadow effect */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Logo in Navigation */
nav .logo a {
    font-size: 2em;
    text-decoration: none;
    color: white;
    font-family: 'Cinzel', serif;
}

/* Navigation Links */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0 15px;
}

nav a {
    text-decoration: none;
    color: white;
    font-size: 1.2em;
    text-transform: uppercase;
    padding: 8px 16px;
    display: inline-block;
}

nav a:hover {
    background-color: #ff4c00;
    border-radius: 5px;
}

/* Hamburger Icon */
.menu-icon {
    display: none;
    font-size: 2em;
    color: white;
    cursor: pointer;
}

/* About Section */
#about {
    padding: 100px 20px;
    color: white;
    text-align: justify;
    min-height: 100vh;
    width: 80%;
    margin-left: 60px;
    background: none;
}

#about h2, #books h2, #newsletter h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Cinzel', serif;
    text-shadow: 0 0 10px #fff, 0 0 20px #ff4c00;
}

#about p, #newsletter p {
    font-size: 1.2em;
    line-height: 1.6;
    margin: 0 auto;
    margin-bottom: 20px;
}

#books {
    padding: 50px;
    color: white;
    text-align: justify;
    min-height: 100vh;
    width: 100%;
    margin-left: 30px;
    background: none;
    display: flex;
    align-content: center;
    flex-direction: column;
}

.book-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 20px;
    margin: 0 auto;
    width: 100%;
}

/* Individual Book Item */
.book-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Book Cover Container (for circle shape) */
.book-cover-container {
    width: 250px;  /* Adjust the size of the circle */
    height: 250px;
    margin-bottom: 15px;
    overflow: hidden;  /* Hide overflow to maintain the circle shape */
    border-radius: 50%;  /* Make the image circular */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    background-color: white;
}

/* Book Cover Image */
.book-cover {
    width: 160px;
    height: 256px;
    object-fit: cover;
}

/* Book Title */
.book-item h3 {
    font-size: 1.2em;
    margin-top: 10px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

/* Hover Effects */
.book-item:hover .book-cover-container {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
}

#newsletter {
    padding: 50px 20px;
    color: white;
    text-align: justify;
    min-height: 100vh;
    width: 100%;
    background: none;
    text-align: center;
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* Hide the menu by default */
        flex-direction: column;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 60px; /* Ensure the menu is positioned below the navbar */
        left: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
        padding: 20px 0;
        text-align: center;
    }

    nav ul.active {
        display: flex; /* Show menu when active */
    }

    /* Adjust nav links on mobile */
    nav li {
        margin: 10px 0;
    }

    .menu-icon {
        display: block; /* Show the hamburger menu */
        padding-right: 0.75vw;
    }

    /* Smaller logo for mobile */
    nav .logo a {
        font-size: 1.5em;
        padding: 0px;
    }

    nav a {
        padding: 12px 1em;
        font-size: 1.1em;
    }

    #newsletter {
        padding: 1em;
    }
}

@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5em; /* Make it smaller on mobile */
    }

    #hero p {
        font-size: 1.1em;
    }

    #hero button {
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    #about {
        margin: 0px;
        padding: 30px 1.5em;
        width: 100%;
    }

    #about h2, #books h2 {
        font-size: 2em;
    }

    #about p, #books p {
        font-size: 1.1em;
    }

    .book-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 15px;
    }

    .book-item h3 {
        font-size: 1em;
    }

    #books {
        margin: 0px;
        padding: 30px 1.5em; 
    }
}

@media (max-width: 768px) {
    .book-cover-container {
        width: 150px;  /* Smaller size for mobile */
        height: 150px;
    }

    .book-cover {
        width: 60%;
        height: 100%;
        object-fit: cover;  /* Keep the image covering the container */
    }
}