.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #ffffff; /* Explicitly set for content area */
}

.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
    text-align: center;
    background-color: #f8f8f8;
    overflow: hidden;
}

.page-blog__image-wrap {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 20px;
}

.page-blog__hero-section img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-blog__hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__main-title {
    font-size: 2.8em;
    font-weight: 700;
    color: #017439;
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__subtitle {
    font-size: 1.2em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-blog__btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-blog__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color */
    border: 2px solid #C30808;
}

.page-blog__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-blog__btn-secondary {
    background-color: #017439; /* Using primary brand color for secondary CTA */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-blog__btn-secondary:hover {
    background-color: #005f2e;
    border-color: #005f2e;
}

.page-blog__articles-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.page-blog__section-title {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-blog__section-intro {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.page-blog__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__article-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    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.1);
}

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%; /* Ensure entire card is clickable */
}

.page-blog__article-figure {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 200px; /* Fixed height for consistent card images */
    overflow: hidden;
}

.page-blog__article-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-blog__article-title {
    font-size: 1.4em;
    color: #017439;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.page-blog__article-meta {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 15px;
}

.page-blog__article-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limit excerpt to 5 lines for more content */
    -webkit-box-orient: vertical;
}

.page-blog__read-more {
    display: inline-block;
    color: #017439;
    font-weight: 600;
    text-decoration: underline;
}

.page-blog__read-more:hover {
    color: #005f2e;
}

.page-blog__promo-section {
    background-color: #017439; /* Primary brand color for dark section */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

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

.page-blog__promo-title {
    font-size: 2.5em;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-blog__promo-description {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 40px;
}

.page-blog__btn-promo {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color */
    border: 2px solid #C30808;
}

.page-blog__btn-promo:hover {
    background-color: #a00606;
    border-color: #a00606;
}

/* Ensure images meet minimum size requirements for content display */
.page-blog img {
    min-width: 200px;
    min-height: 200px;
}
.page-blog__article-figure img {
    min-width: 200px;
    min-height: 200px;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: 2.4em;
    }
    .page-blog__subtitle,
    .page-blog__section-intro {
        font-size: 1.1em;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__promo-title {
        font-size: 2.2em;
    }
    .page-blog__articles-grid {
        gap: 20px;
    }
    .page-blog__article-figure {
        height: 180px;
    }
}

@media (max-width: 768px) {
    /* 1. Top section title + Dual CTA */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
        padding-bottom: 30px;
    }
    .page-blog__main-title {
        font-size: 2em;
        padding: 0 15px;
    }
    .page-blog__subtitle,
    .page-blog__section-intro {
        font-size: 1em;
        padding: 0 15px;
    }
    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-blog__btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__cta-buttons .page-blog__btn-primary,
    .page-blog__cta-buttons .page-blog__btn-secondary,
    .page-blog__promo-section .page-blog__btn-promo {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 2. Single column content container */
    .page-blog__articles-section {
        padding: 40px 0;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 25px;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        padding: 0 15px;
        margin-bottom: 30px;
    }
    .page-blog__article-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__article-figure {
        height: 160px; /* Adjust height for smaller screens */
    }
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__promo-section {
        padding: 50px 15px;
    }
    .page-blog__promo-title {
        font-size: 1.8em;
    }
    .page-blog__promo-description {
        font-size: 1em;
    }

    /* 3. General images and figure */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-blog__image-wrap,
    .page-blog__article-figure {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    /* 4. Buttons and button containers (already covered above in top section and promo section) */
    .page-blog a[class*="btn"],
    .page-blog a[class*="button"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* For vertical stacking of buttons */
    }

    /* 5. Registration tutorial and FAQ blocks (general text readability) */
    .page-blog p,
    .page-blog li {
        font-size: 15px; /* Slightly increase font size for readability */
        line-height: 1.7;
    }
    .page-blog h2, .page-blog h3, .page-blog h4 {
        word-wrap: break-word; /* Ensure long titles wrap */
        hyphens: auto;
    }
}