/* === BLOG HERO SECTION === */
.blog-hero {
    background: linear-gradient(180deg, #f0ede6 0%, var(--bg-color) 100%);
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    text-align: center;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
}

.blog-hero h1 {
    font-size: 3.5rem;
    color: var(--primary-dark);
}

.blog-hero .hero-subtitle {
    font-size: 1.2rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* === NEW: FILTERS & SEARCH SECTION === */
.filter-search-section {
    padding-top: 2rem;
    padding-bottom: 0;
    /* No bottom padding */
    margin-bottom: -1rem;
    /* Overlap slightly with section below */
}

.filter-search-container {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-weight: 600;
    color: var(--primary-dark);
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg-color);
    color: var(--text-dark);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--light-bg-inner);
}

.filter-btn.active {
    background-color: var(--primary-dark);
    color: var(--text-light);
    border-color: var(--primary-dark);
}

.search-bar {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    background-color: var(--card-bg-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#search-input {
    padding: 0.6rem 1rem;
    border: none;
    outline: none;
    font-size: 0.95rem;
    flex-grow: 1;
    background-color: transparent;
}

#search-btn {
    padding: 0.6rem 1rem;
    border: none;
    background-color: var(--primary-dark);
    color: var(--text-light);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-btn:hover {
    background-color: #2a3644;
}

/* === ALL POSTS SECTION === */
/* Uses .section--card style */
/* Blog grid/card styles inherited from style.css */
#blog-grid .blog-card {
    cursor: pointer;
}

#blog-grid .blog-card-content {
    justify-content: space-between;
}

#blog-grid .post-excerpt-grid {
    min-height: 40px;
}


/* === BLOG MODAL SPECIFIC STYLES === */
.modal-content.blog-modal-content {
    max-width: 800px;
}

.modal-post-content .media-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
    background-color: #000;
}

.modal-post-content .media-container img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-post-tag {
    display: inline-block;
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.modal-post-title {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.modal-post-meta {
    font-size: 1rem;
    color: var(--secondary-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-post-full-content {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
}


/* === BLOG PAGE SPECIFIC MEDIA QUERIES === */
@media screen and (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .filter-search-container {
        flex-direction: column;
        align-items: stretch;
    }

    /* Stack filters and search */
    .search-bar {
        width: 100%;
    }

    /* Full width search */
    .modal-post-title {
        font-size: 1.8rem;
    }
}