/* ---------- Background Image Overlay + Fade ---------- */
body {
    background: url('/assets/images/site_bg.png') no-repeat center top fixed;
    background-size: cover;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(1px);
    z-index: -1;
}

/* ---------- Content Grounding Panel ---------- */
.page-content {
    max-width: 1300px;
    margin: auto;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

header,
.hero,
.author-intro,
.series-section,
footer {
    position: relative;
    z-index: 1;
}

h1, h2, h3 {
    margin-top: 0;
}

/* ---------- Navigation / Banner Background ---------- */
header {
    background-image: url('/assets/images/banner_nav_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    padding: 40px 0;
    position: relative;
    border-bottom: 2px solid #3a3a3a;
}

/* subtle dark overlay */
header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 0;
}

.top-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.top-nav .nav-link {
    color: #e8e8e8;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.25s, transform 0.25s;
    padding-bottom: 4px;
}

.top-nav .nav-link:hover {
    color: #f5c86f;
    transform: translateY(-1px);
}

/* active page */
.top-nav .active {
    color: #ffd36a;
    border-bottom: 2px solid #ffd36a;
}

/* ---------- Hero Section ---------- */
.hero {
    padding: 40px 20px 20px;
    text-align: center;
}

.hero .tagline {
    font-size: 18px;
    color: #555;
    margin-top: 5px;
}

/* ---------- Author Intro Section ---------- */
.author-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1100px;
    margin: auto;
}

.author-photo img {
    width: 350px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.author-bio {
    flex: 1;
    min-width: 300px;
}

/* ---------- Links in bio ---------- */
.author-links a {
    color: #1a6be0;
    text-decoration: none;
}

.author-links a:hover {
    text-decoration: underline;
}

/* ---------- Series Section ---------- */
.series-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
    background: rgba(255,255,255,0.0);
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.series-card {
    background: rgba(255, 245, 225, 0.85);
    border: 1px solid rgba(210, 180, 140, 0.45);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ---------- Larger book covers on individual book pages ---------- */
.book-detail-page .book-cover-large {
    width: 320px;
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

/* ---------- Two-column layout for book pages ---------- */
.book-detail-two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.book-detail-card {
    background: rgba(255, 245, 225, 0.85);
    border: 1px solid rgba(210, 180, 140, 0.45);
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    flex: 1;
    min-width: 300px;
}

/* hover effect */
.series-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.22);
    border-color: rgba(255, 215, 160, 0.75);
}

.series-card img.book-cover {
    width: 180px;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto 10px;
}

.placeholder-box {
    width: 180px;
    height: 260px;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #666;
}

.promo-highlight {
    background: rgba(255, 235, 200, 0.65);
    border-left: 4px solid #d28a00;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 12px;
    font-weight: 600;
    color: #8a4b00;
}

/* ---------- Mobile Improvements (merged cleanly) ---------- */

/* Global mobile padding fix */
@media (max-width: 600px) {
    .page-content {
        padding: 16px 20px;
    }
}

/* Smaller header height */
@media (max-width: 600px) {
    header {
        padding: 18px 0;
    }
}

/* Smaller author photo */
@media (max-width: 600px) {
    .author-photo img {
        width: 200px;
    }
}

/* Book covers — slightly smaller on phones */
@media (max-width: 600px) {
    .series-card img.book-cover {
        width: 150px;
    }
}

/* Book detail layout forced to single column */
@media (max-width: 600px) {
    .book-detail-two-col {
        flex-direction: column;
    }
}

/* ----- Mobile horizontal scroll for navigation ----- */
@media (max-width: 700px) {
    .top-nav {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        gap: 16px;
        padding: 0 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .top-nav::-webkit-scrollbar {
        display: none;
    }

    .top-nav .nav-link {
        flex: 0 0 auto;
        font-size: 15px;
        padding: 6px 0;
    }
}
/* ---------- Book Detail Page Mobile Tweaks ---------- */
@media (max-width: 600px) {

    /* Reduce padding around the main content */
    .book-detail-page .page-content {
        padding: 16px 18px;
    }

    /* Make the large cover a bit smaller for phones */
    .book-detail-page .book-cover-large {
        width: 240px;
        margin-bottom: 16px;
    }

    /* Cards too wide — reduce padding */
    .book-detail-card {
        padding: 18px;
    }

    /* Titles and text balance better at smaller sizes */
    .book-detail-card h2,
    .book-detail-card h3 {
        font-size: 20px;
    }

    /* Improve spacing in the two-column layout when stacked */
    .book-detail-two-col {
        flex-direction: column;
        gap: 24px;
    }

    /* Keep description text readable without being large */
    .book-detail-card p {
        font-size: 15px;
        line-height: 1.4;
    }
}
