/* 
 * Blog Styles for Legacies Management Website
 * Styles for blog listing page and individual blog posts
 */

/* ===== Blog Listing Page ===== */
.blog-hero {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12rem 0 8rem;
    margin-top: 8rem;
    text-align: center;
    height: 40vh;
    min-height: 30rem;
    display: flex;
    align-items: center;
}

.blog-hero .container {
    width: 100%;
}

.blog-hero h1 {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.blog-hero p {
    font-size: 1.8rem;
    max-width: 70rem;
    margin: 0 auto;
}

/* Blog Filters */
.blog-filters {
    padding: 4rem 0 2rem;
    background-color: var(--secondary-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.filter-btn {
    padding: 1rem 2rem;
    background-color: white;
    border: 0.2rem solid var(--border-color);
    border-radius: 3rem;
    font-family: var(--heading-font);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-text);
}

/* Blog Grid */
.blog-grid {
    padding: 4rem 0 8rem;
    background-color: var(--secondary-color);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(35rem, 1fr));
    gap: 4rem;
    margin-top: 3rem;
}

/* Article Card */
.article-card {
    background-color: white;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: 25rem;
    object-fit: cover;
    background-color: var(--border-color);
}

.article-content {
    padding: 3rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #666;
}

.article-category {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.article-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--accent-color);
}

.article-excerpt {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
    gap: 1rem;
}

/* ===== Individual Blog Post ===== */
.post-hero {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12rem 0 6rem;
    margin-top: 8rem;
    height: 40vh;
    min-height: 30rem;
    display: flex;
    align-items: center;
}

.post-hero .container {
    width: 100%;
}

.post-hero-content {
    max-width: 80rem;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.post-category {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 2rem;
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin-bottom: 2rem;
}

.post-hero h1 {
    color: var(--light-text);
    font-size: 4.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Post Content */
.post-content {
    padding: 6rem 0;
    background-color: white;
}

.post-body {
    max-width: 80rem;
    margin: 0 auto;
}

.post-body p {
    font-size: 1.8rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.post-body h2 {
    font-size: 3.2rem;
    margin-top: 5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.post-body h3 {
    font-size: 2.6rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.post-body h4 {
    font-size: 2.2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 2.5rem;
    padding-left: 3rem;
}

.post-body li {
    font-size: 1.8rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    list-style: disc;
}

.post-body ol li {
    list-style: decimal;
}

.post-body blockquote {
    margin: 3rem 0;
    padding: 2.5rem 3rem;
    background-color: var(--secondary-color);
    border-left: 0.5rem solid var(--accent-color);
    font-size: 2rem;
    font-style: italic;
    color: var(--primary-color);
}

.post-body blockquote p {
    margin-bottom: 0;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.8rem;
    margin: 3rem 0;
}

.post-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

.post-body a:hover {
    color: var(--primary-color);
}

.post-body .post-highlight {
    background-color: var(--secondary-color);
    border-left: 0.4rem solid var(--accent-color);
    padding: 2rem 2.5rem;
    margin: 3rem 0;
    border-radius: 0.4rem;
}

.post-body .post-highlight p {
    margin-bottom: 0;
}

.post-body .lead {
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--primary-color);
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* Post Footer */
.post-footer {
    max-width: 80rem;
    margin: 5rem auto 0;
    padding-top: 4rem;
    border-top: 0.1rem solid var(--border-color);
}

.post-share {
    text-align: center;
}

.post-share h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.4rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.4rem;
    font-family: var(--heading-font);
    font-size: 1.4rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-0.2rem);
}

.share-btn i {
    font-size: 1.6rem;
}

/* Related Articles */
.related-articles {
    padding: 6rem 0;
    background-color: var(--secondary-color);
}

.related-articles .section-header {
    margin-bottom: 4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 3rem;
}

/* Back to Blog */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15);
    padding: 1rem 2rem;
    border-radius: 0.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-to-blog:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    gap: 1.2rem;
    transform: translateX(-0.3rem);
}

.back-to-blog i {
    transition: transform 0.3s ease;
}

.back-to-blog:hover i {
    transform: translateX(-0.3rem);
}

/* Back to Blog at top of hero */
.post-hero .back-to-blog-top {
    position: absolute;
    top: -4rem;
    left: 0;
}

/* Back to Blog at bottom of content */
.back-to-blog-bottom {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    padding: 1.2rem 2.4rem;
    border-radius: 0.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 4rem;
}

.back-to-blog-bottom:hover {
    background-color: var(--primary-color);
    color: white;
    gap: 1.2rem;
    transform: translateX(-0.3rem);
}

.back-to-blog-bottom i {
    transition: transform 0.3s ease;
}

.back-to-blog-bottom:hover i {
    transform: translateX(-0.3rem);
}

/* ===== Responsive Styles ===== */
@media screen and (max-width: 768px) {

    .blog-hero,
    .post-hero {
        padding: 10rem 0 6rem;
    }

    .blog-hero h1,
    .post-hero h1 {
        font-size: 3.6rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .filter-buttons {
        gap: 1rem;
    }

    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1.3rem;
    }

    .post-body p {
        font-size: 1.6rem;
    }

    .post-body h2 {
        font-size: 2.8rem;
    }

    .post-body h3 {
        font-size: 2.2rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 6rem 2rem;
}

.no-results h3 {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.no-results p {
    font-size: 1.6rem;
    color: var(--text-color);
}