/* Color Palette & Typography Definitions */

html {
    scroll-behavior: smooth;
}


:root {
    --bg-primary: #FDFBF7;       /* Soft Cream */
    --bg-card: #FFFFFF;          /* Pure White */
    --bg-accent: #F4EFEA;        /* Warm Neutral */
    --text-main: #2C2825;        /* Deep Charcoal */
    --text-muted: #665F59;       /* Muted Brown-Gray */
    --primary-accent: #8C3A2B;   /* Warm Terracotta Red */
    --primary-hover: #6E2B1F;    
    --secondary-accent: #C48B3F; /* Muted Gold */
    --border-color: #E8E2D9;     
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Montserrat', system-ui, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-accent);
    font-weight: 600;
}

/* Hero Section - Dark Literary Banner */
.hero {
    padding: 90px 20px;
    text-align: center;
    background-color: #1E1B18; /* Rich, dark charcoal/black accent */
    color: #FDFBF7;             /* Soft light text */
    border-bottom: 3px solid var(--secondary-accent); /* Muted gold border divider */
}

.hero-content {
    max-width: 750px;
    margin: 0 auto;
}

.hero .subtitle {
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 0.85rem;
    color: var(--secondary-accent); /* Muted Gold */
    font-weight: 700;
    margin-bottom: 12px;
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 18px;
    color: #FDFBF7; /* Overrides default dark heading color */
}

.hero .bio {
    font-size: 1.1rem;
    color: #C2BBB2; /* Readable warm gray text against dark background */
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Secondary Button tweak for Dark Background */
.hero .btn-secondary {
    border: 2px solid var(--secondary-accent);
    color: var(--secondary-accent);
}

.hero .btn-secondary:hover {
    background-color: var(--secondary-accent);
    color: #1E1B18;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: #FFF;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    border: 2px solid var(--primary-accent);
    color: var(--primary-accent);
}

.btn-secondary:hover {
    background-color: var(--primary-accent);
    color: #FFF;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 45px;
}

/* Novels Section */
.novels-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.novel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.novel-cover {
    flex: 0 0 280px;
    background-color: var(--bg-accent);
}

.novel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.novel-info {
    padding: 35px;
    display: flex;
    flex-direction: column;
}

.series-badge {
    align-self: flex-start;
    background: var(--bg-accent);
    color: var(--primary-accent);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.novel-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.synopsis {
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

.buy-buttons {
    display: flex;
    gap: 15px;
}

.btn-buy {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-buy.amazon {
    background-color: var(--text-main);
    color: #FFF;
}

.btn-buy.amazon:hover {
    background-color: #000;
}

.btn-buy.apple {
    background-color: var(--bg-accent);
    color: var(--text-main);
}

.btn-buy.apple:hover {
    background-color: var(--border-color);
}

/* Short Stories Section - Muted Dark Transition */
.stories-section {
    background-color: #2E2A26; /* Warm dark slate background */
    border-top: 1px solid #4A443E;
    border-bottom: 1px solid #4A443E;
    color: #FDFBF7;
}

.stories-section h2 {
    color: #FDFBF7;
}

.stories-section .section-subtitle {
    color: var(--secondary-accent);
}

/* Filter Tabs on Dark Background */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid #4A443E;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    color: #C2BBB2; /* Visible light warm gray */
    transition: all 0.2s ease;
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--secondary-accent);
    color: #1E1B18;
    border-color: var(--secondary-accent);
}

/* Story Cards Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Dark Story Cards */
.story-card {
    background: #3B3631; /* Slightly lighter warm dark card */
    border: 1px solid #4A443E;
    padding: 25px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.story-card h3 {
    color: #FDFBF7;
}

.story-card p {
    color: #C2BBB2;
}

/* Tags & Buttons inside Dark Cards */
.tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
    color: var(--secondary-accent); /* Muted gold tag */
}

.story-card .btn-secondary {
    border-color: var(--secondary-accent);
    color: var(--secondary-accent);
}

.story-card .btn-secondary:hover {
    background-color: var(--secondary-accent);
    color: #1E1B18;
}

.read-link {
    color: var(--secondary-accent); /* Muted gold link color */
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto; /* Keeps the link pinned to the bottom of the card */
    transition: color 0.2s ease, transform 0.2s ease;
}

.read-link:hover {
    color: #FDFBF7; /* Glows soft white on hover */
    transform: translateX(4px); /* Subtle slide-right effect on the arrow */
}

/* Footer */
.footer {
    padding: 50px 0 40px;
    text-align: center;
    background-color: #EFE8DF; /* Slightly darker warm neutral than cream */
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.footer-content .copyright {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.85;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .novel-card {
        flex-direction: column;
    }
    .novel-cover {
        flex: 0 0 300px;
    }
    .nav-container {
        flex-direction: column;
        gap: 12px;
    }
}

/* Light Background Theme for Standalone Short Stories Page */
body.short-stories-page .stories-section {
    background-color: var(--bg-primary); /* Uses your soft cream #FDFBF7 */
    color: var(--text-main);
    border-top: none;
    border-bottom: none;
}

body.short-stories-page .stories-section h2 {
    color: var(--text-main);
}

body.short-stories-page .filter-tabs .tab-btn {
    border-color: var(--border-color);
    color: var(--text-muted);
    background: transparent;
}

body.short-stories-page .filter-tabs .tab-btn.active, 
body.short-stories-page .filter-tabs .tab-btn:hover {
    background-color: var(--primary-accent);
    color: #FFFFFF;
    border-color: var(--primary-accent);
}

body.short-stories-page .story-card {
    background-color: var(--bg-card); /* Pure White #FFFFFF */
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.short-stories-page .story-card h3 {
    color: var(--text-main);
}

body.short-stories-page .story-card p {
    color: var(--text-muted);
}

body.short-stories-page .tag {
    color: var(--primary-accent); /* Terracotta red accent tag */
}

body.short-stories-page .read-link {
    color: var(--primary-accent);
}

body.short-stories-page .read-link:hover {
    color: var(--primary-hover);
}

/* About Page Styling */
.about-section {
    padding: 80px 0;
    min-height: calc(100vh - 250px);
    display: flex;
    align-items: center;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 0 0 350px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.about-text {
    flex: 1;
}

.about-text h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .about-image {
        flex: 0 0 auto;
        max-width: 280px;
    }
}

/* Single Short Story Page Reader Styling */
.story-reading-section {
    padding: 60px 0 90px;
}

.story-container {
    max-width: 720px; /* Optimal reading column width */
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 30px;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-4px);
    color: var(--primary-hover);
}

.story-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

.story-header h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin: 10px 0 12px;
}

.story-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Typography for Story Body */
.story-body {
    font-family: var(--font-heading); /* Serif font for comfortable reading */
    font-size: 1.15rem;
    line-height: 1.85;
    color: #24211E;
}

.story-body p {
    margin-bottom: 24px;
}

.story-footer-nav {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Author Note Callout Section */
.author-note {
    border-left: 3px solid #2e7d32; /* Accent bar (adjust hex code to match your site's accent color) */
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

.author-note h2 {
    font-size: 1.3rem; /* Slightly scaled heading */
    margin-bottom: 0.75rem;
}

.author-note p {
    font-size: 0.9em;  /* Slightly smaller than main story text */
    color: #555555;     /* Softer slate gray */
    line-height: 1.65;
}

/* Card container setup */
.story-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.story-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Ensure paragraph always leaves space below it */
.story-card p,
.story-card-body p {
    margin-bottom: 1.25rem !important; /* Forces 20px gap above the button */
}

/* Lock button to bottom left */
.story-card .btn,
.story-card-body .btn {
    margin-top: auto !important; /* Locks to bottom */
    align-self: flex-start;
    display: inline-block;
    width: auto;
}

.reading-content h2 {
    text-align: center;
}

/* Atmospheric Hero Section */
.hero-atmospheric {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    color: #ffffff;
    /* Replace with your background image path */
    background: url('images/shaws-forest-bg.jpg') center/cover no-repeat;
    background-color: #12181a; /* Fallback color while image loads */
}

/* Dark Overlay for Text Contrast */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg, 
        rgba(10, 15, 20, 0.75) 0%, 
        rgba(10, 15, 20, 0.85) 100%
    );
    z-index: 1;
}

/* Content Container */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
}

.hero-content .eyebrow-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c8963e; /* Accent gold */
    display: block;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 2.75rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    color: #ffffff;
    font-weight: 700;
}

.hero-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* CTA Group & Buttons */
.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
    background: #ffffff;
    color: #12181a;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hero-atmospheric {
        min-height: 400px;
        padding: 3rem 1.25rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.98rem;
    }
}

/* Atmospheric Hero Section */
.hero-atmospheric {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem;
    color: #ffffff;
    background-image: url('images/shaws-forest-bg.jpg');
    background-position: center 40%;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #1A1714;
    border-bottom: 3px solid var(--secondary-accent);
}

/* Navigation Separator Line Override */
.navbar {
    border-bottom: 3px solid var(--secondary-accent, #C48B3F);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Give the top section a bit more breathing room without a hero */
.novels-section {
    padding-top: 60px;
}

/* Short Stories Page Top Spacing */
.stories-header-section {
    padding-top: 60px;
    padding-bottom: 20px;
}