/* ============================================
   A WRITER'S THOUGHTS - PAGE-SPECIFIC STYLES
   Additional styles for individual pages
   ============================================ */

/* ==================== BOOKS PAGE ==================== */
.books-hero {
    padding-top: 150px;
    padding-bottom: var(--space-4xl);
    background: linear-gradient(180deg, var(--color-void) 0%, var(--color-abyss) 100%);
    text-align: center;
}

.books-hero h1 {
    margin-bottom: var(--space-lg);
}

/* ==================== JOURNAL PAGE ==================== */
.journal-hero {
    padding-top: 150px;
    padding-bottom: var(--space-xl);
    background: linear-gradient(180deg, var(--color-void) 0%, var(--color-abyss) 100%);
    text-align: center;
}

.journal-grid-section {
    padding-top: var(--space-xl);
}

.series-section {
    padding: var(--space-4xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.series-section:last-child {
    border-bottom: none;
}

.series-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.series-header::before,
.series-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.series-title {
    font-family: var(--font-display);
    color: var(--color-gold);
    font-size: var(--text-2xl);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Single Book Detail Page */
.book-detail-hero {
    padding-top: 120px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.book-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-4xl);
    align-items: start;
}

.book-cover-3d {
    perspective: 1000px;
}

.book-cover-wrapper {
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.book-cover-wrapper:hover {
    transform: rotateY(-15deg) rotateX(5deg);
}

.book-cover-image {
    width: 100%;
    max-width: 400px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        10px 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
}

.book-info h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-sm);
}

.book-series-tag {
    display: inline-block;
    background: var(--gradient-mystic);
    color: var(--color-void);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-lg);
}

.book-synopsis {
    font-size: var(--text-lg);
    line-height: 1.9;
    margin-bottom: var(--space-2xl);
}

.book-buy-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.buy-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-moonlight);
    transition: var(--transition-base);
}

.buy-option:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.buy-option img {
    width: 24px;
    height: 24px;
}

/* ==================== WORLD/EL'ANTHAR PAGE ==================== */
.world-hero {
    padding-top: 150px;
    padding-bottom: var(--space-4xl);
    text-align: center;
    background:
        radial-gradient(ellipse at center bottom, rgba(123, 92, 255, 0.1), transparent 50%),
        var(--gradient-night);
}

.world-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--color-silver);
}

.world-map-section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.interactive-map-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        inset 0 0 60px rgba(139, 120, 93, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(184, 160, 96, 0.25);
    background:
        radial-gradient(ellipse at center, rgba(139, 120, 93, 0.05) 0%, transparent 70%),
        linear-gradient(135deg, rgba(139, 120, 93, 0.02) 0%, transparent 50%);
    border: 2px solid rgba(184, 160, 96, 0.3);
}

.interactive-map {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    /* Satellite view - preserve natural terrain colors and detail */
    filter:
        contrast(1.02) brightness(0.99) saturate(1.01);
    position: relative;
    z-index: 0;
    object-fit: cover;
    image-rendering: auto;
    transition: filter 0.3s ease;
}

.map-texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg,
            rgba(139, 120, 93, 0.02) 0px,
            transparent 1px,
            transparent 2px,
            rgba(139, 120, 93, 0.02) 3px),
        repeating-linear-gradient(90deg,
            rgba(139, 120, 93, 0.02) 0px,
            transparent 1px,
            transparent 2px,
            rgba(139, 120, 93, 0.02) 3px),
        radial-gradient(circle at 30% 40%, rgba(139, 120, 93, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(139, 120, 93, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

.map-hotspot {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.3);
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-base);
    animation: glowPulse 2s infinite;
}

.map-hotspot:hover {
    transform: scale(1.3);
    background: var(--color-gold);
}

.map-hotspot::after {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-shadow);
    color: var(--color-starlight);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.map-hotspot:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* Lore Categories Filter */
.lore-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-3xl);
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1px solid var(--color-twilight);
    border-radius: var(--radius-full);
    color: var(--color-silver);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-void);
}

/* ==================== SHOP PAGE ==================== */
.shop-hero {
    padding-top: 150px;
    padding-bottom: var(--space-4xl);
    text-align: center;
    background:
        url('../assets/images/shop-banner.jpg') center/cover no-repeat,
        var(--color-void);
    position: relative;
}

.shop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 15, 0.85);
}

.shop-hero .container {
    position: relative;
    z-index: 1;
}

.shop-categories {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    min-width: 150px;
    transition: var(--transition-base);
}

.category-card:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--color-gold);
    transform: translateY(-5px);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.cart-indicator {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 60px;
    height: 60px;
    background: var(--gradient-mystic);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-arcane);
    cursor: pointer;
    transition: var(--transition-base);
    z-index: var(--z-fixed);
}

.cart-indicator:hover {
    transform: scale(1.1);
}

.cart-indicator svg {
    width: 28px;
    height: 28px;
    fill: var(--color-void);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: var(--color-crimson);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
    color: white;
}

/* ==================== MEMBERSHIP PAGE ==================== */
.membership-hero {
    padding-top: 150px;
    padding-bottom: var(--space-4xl);
    text-align: center;
    background:
        radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1), transparent 60%),
        var(--gradient-night);
}

.membership-benefits {
    padding: var(--space-4xl) 0;
    background: var(--color-abyss);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.benefit-card {
    text-align: center;
    padding: var(--space-2xl);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--color-shadow), var(--color-dusk));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--color-gold);
}

.benefit-card h4 {
    margin-bottom: var(--space-sm);
}

/* ==================== JOURNAL PAGE ==================== */
.journal-hero {
    padding-top: 150px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background:
        linear-gradient(180deg, transparent, var(--color-abyss)),
        url('../assets/images/journal-hero.jpg') center/cover no-repeat;
}

.journal-hero h1 {
    margin-bottom: var(--space-lg);
}

.featured-post {
    background: linear-gradient(135deg, var(--color-shadow), var(--color-dusk));
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-4xl);
}

.featured-post-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.featured-post-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
}

.featured-post-content {
    padding: var(--space-3xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-void);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    width: fit-content;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-4xl);
}

.post-card {
    background: linear-gradient(135deg, var(--color-shadow), var(--color-dusk));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(212, 175, 55, 0.3);
}

.post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: var(--text-xs);
    color: var(--color-silver);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-starlight);
}

.post-excerpt {
    font-size: var(--text-base);
    color: var(--color-moonlight);
    margin-bottom: var(--space-lg);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.read-more:hover {
    gap: var(--space-sm);
}


/* ==================== NEWSLETTER PAGE (PREMIUM REDESIGN) ==================== */
.newsletter-split-hero {
    min-height: 100vh;
    display: flex;
    position: relative;
    background: var(--color-void);
    overflow: hidden;
}

.newsletter-split-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(123, 92, 255, 0.05), transparent 50%),
        radial-gradient(circle at bottom left, rgba(212, 175, 55, 0.05), transparent 50%);
    pointer-events: none;
}

.newsletter-split-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15rem 4rem 6rem;
    position: relative;
    z-index: 2;
    max-width: 800px;
}

@media (max-width: 992px) {
    .newsletter-split-hero {
        flex-direction: column;
    }

    .newsletter-split-content {
        padding: 10rem 2rem 4rem;
        max-width: 100%;
    }
}

.newsletter-split-image {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.newsletter-split-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/images/mistywoods.jpg') center/cover no-repeat;
    filter: brightness(0.4) saturate(0.8) contrast(1.2);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%);
    mask-image: linear-gradient(to right, transparent, black 20%);
}

@media (max-width: 992px) {
    .newsletter-split-image {
        display: none;
        /* Hide illustrative half on mobile for clean form focus */
    }
}

.newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(184, 160, 96, 0.1);
    border: 1px solid rgba(184, 160, 96, 0.3);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    color: var(--color-gold);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-display);
    margin-bottom: var(--space-lg);
    width: fit-content;
}

.newsletter-split-title {
    font-size: var(--text-5xl);
    line-height: 1.1;
    margin-bottom: var(--space-md);
    font-family: var(--font-display);
}

.newsletter-split-desc {
    color: var(--color-silver);
    font-size: var(--text-lg);
    margin-bottom: var(--space-xl);
    max-width: 500px;
    line-height: 1.6;
}

.newsletter-perks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    list-style: none;
    padding: 0;
}

.newsletter-perks-grid li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-silver);
}

.newsletter-perks-grid li svg {
    width: 20px;
    height: 20px;
    color: var(--color-gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.newsletter-form-container {
    background: rgba(11, 13, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.newsletter-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-mystic);
}

.newsletter-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-xl);
    background: var(--gradient-mystic);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-icon svg {
    width: 50px;
    height: 50px;
    fill: var(--color-void);
}

.newsletter-perks {
    list-style: none;
    margin: var(--space-2xl) 0;
    text-align: left;
}

.newsletter-perks li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    color: var(--color-silver);
}

.newsletter-perks li::before {
    content: '✦';
    color: var(--color-gold);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 15, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: var(--color-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px);
    transition: var(--transition-base);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    color: var(--color-moonlight);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--color-crimson);
}

.modal-body {
    padding: var(--space-xl);
}

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 50px;
    height: 50px;
    background: var(--color-shadow);
    border: 1px solid var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: var(--z-fixed);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-gold);
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-gold);
    transition: var(--transition-base);
}

.back-to-top:hover svg {
    stroke: var(--color-void);
}

/* ==================== 404 PAGE ==================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xl);
}

.error-code {
    font-size: clamp(8rem, 20vw, 15rem);
    font-family: var(--font-display);
    background: var(--gradient-mystic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-lg);
}

.error-message {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xl);
}

/* ==================== POST FULL VIEW OVERLAY ==================== */
.post-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 12, 0.95);
    z-index: 10000;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(6px);
}

.post-overlay.show,
.post-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.post-full-view {
    max-width: 820px;
    margin: 30px auto;
    padding: 0;
    background: #d4c4a8;
    border-radius: 6px;
    box-shadow:
        0 0 0 1px rgba(139, 109, 56, 0.15),
        0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    min-height: 60vh;
    overflow: hidden;
}

/* Decorative bottom border */
.post-full-view::after {
    content: '— ✦ —';
    display: block;
    text-align: center;
    color: rgba(120, 85, 40, 0.4);
    font-size: 1.2rem;
    letter-spacing: 8px;
    margin-top: 40px;
    padding: 20px 0 40px;
    border-top: 1px solid rgba(120, 85, 40, 0.15);
}

.post-close-btn {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(15, 12, 8, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-gold, #d4af37);
    z-index: 10001;
    transition: all 0.3s;
    font-size: 24px;
}

.post-close-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold, #d4af37);
    transform: rotate(90deg);
}

.post-full-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    margin-bottom: 0;
    image-rendering: auto;
    background: rgba(0, 0, 0, 0.05);
}

.post-full-header {
    margin-bottom: 40px;
    text-align: center;
    padding: 40px 72px 0;
}

/* Decorative separator between image and content */
.post-full-image+.post-full-header::before {
    content: '— ✦ —';
    display: block;
    text-align: center;
    color: rgba(120, 85, 40, 0.4);
    font-size: 1.1rem;
    letter-spacing: 8px;
    margin-bottom: 30px;
}

.post-full-body {
    padding: 0 72px;
}

.post-full-header .post-category {
    display: inline-block;
    margin-bottom: 16px;
    color: #6b3a1e;
    font-weight: 600;
    font-family: 'Quintessential', cursive;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    background: rgba(107, 58, 30, 0.08);
    padding: 6px 16px;
    border-radius: 2px;
    border: 1px solid rgba(107, 58, 30, 0.12);
}

.post-full-header h1 {
    font-family: 'Quintessential', cursive;
    color: #2a1810;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.post-full-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #5a3e28;
    font-family: 'Quintessential', cursive;
    font-size: 1.05rem;
    font-style: italic;
    flex-wrap: wrap;
}

.post-full-meta::before {
    content: '❦';
    color: rgba(120, 85, 40, 0.35);
    font-size: 1.2rem;
}

.post-full-meta::after {
    content: '❦';
    color: rgba(120, 85, 40, 0.35);
    font-size: 1.2rem;
}

/* Share / copy-link button inside the open post */
.post-share-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 22px;
    padding: 9px 20px;
    background: rgba(107, 58, 30, 0.06);
    border: 1px solid rgba(107, 58, 30, 0.25);
    border-radius: 3px;
    color: #6b3a1e;
    font-family: 'Quintessential', cursive;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.post-share-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold, #d4af37);
    color: #2a1810;
}

.post-full-body {
    color: #2a1810 !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 1.3rem;
    line-height: 1.9;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    padding: 0 72px 40px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

.post-full-body table,
.post-full-body pre,
.post-full-body div[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
    overflow-x: auto;
    white-space: normal !important;
}

/* Drop cap for first paragraph */
.post-full-body>p:first-of-type::first-letter {
    font-family: 'Quintessential', cursive;
    font-size: 4rem;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 6px;
    color: #6b3a1e;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.post-full-body h1,
.post-full-body h2,
.post-full-body h3,
.post-full-body h4,
.post-full-body h5,
.post-full-body h6 {
    font-family: 'Quintessential', cursive;
    color: #2a1810;
    margin: 1.8em 0 0.7em;
    line-height: 1.3;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.post-full-body h1 {
    font-size: 2.2rem;
}

.post-full-body h2 {
    font-size: 1.8rem;
}

.post-full-body h3 {
    font-size: 1.5rem;
    text-align: center;
}

.post-full-body h4 {
    font-size: 1.3rem;
}

.post-full-body h5 {
    font-size: 1.15rem;
}

.post-full-body h6 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-full-body p,
.post-full-body ul,
.post-full-body li,
.post-full-body span {
    margin-bottom: 1.3em;
    color: #2a1810 !important;
    font-family: 'Cormorant Garamond', serif !important;
    background-color: transparent !important;
    max-width: 100%;
}

/* Respect inline text-align styles from the Quill editor */
.post-full-body [style*="text-align: center"],
.post-full-body [style*="text-align:center"],
.post-full-body .ql-align-center {
    text-align: center !important;
}

.post-full-body [style*="text-align: right"],
.post-full-body [style*="text-align:right"],
.post-full-body .ql-align-right {
    text-align: right !important;
}

.post-full-body [style*="text-align: justify"],
.post-full-body [style*="text-align:justify"],
.post-full-body .ql-align-justify {
    text-align: justify !important;
}

/* Indent support from Quill */
.post-full-body .ql-indent-1 {
    padding-left: 2em;
}

.post-full-body .ql-indent-2 {
    padding-left: 4em;
}

.post-full-body .ql-indent-3 {
    padding-left: 6em;
}

.post-full-body .ql-indent-4 {
    padding-left: 8em;
}

.post-full-body p+p {
    text-indent: 0;
    margin-top: 0;
}

.post-full-body blockquote {
    border-left: 3px solid #6b3a1e;
    padding: 16px 24px;
    margin: 2em 1em;
    color: #3a2415;
    font-style: italic;
    font-size: 1.35rem;
    background: rgba(107, 58, 30, 0.04);
    border-radius: 0 4px 4px 0;
}

.post-full-body hr {
    border: none;
    text-align: center;
    margin: 2em 0;
    color: rgba(120, 85, 40, 0.4);
    font-size: 1rem;
    letter-spacing: 6px;
}

.post-full-body hr::after {
    content: '— ✦ —';
}

.post-full-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    margin: 1.5em auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(120, 85, 40, 0.15);
}

.post-full-body a {
    color: #6b3a1e;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s;
}

.post-full-body a:hover {
    color: #8b4513;
}

/* Clean up legacy nbsp spacing */
.post-full-body br+br {
    display: none;
}

/* Post overlay article styles (for category pages) */
.post-overlay-content {
    max-width: 820px;
    margin: 30px auto;
    padding: 0;
    background: #d4c4a8;
    border-radius: 6px;
    box-shadow:
        0 0 0 1px rgba(139, 109, 56, 0.15),
        0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    min-height: 60vh;
}

.post-overlay-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(15, 12, 8, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-gold, #d4af37);
    z-index: 10001;
    transition: all 0.3s;
    font-size: 28px;
    line-height: 1;
}

.post-overlay-close:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold, #d4af37);
    transform: rotate(90deg);
}

.post-overlay-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    margin-bottom: 0;
    background: rgba(0, 0, 0, 0.05);
}

.post-overlay-body {
    color: #2a1810;
    font-family: 'Quintessential', cursive;
    padding: 40px 72px;
}

.post-overlay-body h1 {
    font-family: 'Quintessential', cursive;
    color: #2a1810;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.post-overlay-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #5a3e28;
    font-family: 'Quintessential', cursive;
    font-size: 1.05rem;
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(120, 85, 40, 0.15);
}

.post-overlay-text {
    font-family: 'Quintessential', cursive;
    font-size: 1.25rem;
    line-height: 1.9;
    color: #2a1810;
}

.post-overlay-text p {
    margin-bottom: 1.3em;
}

.post-overlay-text h1,
.post-overlay-text h2,
.post-overlay-text h3 {
    font-family: 'Quintessential', cursive;
    color: #2a1810;
    margin: 1.8em 0 0.7em;
}

.post-overlay-text h3 {
    text-align: center;
}

.post-overlay-text blockquote {
    border-left: 3px solid #6b3a1e;
    padding: 16px 24px;
    margin: 2em 1em;
    color: #3a2415;
    font-style: italic;
    background: rgba(107, 58, 30, 0.04);
}

.post-overlay-edit-btn {
    position: fixed;
    top: 80px;
    right: 24px;
    background: rgba(15, 12, 8, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--color-gold, #d4af37);
    text-decoration: none;
    font-size: 0.85rem;
    z-index: 10001;
    transition: all 0.3s;
}

.post-overlay-edit-btn:hover {
    background: rgba(212, 175, 55, 0.15);
}

/* ==================== PAGE-SPECIFIC RESPONSIVE ==================== */
@media screen and (max-width: 768px) {
    .book-detail-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-cover-image {
        max-width: 280px;
        margin: 0 auto;
    }

    .book-buy-options {
        justify-content: center;
    }

    .featured-post-grid {
        grid-template-columns: 1fr;
    }

    .featured-post-image {
        min-height: 250px;
    }

    .featured-post-content {
        padding: var(--space-xl);
    }

    .featured-post-content h2 {
        font-size: var(--text-xl);
    }
}

/* Utilities for Index.html */
.mt-3xl {
    margin-top: var(--space-3xl);
}

.newsletter-footer-text {
    font-size: var(--text-sm);
    color: var(--color-silver);
    margin-top: var(--space-lg);
}

.bg-night {
    background: var(--gradient-night);
}

.bg-void {
    background: var(--color-void);
}

.bg-abyss {
    background: var(--color-abyss);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.img-block {
    width: 100%;
    height: auto;
    display: block;
}

.shop-categories {
    flex-wrap: wrap;
}

.cart-indicator {
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 50px;
    height: 50px;
}


/* Small mobile devices */
@media screen and (max-width: 575px) {
    .featured-post {
        margin-bottom: var(--space-2xl);
    }

    .featured-post-image {
        min-height: 200px;
    }

    .featured-post-content {
        padding: var(--space-lg);
    }

    .featured-post-content h2 {
        font-size: var(--text-lg);
        line-height: 1.4;
    }

    .featured-post-content p {
        font-size: var(--text-base) !important;
    }

    .featured-badge {
        font-size: 0.65rem;
        padding: var(--space-xs) var(--space-sm);
    }

    .post-category {
        font-size: var(--text-xs);
    }
}

/* ==================== CATEGORY LANDING PAGE ==================== */
.category-hero {
    position: relative;
    padding-top: 140px;
    padding-bottom: var(--space-4xl);
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.category-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.category-hero-content {
    position: relative;
    z-index: 2;
}

.category-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-silver);
    text-decoration: none;
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
    transition: color 0.2s;
    opacity: 0.8;
}

.category-breadcrumb:hover {
    color: var(--color-gold);
    opacity: 1;
}

.category-hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-parchment);
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.category-hero-content .section-eyebrow {
    font-size: var(--text-base);
    letter-spacing: 3px;
}

.category-hero-content .section-description {
    max-width: 650px;
    font-size: var(--text-lg);
    color: rgba(230, 220, 200, 0.85);
    line-height: 1.7;
}

.category-posts-section {
    padding-top: var(--space-2xl);
}

.category-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.category-post-count {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cat-series-badge {
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Category Empty State */
.category-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.category-empty-icon {
    font-size: 56px;
    margin-bottom: var(--space-lg);
    opacity: 0.4;
}

.category-empty h3 {
    font-family: var(--font-display);
    color: var(--color-parchment);
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
}

.category-empty p {
    color: var(--color-silver);
    font-size: var(--text-lg);
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

/* Category Loading State */
.category-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-4xl);
}

.category-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.15);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: catSpin 0.8s linear infinite;
    margin: 0 auto var(--space-lg);
}

@keyframes catSpin {
    to {
        transform: rotate(360deg);
    }
}

.category-loading p {
    color: var(--color-silver);
    font-style: italic;
}

/* Related Categories Grid */
.related-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.related-category-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.related-category-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: transform 0.4s ease;
}

.related-category-card:hover .related-category-bg {
    transform: scale(1.05);
}

.related-category-content {
    position: relative;
    z-index: 1;
    padding: var(--space-xl);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    width: 100%;
}

.related-category-icon {
    font-size: 28px;
    display: block;
    margin-bottom: var(--space-sm);
}

.related-category-content h3 {
    font-family: var(--font-display);
    color: var(--color-parchment);
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
}

.related-category-content p {
    color: var(--color-silver);
    font-size: var(--text-sm);
    line-height: 1.5;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .category-hero {
        padding-top: 120px;
        min-height: 300px;
    }

    .related-categories-grid {
        grid-template-columns: 1fr;
    }
}