/* Dynamic Blog Detail Design */

/* Blog Detail Wrapper Animation */
.blog-detail {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-article {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); /* Softer, deeper shadow */
    padding: 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden; /* To contain decorative elements */
}

/* Decorative background element */
.blog-article::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--sage-green), var(--dark-green));
    left: 0;
}

/* Header Styling */
.blog-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.blog-header h1 {
    font-size: 3rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-meta {
    display: inline-flex;
    gap: 1.5rem;
    color: #777;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.blog-meta span {
    position: relative;
    display: flex;
    align-items: center;
}

.blog-meta span:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -0.85rem;
    color: #ccc;
}

/* Main Image Styling */
.blog-image {
    margin: 0 -3rem 2.5rem -3rem; /* Break out of container padding */
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.blog-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* Table of Contents - Dynamic & Sticky */
.table-of-contents {
    background: #fafaf8; /* Very light subtle backing */
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    border-left: 4px solid var(--sage-green);
    /* Float it on larger screens for a magazine look */
    float: right;
    width: 300px;
    margin-left: 2rem;
}

.table-of-contents h2 {
    font-size: 1.3rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
}

.table-of-contents ol {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.table-of-contents li {
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.table-of-contents a {
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}

.table-of-contents a:hover {
    color: var(--sage-green);
    transform: translateX(4px);
}

/* Typography Improvements */
.blog-body {
    font-size: 1.15rem; /* Larger, more readable font */
    line-height: 1.8;
    color: #444;
}

.blog-body h2 {
    color: var(--dark-green);
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.blog-body h3 {
    color: var(--dark-green);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-body p {
    margin-bottom: 1.5rem;
}

.blog-body ul, .blog-body ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.blog-body ul li {
    margin-bottom: 0.8rem;
    position: relative;
    list-style: none; /* remove default */
    padding-left: 1.5rem;
}

.blog-body ul li::before {
    content: '•';
    color: var(--sage-green);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    line-height: 1;
    top: 2px;
}

/* Blockquote Styling */
.blog-body blockquote {
    background: linear-gradient(135deg, #fdf6f9, #eff5ef);
    padding: 2rem 2.5rem;
    border-radius: 12px;
    margin: 2.5rem 0;
    font-style: italic;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--dark-green);
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.blog-body blockquote::before {
    content: '"';
    font-size: 5rem;
    position: absolute;
    top: -20px;
    left: 20px;
    color: rgba(168, 196, 168, 0.3); /* Sage green transparent */
    font-family: serif;
}

/* Call to Action */
.blog-cta {
    margin-top: 4rem;
    background: linear-gradient(135deg, var(--sage-green) 0%, var(--dark-green) 100%);
    padding: 3rem;
    border-radius: 15px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(74,93,74,0.3);
    position: relative;
    overflow: hidden;
}

.blog-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.blog-cta h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: white;
}

.blog-cta p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    opacity: 0.95;
    color: white;
}

.blog-cta .btn {
    background: white;
    color: var(--dark-green);
    font-weight: bold;
    padding: 1rem 2.5rem;
    border: none;
}

.blog-cta .btn:hover {
    background: var(--beige);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .blog-article {
        padding: 1.5rem;
    }
    .blog-header h1 {
        font-size: 2.2rem;
    }
    .blog-image {
        margin: 0 -1.5rem 2rem -1.5rem;
    }
    .table-of-contents {
        float: none;
        width: 100%;
        margin-left: 0;
    }
    .blog-body blockquote {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
}
