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

body {
    background: url('../images/City_Street_BG.webp') center/cover no-repeat fixed;
    background-color: #0f151d;
}

.navbar {
    background-color: #5c0501;
    padding: 0.25rem;
    border-bottom: 1px solid #5c0501;
    position: relative;
    z-index: 1000;
}

.navbar-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.navbar-brand {
    margin-right: 0.5rem;
    line-height: 1;
}

.navbar-brand img {
    width: 64px;
    height: 64px;
    display: block;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2.25rem;
    cursor: pointer;
    position: absolute;
    right: 0.25rem;
    color: #f9a45c;
    line-height: 1;
}

.navbar-menu {
    display: flex;
    list-style: none;
    align-items: center;
    transition: opacity 0.3s ease;
}

.navbar-item {
    margin: 0 1rem;
}

.navbar-link {
    text-decoration: none;
    color: #f9a45c;
    font-size: 1.2rem;
    font-family: Georgia, serif;
    line-height: 1;
}

.navbar-link:hover {
    color: #f9a45c;
}

/* Base Fluid Container */
.fluid-container {
    width: 100%;
}

/* Welcome Section */
.fluid-container:first-of-type {
    padding-top: 2rem;
}

/* Books Header Section */
.books-header {
    background: linear-gradient(to top, #000000 0%, transparent 25%);
    padding: 6rem 0;
}

/* Book Page Header Section */
.book-header {
    background: linear-gradient(to top, #000000 0%, transparent 25%);
    padding: 6rem 0;
}

/* About Author (Index Page) */
.about-author.fluid-container {
    background: linear-gradient(to top, #000000 0%, transparent 25%);
    padding-bottom: 10rem;
}

/* Detailed About Section (About Page) */
.about-detailed {
    background: linear-gradient(to top, #000000 0%, transparent 25%);
    padding: 2rem 0;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(to top, #000000 0%, transparent 25%);
    padding: 2rem 0;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
}

.contact-form label {
    display: block;
    font-family: Georgia, serif;
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-family: Georgia, serif;
    font-size: 1rem;
    border: 1px solid #a4c6e2;
    border-radius: 4px;
    background-color: #252945;
    color: #ffffff;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    display: block;
    margin: 0 auto;
}

.about-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    flex-direction: row;
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text h1 {
    font-family: Georgia, serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #5c0501;
}

.about-text p {
    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

.about-image {
    width: 300px;
    height: auto;
    border-radius: 8px;
}

/* Book Sections */
.book-fluid-container {
    background-color: #000000;
}

/* Twitter Section */
.twitter-section {
    background: linear-gradient(to bottom, #000000 0%, transparent 25%);
    padding: 2rem 0;
    min-height: 600px;
}

.twitter-section h2 {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.twitter-timeline {
    opacity: 1 !important;
}

/* Container */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem;
    color: #ffffff;
    text-align: center;
}

.container h1 {
    font-family: Georgia, serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #f9a45c;
}

.container p {
    font-family: Georgia, serif;
    font-size: 1.2rem;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

/* About Author Specific (Index Page) */
.about-author .container {
    text-align: left;
    max-width: 570px;
}

.about-author .container p {
    line-height: 1.8;
}

.follow-link {
    font-size: 1rem;
    margin-top: 1rem;
}

.follow-link a {
    color: #a4c6e2;
    text-decoration: none;
}

.follow-link a:hover {
    color: #f9a45c;
}

/* Book Section (Image on Left) */
.book-section .container {
    text-align: left;
}

.book-section .book-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    flex-direction: row;
}

.book-section .book-image {
    width: 450px; /* 150% of 300px for individual book pages */
}

/* Book Section Reverse (Image on Right) */
.book-section-reverse .container {
    text-align: left;
}

.book-section-reverse .book-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    flex-direction: row-reverse;
}

/* Shared Book Styles */
.book-image {
    width: 300px; /* Default for index.html and books.html */
    height: auto;
    transition: transform 0.3s ease;
}

.book-image:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.book-info {
    flex: 1;
}

.book-info h2 {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #f9a45c;
}

.book-info p {
    font-family: Georgia, serif;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #f9a45c;
    color: #ffffff;
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 1rem;
    border-radius: 4px;
    margin-right: 1rem;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #a4c6e2;
    color: #ffffff;
}

/* Footer */
.footer {
    background-color: #5c0501;
    padding: 1rem 0;
    color: #5c0501;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links a {
    color: #f9a45c;
    text-decoration: none;
    font-family: Georgia, serif;
}

.social-links a:hover {
    color: #599ae1;
}

/* Mobile View */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-container {
        justify-content: flex-start;
    }

    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #5c0501;
        border-top: 1px solid #5c0501;
        opacity: 0;
    }

    .navbar-menu.active {
        display: flex;
        opacity: 1;
        z-index: 1000;
    }

    .navbar-item {
        margin: 0.5rem 0;
        text-align: center;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .container {
        padding: 0.5rem;
    }

    .about-author .container {
        max-width: 100%;
    }

    .about-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .about-text {
        text-align: center;
    }

    .about-image {
        width: 200px;
    }

    .book-section .book-content,
    .book-section-reverse .book-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .book-image {
        width: 200px; /* Default mobile width for index.html and books.html */
    }

    .book-section .book-image {
        width: 300px; /* 150% of 200px for individual book pages on mobile */
    }

    .button {
        display: block;
        margin: 0.5rem 0;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .contact-form button {
        margin: 0.5rem auto;
    }
}

/* Fade-In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

nav, .fluid-container, .footer {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

/* Staggered Delays */
nav { animation-delay: 0.2s; }
section.fluid-container:nth-of-type(1) { animation-delay: 0.4s; } /* Welcome or Book Header */
section.fluid-container:nth-of-type(2) { animation-delay: 0.6s; } /* About (Index) or Book Content */
section.fluid-container:nth-of-type(3) { animation-delay: 0.8s; } /* Fairyland */
section.fluid-container:nth-of-type(4) { animation-delay: 1s; } /* Tomb */
section.fluid-container:nth-of-type(5) { animation-delay: 1.2s; } /* Twitter */
.footer { animation-delay: 1.4s; }