
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Color Palette from Reference */
:root {
    --primary-green: #2A513A;
    --light-cream: #F5EDD7;
    --accent-green: #8BA989;
    --text-dark: #1A2E22;
    --text-light: #FFFFFF;
}

/* Container */
.container-blog {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-blog {
    background-color: var(--primary-green);
    color: var(--text-light);
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 50px;
}

.hero-blog h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-blog p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Blog Gallery */
.blog-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog Card */
.blog-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensure all cards take full height of their grid cell */
}

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

/* Horizontal Card Layout */
.card-horizontal {
    display: flex;
    flex-direction: column;
}

.card-horizontal .card-image {
    height: 200px;
}

.card-horizontal .card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to grow and fill space */
}

/* Vertical Card Layout */
.card-vertical {
    display: flex;
    flex-direction: column;
}

.card-vertical .card-image {
    height: 200px;
}

.card-vertical .card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to grow and fill space */
}

/* Card Elements */
.card-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 10px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1; /* Push the link to the bottom */
}

.card-link {
    display: inline-block;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-green);
    padding-bottom: 2px;
    transition: all 0.2s ease;
    margin-top: auto; /* Push link to bottom of card */
}

.card-link:hover {
    color: var(--accent-green);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Media Queries */
@media (min-width: 768px) {
    .blog-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(300px, auto); /* Set minimum row height */
    }

    .card-vertical {
        flex-direction: row;
        height: 100%; /* Take full height of grid cell */
        min-height: 220px;
    }

    .card-vertical .card-image {
        width: 40%;
        height: auto; /* Let height adjust naturally */
        min-height: 100%; /* Ensure image covers full height */
    }

    .card-vertical .card-content {
        width: 60%;
    }
    
    /* Make featured card span full width on tablet */
    .blog-card.featured {
        grid-column: span 2;
    }
}

@media (min-width: 992px) {
    .blog-gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto; /* Two explicit rows */
    }
    
    /* First row layout */
    .blog-card.featured {
        grid-column: span 2; /* Span 2 columns */
        grid-row: 1; /* Place in first row */
    }
    
    /* Position the third card in the first row */
    .blog-gallery > div:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }
    
    /* Second row layout - cards 4, 5, 6 */
    .blog-gallery > div:nth-child(4),
    .blog-gallery > div:nth-child(5),
    .blog-gallery > div:nth-child(6) {
        grid-row: 2;
    }
}