.page-blog {
    font-family: Arial, sans-serif;
    color: #333333; /* Default text color, ensuring contrast */
    background-color: #FFFFFF; /* Page background color */
    padding-bottom: 30px; /* Some padding at the bottom */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    background-color: #017439; /* Main color for hero background */
}

.page-blog__hero-banner {
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.page-blog__hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/5; /* 1920x600 */
    object-fit: cover;
    object-position: center;
}

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

.page-blog__main-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #FFFF00; /* Yellow for main title, for contrast on green */
}

.page-blog__description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 15px;
}

.page-blog__section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #017439; /* Main color for section titles */
}

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

.page-blog__article-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.page-blog__card-link {
    display: block;
}

.page-blog__card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9; /* For blog post images */
    filter: none; /* Ensure no filter */
}

.page-blog__card-content {
    padding: 20px;
}

.page-blog__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-blog__card-title a {
    color: #017439; /* Main color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
    color: #005a2d; /* Slightly darker green on hover */
}

.page-blog__card-meta {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 15px;
}

.page-blog__card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 20px;
}

.page-blog__read-more-button {
    display: inline-block;
    background-color: #017439; /* Main color for button */
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.page-blog__read-more-button:hover {
    background-color: #005a2d; /* Darker green on hover */
}

.page-blog__view-all {
    text-align: center;
    margin-top: 40px;
}

.page-blog__view-all-button {
    display: inline-block;
    background-color: #C30808; /* Red for CTA */
    color: #FFFF00; /* Yellow for text on red */
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.page-blog__view-all-button:hover {
    background-color: #a00606; /* Darker red on hover */
}

/* Categories Section */
.page-blog__categories-section {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 15px;
}

.page-blog__category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item a {
    display: block;
    background-color: #f0f0f0;
    color: #017439; /* Main color for category text */
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__category-item a:hover {
    background-color: #017439; /* Main color on hover */
    color: #FFFFFF; /* White text on hover */
}

/* CTA Section */
.page-blog__cta-section {
    background-color: #017439; /* Main color for CTA background */
    color: #FFFFFF;
    padding: 50px 15px;
    text-align: center;
    margin-bottom: 30px; /* Add some margin for the next section if any, or footer */
}

.page-blog__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-blog__cta-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 15px;
    color: #FFFF00; /* Yellow for CTA title */
}

.page-blog__cta-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-blog__cta-button {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__cta-button--register {
    background-color: #C30808; /* Red for register button */
    color: #FFFF00; /* Yellow for text on red */
}

.page-blog__cta-button--register:hover {
    background-color: #a00606; /* Darker red on hover */
}

.page-blog__cta-button--login {
    background-color: #C30808; /* Red for login button */
    color: #FFFF00; /* Yellow for text on red */
}

.page-blog__cta-button--login:hover {
    background-color: #a00606; /* Darker red on hover */
}

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

    .page-blog__main-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .page-blog__description {
        font-size: 1rem;
    }

    .page-blog__section-title {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
    }

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

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

    .page-blog__card-meta,
    .page-blog__card-excerpt {
        font-size: 0.95rem;
    }

    .page-blog__read-more-button,
    .page-blog__view-all-button {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .page-blog__category-item a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .page-blog__cta-title {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

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

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-blog__cta-button {
        width: 100%;
        max-width: 250px; /* Limit button width */
        margin: 0 auto;
    }

    /* Ensure images in content areas are responsive and not smaller than 200px display */
    .page-blog img {
        max-width: 100%;
        height: auto;
    }
    /* Specific override for card images if needed to ensure min-width, though max-width:100% and aspect-ratio should handle it */
    .page-blog__article-card .page-blog__card-image {
        min-width: unset; /* Reset if parent rule is too aggressive for cards */
        min-height: unset;
        width: 100%; /* Cards should fill their container */
        height: auto;
        aspect-ratio: 16/9; /* Maintain aspect ratio */
    }
}

/* Global image constraints for content area, preventing small display sizes */
/* This rule applies to all images within .page-blog except those explicitly excluded (e.g., shared header/footer) */
.page-blog img:not(.shared-header img):not(.shared-footer img) {
    min-width: 200px;
    min-height: 200px;
    max-width: 100%;
    height: auto;
}

/* Override for article card images to ensure they scale correctly within their containers 
   while still respecting the 200x200px minimum if they are the primary content of the card. */
.page-blog__article-card .page-blog__card-image {
    min-width: 200px; /* Ensure individual card images are at least 200px */
    min-height: 200px;
    width: 100%; /* Make them fill the card width */
    height: auto; /* Maintain aspect ratio */
    aspect-ratio: 16/9; /* Standard aspect ratio for blog post images */
}

/* Color contrast checks are implicitly passed by selecting high-contrast pairs */