/* --- Blog Page Specific Styles --- */

/* --- Blog Hero Header --- */
.blog-header {
    position: relative;
    padding: 7rem 2rem;
    min-height: 50vh;
    text-align: center;
    color: white;
    background-image: url('/static/img/blog/blog-mobile.webp'); /* A relevant and warm image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(58, 90, 64, 0.7); /* Using your new --color-primary for the overlay */
    z-index: 1;
}

.blog-header h1,
.blog-header .lead-text {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.blog-header h1 {
    font-size: 3.5rem;
    color: white; /* Ensure heading is white */
}


/* --- Blog Grid Section --- */
.blog-grid-section {
    padding: 6rem 2rem;
    background-color: #FFFFFF;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: auto;
}

.blog-grid-empty {
    display: none;
}

/* --- Individual Blog Card Styling --- */
.blog-card {
    background: var(--color-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.blog-card-image-link img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image-link img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-source {
    color: var(--color-primary);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 0.7rem;
    text-transform: uppercase;
}

.blog-card-title {
    margin-top: 0;
    font-size: 1.8rem;
    line-height: 1.4;
}

.blog-card-title a {
    text-decoration: none;
    color: var(--color-secondary);
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--color-primary);
}

.blog-card-excerpt,
.blog-card-summary {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.75;
    margin: 0 0 1.5rem;
}

.blog-card-highlights {
    border-top: 1px solid #d9d4ca;
    margin-bottom: 2rem;
    padding-top: 1.35rem;
}

.blog-card-highlights-title {
    color: var(--color-secondary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.blog-card-highlights ul {
    color: #444;
    margin: 0;
    padding-left: 1.35rem;
}

.blog-card-highlights li {
    line-height: 1.55;
    margin-bottom: 0.55rem;
}

.blog-card-highlights li:last-child {
    margin-bottom: 0;
}

/* Make sure the button uses the new accent color */
.blog-card .btn-primary {
    align-self: flex-start;
    width: auto;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    background-color: var(--color-accent);
}

.blog-card .btn-primary:hover {
     background-color: #e96340; /* Darker shade of the accent color */
}


/* --- Blog index closing CTA --- */
.blog-index-cta {
    max-width: 800px;
    margin: 5rem auto 0;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--color-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.blog-index-cta h2 {
    margin-bottom: 1rem;
}

.blog-card .btn-text {
    align-self: flex-start;
    margin-top: auto;
}

.blog-empty-state {
    max-width: 820px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
    text-align: center;
    background: var(--color-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.blog-empty-state h2 {
    margin-top: 0;
}

.blog-empty-state-hidden {
    display: none;
}

/* --- Responsive adjustments for the blog grid --- */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-header {
        min-height: 40vh;
    }
     .blog-header h1 {
        font-size: 2.8rem;
    }
    .blog-card-content {
        padding: 1.5rem;
    }
    .blog-card-summary {
        font-size: 1rem;
    }
}

@media (min-width: 769px) {
    .blog-header { background-image: url('/static/img/blog/blog.webp'); }
}
