.page-blog {
    background-color: #F4F7FB;
    color: #1F2D3D;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* General padding for bottom */
}

/* Header offset handled by body padding-top in shared.css, so main's first child needs minimal top padding */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #2F6BFF; /* Fallback for image loading */
    padding-bottom: 40px; /* Padding below content */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    /* Ensure image wrapper doesn't take up too much space before content */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.page-blog__hero-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 600px; /* Limit hero image height */
}

.page-blog__hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0; /* Minimal top padding */
    text-align: center;
    color: #FFFFFF; /* Text on hero background */
}

.page-blog__main-title {
    font-size: clamp(2rem, 4vw, 3rem); /* H1 font size clamp */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.page-blog__lead-paragraph {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #F4F7FB; /* Slightly off-white for contrast */
}

.page-blog__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-width: 150px; /* Ensure button is not too small */
    text-align: center;
}

.page-blog__cta-button:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    transform: translateY(-2px);
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__posts-section {
    padding: 60px 0;
    background-color: #F4F7FB;
}

.page-blog__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #1F2D3D;
}

.page-blog__posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-blog__post-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Ensure cards have a minimum height */
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #D6E2FF;
}

.page-blog__post-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to grow */
    display: flex;
    flex-direction: column;
}

.page-blog__post-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1F2D3D;
    line-height: 1.3;
    flex-grow: 1; /* Allow title to take up available space */
}

.page-blog__post-date {
    font-size: 0.85rem;
    color: #6FA3FF; /* Secondary color for date */
    margin-bottom: 10px;
    display: block;
}

.page-blog__post-excerpt {
    font-size: 0.95rem;
    color: #1F2D3D;
    margin-bottom: 15px;
}

.page-blog__pagination {
    text-align: center;
    margin-top: 50px;
}

.page-blog__view-all-button {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__view-all-button:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    transform: translateY(-2px);
}

.page-blog__cta-section {
    background-color: #2F6BFF;
    padding: 80px 0;
    text-align: center;
    color: #FFFFFF;
}

.page-blog__cta-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.page-blog__cta-description {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    max-width: 900px;
    margin: 0 auto 40px;
    color: #F4F7FB;
}

.page-blog__cta-button--large {
    padding: 16px 35px;
    font-size: 1.15rem;
    min-width: 200px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .page-blog__hero-content {
        padding: 20px;
    }

    .page-blog__main-title {
        font-size: 2.2rem;
    }

    .page-blog__lead-paragraph {
        font-size: 1rem;
    }

    .page-blog__section-title {
        font-size: 2rem;
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .page-blog__post-card {
        min-height: auto; /* Allow height to adjust */
    }

    .page-blog__post-image {
        height: 200px; /* Adjust image height for smaller screens */
    }

    .page-blog__post-title {
        font-size: 1.2rem;
    }

    .page-blog__post-excerpt {
        font-size: 0.9rem;
    }

    .page-blog__cta-section {
        padding: 50px 20px;
    }

    .page-blog__cta-title {
        font-size: 2.2rem;
    }

    .page-blog__cta-description {
        font-size: 1rem;
    }

    /* Important: Mobile overflow prevention */
    .page-blog__posts-section img,
    .page-blog__hero-section img {
        max-width: 100%;
        height: auto;
    }
}

/* Ensure content area images are not too small */
.page-blog__posts-grid .page-blog__post-image {
    min-width: 200px;
    min-height: 200px; /* Ensure minimum dimensions */
    width: 100%; /* Override to ensure it takes full width of card */
    height: 225px; /* Maintain aspect ratio or fixed height if desired */
}