/* --- Base Styles --- */
:root {
    /* --- Color Palette --- */
    --color-dark-primary: #1E1B1A; /* Espresso Black — grounding base */
    --color-accent-burgundy: #6E1E23; /* Bordeaux Red — emotional and rich */
    --color-accent-gold: #C6934B; /* Burnished Gold — warmth and light */
    --color-accent-copper: #B85C38; /* Copper Glow — romantic intensity */
    --color-accent-slate: #4A5A63; /* Smoky Slate — adds mood and balance */

    --color-neutral-light: #F5EDE3; /* Antique Cream — elegant light base */
    --color-neutral-balanced: #EFE4D6; /* Parchment — for contrast on white-heavy areas */
    --color-neutral-medium: #C9B9A7; /* Sandstone Beige — for subtle dividers and cards */

    --color-text-light: #FAF7F4; /* Off-white for dark backgrounds */
    --color-text-dark: #2C2A28; /* Espresso — for light backgrounds */
    --color-text-medium: #4E463E; /* Mid contrast for readability on pale backgrounds */

    /* --- Typography --- */
    --font-serif-elegant: 'Playfair Display', serif;
    --font-serif-secondary: 'Lora', serif;
    --font-sans-body: 'Montserrat', sans-serif;

    /* --- Spacing --- */
    --spacing-xs: 0.5rem; /* NEW: Added for finer control */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --section-padding: 60px 0;
    --section-padding-sm: 30px 0; /* NEW: Added for smaller section padding */
    --grid-gap: 30px; /* NEW: Added for consistent grid gaps */
}

body {
    font-family: var(--font-sans-body);
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-neutral-light);
    margin: 0;
    scroll-behavior: smooth;
}

/* --- Containers --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--section-padding);
}
.section-padding-sm { /* NEW: Added smaller padding class */
    padding: var(--section-padding-sm);
}

/* --- Headings --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif-elegant);
    color: var(--color-dark-primary);
    margin-bottom: var(--spacing-sm);
}
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; } /* NEW: Added h4 style */


/* --- Links --- */
a {
    color: var(--color-accent-burgundy);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--color-accent-gold);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-family: var(--font-sans-body);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent-burgundy);
    color: var(--color-text-light);
}
.btn-primary:hover {
    background-color: #54161A; /* Darker burgundy on hover */
}

.btn-secondary { /* NEW: Added for secondary actions like 'Read Excerpt' */
    background-color: var(--color-accent-slate);
    color: var(--color-text-light);
    border: 2px solid var(--color-accent-slate);
}
.btn-secondary:hover {
    background-color: #3C4A51; /* Darker slate on hover */
    border-color: #3C4A51;
}

.btn-gold {
    background: linear-gradient(to right, var(--color-accent-gold), #E0B762); /* Using var for consistency */
    color: var(--color-dark-primary);
    border: none;
}
.btn-gold:hover {
    background: linear-gradient(to right, #B88335, #D6A843);
    color: var(--color-dark-primary);
}

/* --- THIS IS THE FIX --- */
/* Changed .btn-outline to .btn-primary-outline to match index.html */
.btn-primary-outline {
    background-color: transparent;
    border: 2px solid var(--color-accent-burgundy);
    color: var(--color-accent-burgundy);
}
.btn-primary-outline:hover {
    background-color: var(--color-accent-burgundy);
    color: var(--color-text-light);
}

.btn-link { /* NEW: Styled to look like a text link but act as a button */
    background: none;
    border: none;
    padding: 0;
    color: var(--color-accent-burgundy);
    font-weight: 500;
    text-decoration: underline;
    display: inline-block; /* Ensure it respects padding/margins if needed */
}
.btn-link:hover {
    color: var(--color-accent-gold);
    text-decoration: none;
}


/* --- Header --- */
.main-header {
    background-color: var(--color-dark-primary);
    color: var(--color-text-light);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    font-family: var(--font-serif-elegant);
    font-size: 2.2rem;
    color: var(--color-text-light);
}
.logo .tagline-header {
    font-family: var(--font-sans-body);
    font-size: 0.9rem;
    opacity: 0.8;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.main-nav li {
    margin-left: var(--spacing-md);
}
.main-nav a {
    color: var(--color-text-light);
    font-family: var(--font-sans-body);
    font-weight: 400;
    position: relative;
    padding-bottom: 5px; /* Added for the underline effect */
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-gold);
    transition: width 0.3s ease;
}
.main-nav a:hover::after {
    width: 100%;
}
.nav-toggle { /* NEW: Hamburger icon styles for mobile nav */
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle .icon-bar {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.main-nav.active .nav-toggle .icon-bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.main-nav.active .nav-toggle .icon-bar:nth-child(2) {
    opacity: 0;
}
.main-nav.active .nav-toggle .icon-bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}


/* --- Hero Section (Homepage) --- */
.hero-section {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    background-image: url('images/hero-background.jpg');
    background-size: cover;
    background-position: center 95%; /* Adjusted as per previous discussion */
    overflow: hidden;
}
/* --- MODIFIED: Split background into background-image and background-color for clarity --- */
.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: linear-gradient(to bottom, rgba(var(--color-dark-primary),0.05), rgba(var(--color-dark-primary),0.3));
    background-color: transparent; /* Explicitly set to transparent by default */
    z-index: 1; /* Ensured overlay is below text but above image */
}
.hero-content {
    position: relative;
    z-index: 10;
    padding: var(--spacing-md);
}
.hero-content h1 {
    font-size: 4rem;
    color: var(--color-text-light);
}
.hero-tagline {
    font-size: 1.5rem;
    font-family: var(--font-serif-secondary);
    color: var(--color-neutral-medium);
    margin-bottom: var(--spacing-lg);
}

/* ========================================================================= */
/* --- HERO CAROUSEL STYLES (FIXED) --- */
/* ========================================================================= */

.hero-featured-book {
    /* --- 1. ISOLATION (Fixes background resizing) --- */
    position: absolute; 
    z-index: 20; 
    
    /* --- 2. CENTERING --- */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* --- 3. SIZE & PLACEMENT CONTROLS (EDIT THESE) --- */
    --hero-book-width: 250px;  /* <--- CHANGE SIZE HERE */
    margin-left: -450px;       /* <--- MOVE LEFT/RIGHT */
    margin-top: +0px;          /* <--- MOVE UP/DOWN */

    /* --- Layout internals --- */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: var(--hero-book-width); /* Ensures button centers relative to book width */
}

.carousel-container {
    /* We removed the hardcoded width variable from here so it inherits from above */
    position: relative;
    width: 100%; /* Fills the .hero-featured-book width */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.9);
}

.carousel-track-container {
    width: 100%;
    height: 100%;
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    font-size: 1.2rem;
    transition: background 0.3s;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(198, 147, 75, 0.8);
}

.carousel-btn.prev-btn {
    left: 10px;
}

.carousel-btn.next-btn {
    right: 10px;
}

/* --- MOBILE SAFETY NET --- */
/* Prevents the absolute positioning from breaking mobile views */
@media (max-width: 900px) {
    .hero-featured-book {
        position: relative; 
        top: auto;
        left: auto;
        transform: none;
        margin-left: 0;
        margin-top: 2rem;
        width: auto; 
        --hero-book-width: 200px; /* Smaller size for mobile */
    }
    
    .carousel-container {
        width: var(--hero-book-width);
    }
}

/* ========================================================================= */
/* --- End Carousel Styles --- */
/* ========================================================================= */

/* --- Section Titles --- */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: 10px;
    position: relative;
    color: var(--color-dark-primary);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-accent-burgundy);
}

/* --- Book Grid (Reused for homepage & books page general grids) --- */
.book-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--grid-gap); /* Using new grid-gap variable */
    margin-bottom: var(--spacing-lg);
}
.book-card, .blog-card {
    background-color: var(--color-neutral-balanced);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    display: flex; /* Ensures content pushes to bottom with flex-grow */
    flex-direction: column;
    justify-content: space-between; /* Distributes space */
    align-items: center; /*centers item horizontally within the flex column */
}
.book-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.book-card img {
    max-width: 180px;
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow for covers */
}
.book-card h3 a {
    font-family: var(--font-serif-secondary);
    color: var(--color-dark-primary);
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: var(--spacing-xs); /* Tighter spacing */
}
.book-card .book-blurb-snippet {
    font-size: 0.95rem;
    color: var(--color-text-medium);
    flex-grow: 1; /* Pushes button to the bottom */
    margin-bottom: var(--spacing-md);
}
.book-card .btn { /* Ensure buttons in cards align well */
    margin-top: auto; /* Push button to bottom */
}


/* --- Newsletter Section (Homepage specific) --- */
.newsletter-section {
    background-color: var(--color-dark-primary);
    color: var(--color-text-light);
    background-size: cover;
    background-position: center;
    text-align: left;
}
.newsletter-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}
.newsletter-form h2 {
    color: var(--color-text-light);
}
.newsletter-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(255,255,255,0.3);
    background-color: rgba(255,255,255,0.1);
    color: var(--color-text-light);
    border-radius: 5px;
}
.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.6);
}
.newsletter-form button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}
.privacy-note {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: var(--spacing-sm);
}
.privacy-note a {
    color: var(--color-accent-gold);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--color-dark-primary);
    color: var(--color-neutral-medium);
    padding-top: var(--spacing-lg);
    font-size: 0.9rem; /* Added font size for consistency */
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col h3 {
    color: var(--color-text-light);
    font-family: var(--font-serif-secondary); /* Consistent heading font */
    margin-bottom: var(--spacing-sm);
}
.footer-col p { /* Added for general paragraphs in footer */
    margin-bottom: var(--spacing-sm);
}
.footer-col ul { /* Added for footer list styling */
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li { /* Added for footer list item styling */
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: var(--color-neutral-medium);
}
.footer-col a:hover {
    color: var(--color-accent-gold);
}
.social-icons a {
    font-size: 1.5rem;
    margin-right: var(--spacing-sm);
    color: var(--color-neutral-medium);
}
.social-icons a:hover {
    color: var(--color-accent-gold);
}
.footer-bottom {
    text-align: center;
    padding: var(--spacing-sm) 0;
    background-color: #1a1a1a;
}
.footer-bottom p { /* Added for footer bottom paragraph styling */
    margin: 0;
}

/* ========================================================== */
/* --- BOOKS PAGE SPECIFIC STYLES --- */
/* ========================================================== */

/* --- Page Specific Hero Section for Books --- */
.page-hero-section {
    position: relative;
    height: 70vh; /* Shorter hero for inner pages */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-light);
    background-size: cover;
    background-position: center 70%; /* <--- FIX 1: Apply background-position here. Adjust '10%' as needed to move the image down. */
    background-repeat: no-repeat;
    background-image: url('images/book-page-hero-bg.jpg'); /* Using a placeholder, change as desired */
    overflow: hidden;
    margin-top: -80px; /* Counteract header height if fixed, adjust as needed */
    padding-top: 80px; /* Add padding to bring content down */
}

/* Ensure the overlay is always present for text readability */
/* --- MODIFIED: Split background into background-image and background-color for clarity --- */
.page-hero-section .hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height:100%;
    background-color: rgba(0,0,0,0.3); /* <--- FIX 3: Darken the overlay. Changed 0.6 to 0.9 for better contrast. Adjust as desired (e.g., 0.7, 0.8). */
    background-image: none; /* <--- ADDED: Explicitly override any inherited background-image (like the linear-gradient) */
    z-index: 1;
}

.book-hero-section .hero-content {
    position: relative;
    z-index: 2;
}

/* --- Book Introduction --- */
.book-introduction .lead-text {
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    text-align: center;
    color: var(--color-text-medium); /* Consistent text color */
    font-family: var(--font-serif-secondary);
}

/* --- Book Retailer Grids (Top and Bottom) --- */
.book-retailers-top {
    border-bottom: 1px solid var(--color-neutral-medium);
    background-color: var(--color-neutral-balanced); /* Use a balanced neutral color */
}
.book-retailers-bottom {
    border-top: 1px solid rgba(var(--color-text-light),0.1); /* Consistent border color */
}

.retailer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-md);
    justify-items: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.retailer-grid.top-grid {
    grid-template-columns: repeat(4, 1fr); /* Fixed 1x4 for top */
    max-width: 400px;
    margin-bottom: var(--spacing-xs);
}
.retailer-grid.bottom-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}


.retailer-grid a {
    display: block;
    padding: var(--spacing-xs);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.retailer-grid a:hover {
    background-color: rgba(var(--color-accent-burgundy), 0.1);
}
.book-retailers-bottom .retailer-grid a:hover {
    background-color: rgba(var(--color-text-light),0.1);
}

.retailer-grid img {
    max-width: 100%;
    height: auto;
    max-height: 40px;
    filter: grayscale(80%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.retailer-grid a:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.purchase-cta {
    font-size: 0.9rem;
    color: var(--color-text-medium); /* Consistent text color */
    margin-top: var(--spacing-sm);
}

/* --- Latest Release Section (Books Page) --- */
.latest-book-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff; /* White background for contrast */
    padding: var(--spacing-lg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
@media (min-width: 768px) {
    .latest-book-detail {
        flex-direction: row;
        text-align: left;
    }
}

.latest-book-cover {
    flex-shrink: 0;
}
.latest-book-cover img {
    max-width: 250px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.latest-book-info {
    flex-grow: 1;
}
.latest-book-info h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}
.latest-book-info .genre-tag {
    font-family: var(--font-sans-body);
    font-weight: 600;
    color: var(--color-accent-burgundy);
    margin-bottom: var(--spacing-sm);
    display: block;
}
.latest-book-info .summary-blurb {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    color: var(--color-text-dark); /* Consistent dark text */
}
.latest-book-info .purchase-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    justify-content: center;
}
@media (min-width: 768px) {
    .latest-book-info .purchase-links {
        justify-content: flex-start;
    }
}
.book-social-links {
    margin-top: var(--spacing-sm);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--color-text-medium); /* Consistent text color */
    justify-content: center;
}
@media (min-width: 768px) {
    .book-social-links {
        justify-content: flex-start;
    }
}
.book-social-links a {
    color: var(--color-text-medium); /* Consistent text color */
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: color 0.3s ease;
}
.book-social-links a:hover {
    color: var(--color-accent-burgundy);
}
.book-social-links .icon-small {
    height: 1.2em;
    width: auto;
    vertical-align: middle; /* Align icons better */
}


/* --- All Books Grid (3xn) --- */
.all-books-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Flexible 3-column grid */
    gap: var(--grid-gap);
}

/* Specific styling for book-cards within this grid if needed, or reuse .book-card */
.all-books-grid .book-card h3 a {
    font-size: 1.25rem;
}
.all-books-grid .book-card p {
    font-size: 0.9rem;
}


/* --- Special Sections / Series Cards --- */
.special-sections { /* Added to provide distinct background if desired */
    background-color: var(--color-neutral-light);
}
.series-card {
    background-color: var(--color-neutral-balanced); /* Consistent card background */
    padding: var(--spacing-lg);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: var(--spacing-lg);
}
.series-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}
.series-header img.series-banner {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.series-header h3 {
    font-size: 1.8rem;
    color: var(--color-dark-primary);
}
.series-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-dark); /* Consistent dark text */
}
.series-books {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}
.series-books .book-card {
    padding: var(--spacing-md);
}
.series-books .book-card img {
    max-width: 150px;
}
.series-books .book-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: var(--color-dark-primary); /* Consistent heading color */
}
.series-books .book-card h4 a {
    color: var(--color-dark-primary); /* Link color on series book titles */
}
.series-books .book-card h4 a:hover {
    color: var(--color-accent-burgundy);
}

.series-cta {
    margin-top: var(--spacing-lg);
}


/* --- Newsletter CTA on Books Page --- */
.newsletter-cta-books {
    border-top: 1px solid var(--color-neutral-medium);
    background-color: var(--color-neutral-light); /* Consistent light background */
}
.newsletter-cta-books .lead-text {
    margin-bottom: var(--spacing-md);
    font-size: 1.15rem;
    color: var(--color-text-dark); /* Consistent dark text */
}
.newsletter-cta-books .btn-gold {
    min-width: 250px;
}

/* --- Utility Classes --- */
.text-center {
    text-align: center;
}
.mb-md {
    margin-bottom: var(--spacing-md);
}
.bg-light { /* Using variables for consistency */
    background-color: var(--color-neutral-light);
}
.bg-dark { /* Using variables for consistency */
    background-color: var(--color-dark-primary);
}
.text-white { /* Using variables for consistency */
    color: var(--color-text-light);
}


/* --- Responsive Adjustments (General, if any) --- */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--color-dark-primary);
        position: absolute;
        top: 100%;
        left: 0;
        padding: var(--spacing-sm) 0;
    }
    .main-nav.active ul {
        display: flex;
    }
    .main-nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .hero-section {
        height: auto;
        padding: var(--spacing-lg) 0;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    .newsletter-image { /* Added for consistent responsive behavior */
        margin-bottom: var(--spacing-md);
    }

    /* --- Responsive Adjustments for Books Page --- */
    .latest-book-detail {
        padding: var(--spacing-md);
    }
    .latest-book-info h3 {
        font-size: 1.6rem;
    }
    .latest-book-cover img {
        max-width: 180px;
    }
    .series-header img.series-banner {
        max-height: 120px;
    }
    .retailer-grid.top-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid for top retailers on smaller screens */
        max-width: 250px;
    }
    .retailer-grid.bottom-grid {
        grid-template-columns: repeat(3, 1fr); /* 3-column grid for bottom retailers */
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.8rem;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .book-grid {
        grid-template-columns: 1fr;
    }

    /* --- Responsive Adjustments for Books Page (small screens) --- */
    .page-hero-section {
        height: 30vh;
    }
    .page-hero-section h1 {
        font-size: 2.2rem;
    }
    .latest-book-info .purchase-links {
        flex-direction: column;
    }
    .latest-book-info .purchase-links .btn {
        width: 100%;
    }
    .retailer-grid.top-grid {
        grid-template-columns: 1fr; /* Stack top retailers on very small screens */
        max-width: 150px;
    }
    .retailer-grid.bottom-grid {
        grid-template-columns: repeat(2, 1fr); /* 2-column grid for bottom retailers */
    }
    .newsletter-cta-books .btn-gold {
        min-width: unset;
        width: 100%;
    }
}

/* ========================================================== */
/* --- PAGE-SPECIFIC HERO BACKGROUNDS --- */
/* ========================================================== */
/* Provides specific images for the new page heroes */

.about-hero-section {
    background-image: url('images/about-hero-bg.jpg'); /* Placeholder: A desk with a typewriter or pen */
    background-position: center 40%;
}
.blog-hero-section {
    background-image: url('images/blog-hero-bg.jpg'); /* Placeholder: An open book or journal */
    background-position: center 60%;
}
.newsletter-hero-section {
    background-image: url('images/newsletter-hero-bg.jpg'); /* Placeholder: Elegant letter or pen */
    background-position: center 50%;
}
.contact-hero-section {
    background-image: url('images/contact-hero-bg.jpg'); /* Placeholder: An antique phone or letters */
    background-position: center 50%;
}


/* ========================================================== */
/* --- ABOUT PAGE --- */
/* ========================================================== */
.about-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: flex-start;
}
@media (min-width: 768px) {
    .about-content-grid {
        grid-template-columns: 1fr 2fr;
    }
}
.author-photo img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
    display: block;
}
.author-bio .section-title {
    text-align: left;
}
.author-bio .section-title::after {
    left: 0;
    transform: translateX(0);
}
.author-bio p {
    font-family: var(--font-serif-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-medium);
    margin-bottom: var(--spacing-sm);
}
.author-cta-section .lead-text {
    font-family: var(--font-serif-secondary);
    font-size: 1.2rem;
}

/* ========================================================== */
/* --- BLOG PAGE --- */
/* ========================================================== */
.blog-card .post-date {
    font-size: 0.85rem;
    color: var(--color-text-medium);
    font-family: var(--font-sans-body);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}
.blog-card .blog-snippet {
    font-size: 0.95rem;
    color: var(--color-text-medium);
    flex-grow: 1;
    margin-bottom: var(--spacing-md);
}
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    border-top: 1px solid var(--color-neutral-medium);
    padding-top: var(--spacing-md);
}
.pagination .page-numbers {
    font-family: var(--font-serif-secondary);
    color: var(--color-text-medium);
}
.pagination .btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: var(--color-neutral-medium);
}

/* ========================================================== */
/* --- NEWSLETTER PAGE --- */
/* ========================================================== */
.newsletter-benefits {
    list-style: none;
    padding: 0;
    margin: var(--spacing-md) auto;
    text-align: left;
    max-width: 400px;
}
.newsletter-benefits li {
    font-family: var(--font-serif-secondary);
    font-size: 1.05rem;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
}
.newsletter-benefits li i {
    color: var(--color-accent-burgundy);
    margin-right: var(--spacing-sm);
    font-size: 1.2rem;
}

/* ========================================================== */
/* --- CONTACT PAGE --- */
/* ========================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}
@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 2fr 1fr;
    }
}
.contact-form .form-group {
    margin-bottom: var(--spacing-md);
}
.contact-form .form-group label {
    display: block;
    font-family: var(--font-sans-body);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-dark-primary);
}
.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-neutral-medium);
    border-radius: 5px;
    font-family: var(--font-sans-body);
    font-size: 1rem;
    background-color: #fff;
}
.contact-form .form-group textarea {
    resize: vertical;
}
.contact-info .section-title {
    text-align: left;
}
.contact-info .section-title::after {
    left: 0;
    transform: translateX(0);
}
.contact-info p {
    font-family: var(--font-serif-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-medium);
}
.contact-info-block {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-neutral-medium);
}
.contact-info-block:last-child {
    border-bottom: none;
}
.contact-info-block h3 {
    font-family: var(--font-serif-secondary);
    color: var(--color-dark-primary);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
}
.social-icons-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.social-icons-contact a {
    font-family: var(--font-sans-body);
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-accent-burgundy);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}
.social-icons-contact a i {
    font-size: 1.2rem;
}
.social-icons-contact a:hover {
    color: var(--color-accent-gold);
}


/* ========================================================== */
/* --- INDIVIDUAL BOOK PAGE (book1.html) --- */
/* ========================================================== */
.book-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: flex-start;
}
@media (min-width: 768px) {
    .book-detail-grid {
        grid-template-columns: 1fr 2fr;
    }
}
.book-cover-gallery .main-book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin: 0 auto;
    display: block;
}
.book-info-main h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-xs);
}
.book-series-link {
    font-family: var(--font-serif-secondary);
    font-size: 1.2rem;
    color: var(--color-text-medium);
    margin-bottom: var(--spacing-sm);
}
.book-info-main .genre-tag {
    font-family: var(--font-sans-body);
    font-weight: 600;
    color: var(--color-accent-burgundy);
    margin-bottom: var(--spacing-md);
    display: block;
    font-size: 1.1rem;
}
.book-blurb-full p {
    font-family: var(--font-serif-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-sm);
}
.book-info-main .purchase-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}
.book-info-main .book-social-links {
    margin-top: var(--spacing-md);
}

.book-praise-section {
    background-color: var(--color-neutral-light);
}
.praise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-gap);
}
@media (min-width: 768px) {
    .praise-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.praise-grid blockquote {
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 5px solid var(--color-accent-gold);
    margin: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.praise-grid blockquote p {
    font-family: var(--font-serif-secondary);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--color-text-medium);
    margin-bottom: var(--spacing-sm);
}
.praise-grid blockquote footer {
    font-family: var(--font-sans-body);
    font-weight: 600;
    color: var(--color-dark-primary);
    font-style: normal;
}
.book-excerpt-section .excerpt-content {
    font-family: var(--font-serif-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-dark);
    max-height: 200px; /* Adjust as needed */
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease-out;
}
.book-excerpt-section .excerpt-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    /* --- THIS IS THE SECOND FIX --- */
    /* Changed #fff to the correct background color */
    background: linear-gradient(to bottom, transparent, var(--color-neutral-light));
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.book-excerpt-section .excerpt-content.expanded {
    max-height: 1000px; /* Large enough to show all content */
    transition: max-height 0.7s ease-in;
}
.book-excerpt-section .excerpt-content.expanded::after {
    opacity: 0;
}
.next-in-series-section .book-card {
    background-color: #fff; /* Stand out on light background */
}