/**
 * Single Post View Styles
 * Designed for maximum readability and a premium book-like experience
 */

/* Reading Hero */
.reading-hero {
    min-height: 400px;
    height: auto;
    /* Allow height to adjust to image if needed */
    max-height: 85vh;
    /* Increase max height for tall images */
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    background: #0f0a0d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    /* Add some padding so image doesn't touch edges */
}

/* Modern Gradient Overlay on top of everything */
.reading-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 10, 13, 0.3) 0%, rgba(15, 10, 13, 0) 20%, rgba(15, 10, 13, 0) 80%, rgba(15, 10, 13, 0.6) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Blurred background for premium feel */
.reading-hero::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.3);
    z-index: 0;
}

.reading-hero img {
    position: relative;
    max-width: 90%;
    /* Leave some breathing room */
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Ensure the whole image is visible */
    z-index: 1;
    transition: transform 1.2s cubic-bezier(0.33, 1, 0.68, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    /* Subtle rounding for modern look */
}

.reading-hero:hover img {
    transform: scale(1.03);
}

/* Article Header Area */
.article-header-area {
    padding: 3rem 0 2rem;
    background: var(--bg-primary);
    text-align: center;
}

.article-header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-category-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.article-main-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-meta img,
.author-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.author-avatar-placeholder {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.25rem;
}

.meta-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Content Body */
.article-body-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

.article-body-content {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-primary);
    word-wrap: break-word;
}

/* Prose Styling (TinyMCE HTML) */
.article-body-content p {
    margin-bottom: 2rem;
}

.article-body-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin: 3.5rem 0 1.5rem;
    color: var(--text-primary);
}

.article-body-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
}

.article-body-content blockquote {
    border-left: 5px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    background: var(--bg-secondary);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-primary);
    border-radius: 0 12px 12px 0;
}

.article-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 20px 40px var(--shadow);
}

.article-body-content ul,
.article-body-content ol {
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
}

.article-body-content li {
    margin-bottom: 0.75rem;
}

/* Social Share Row */
.share-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.share-title {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.share-links-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-circle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.share-circle-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-5px);
}

.share-circle-btn:active {
    transform: translateY(-2px) scale(0.95);
}

.share-circle-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.share-circle-btn.twitter:hover {
    background: #000000;
    border-color: #000000;
}

.share-circle-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.share-circle-btn.copy-link:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Back Button */
.back-home-wrapper {
    margin-top: 4rem;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-back-home i {
    transition: transform 0.3s ease;
}

.btn-back-home:hover i {
    transform: translateX(-5px);
}

.btn-back-home:hover {
    color: var(--accent-hover);
}

/* Responsiveness */
@media (max-width: 768px) {
    .reading-hero {
        height: 50vh;
        min-height: 250px;
    }

    .article-header-area {
        padding: 1.5rem 0 1rem;
    }

    .article-main-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .article-meta-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .author-meta {
        justify-content: center;
    }

    .article-body-wrapper {
        padding: 2rem 1.25rem 4rem;
    }

    .article-body-content {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .article-body-content blockquote {
        padding: 1.25rem;
        font-size: 1.15rem;
        margin: 2rem 0;
    }

    .share-circle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .article-main-title {
        font-size: 1.6rem;
    }

    .reading-hero {
        height: auto;
        min-height: 300px;
        max-height: 70vh;
        padding: 1rem 0;
    }

    .reading-hero img {
        max-width: 95%;
    }
}