/* ==========================================================================
   7. CULINARY JOURNAL BLOG LAYOUT COMPONENT
   ========================================================================== */

.blog-feed-section {
    background-color: var(--bg-soft-tan);
    background-image: url('../img/blog-bg.webp'), url('../img/blog-bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-blend-mode: soft-light;
    padding: 60px 0 80px;
}

.blog-header-block {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.blog-header-block h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--dark-teal);
    margin-bottom: 12px;
}

.blog-header-block p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.5;
}

/* --- Blog Grid Base & Card Framework --- */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.blog-card {
    position: relative; /* Essential relative anchor for the pseudo-element link mask */
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(8, 33, 33, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 190px; /* Bounded height prevents cards from stretching too tall */
    overflow: hidden;
    background-color: var(--dark-teal);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-teal);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 6; /* Keeps tag visible above clickable background blanket layer */
}

/* --- Card Typography & Inner Box Elements --- */
.blog-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 12px;
}

.blog-meta-divider {
    color: var(--accent-tan);
}

.blog-card-content h2 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card-content h2 a {
    color: var(--dark-teal);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

/* Full-Card Click Layer Blanket (No structural HTML clutter required) */
.blog-card-content h2 a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

.blog-card-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1; /* Automatically balances text gaps to push buttons perfectly to baseline */
}

.blog-read-more {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 6;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

/* --- Global Hover Animation State Management --- */
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(8, 33, 33, 0.12);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card:hover h2 a,
.blog-card:hover .blog-read-more {
    color: var(--primary-teal);
}

.blog-read-more:hover {
    color: var(--dark-teal);
    transform: translateX(4px);
}

/* ==========================================================================
   MEDIA QUERIES - FORCES GRID ITEMS INTO ONE ROW ON LARGE VIEWPORTS
   ========================================================================== */
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr); /* Locks cards onto the same horizontal row layout track */
    }
    
    .blog-header-block h1 {
        font-size: 2.8rem;
    }
}