/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    color: #333333; /* Dark text for light body background (white) */
    line-height: 1.6;
    background-color: #FFFFFF; /* Assuming body background is white or light */
}

/* Hero Section */
.page-blog__hero-section {
    background-color: #f8f8f8; /* Light background for the banner */
    padding-top: 10px; /* Small top padding, assuming body handles header offset */
    padding-bottom: 40px;
    text-align: center;
}

.page-blog__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 16px;
}

.page-blog__hero-title {
    font-size: clamp(1.8em, 5vw, 2.8em); /* Single clamp for responsive font size */
    font-weight: bold;
    color: #017439; /* Brand color for main title */
    margin-bottom: 15px;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__hero-description {
    font-size: 1.1em;
    color: #555555;
    max-width: 800px;
    margin: 0 auto;
}

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

.page-blog__articles-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-blog__articles-heading {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

.page-blog__article-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px 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 20px rgba(0, 0, 0, 0.15);
}

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-blog__article-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

.page-blog__article-image {
    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; /* Brand color for article titles */
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: bold;
}

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

.page-blog__article-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 15px;
}

.page-blog__read-more {
    display: inline-block;
    color: #017439;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog__read-more:hover {
    color: #005a2d; /* Slightly darker green on hover */
}

/* Pagination */
.page-blog__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.page-blog__pagination-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #333333;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__pagination-item:hover,
.page-blog__pagination-item.is-active {
    background-color: #017439;
    color: #ffffff;
}

.page-blog__pagination-dots {
    color: #777777;
    font-weight: bold;
}


/* CTA Section */
.page-blog__cta-section {
    background-color: #017439; /* Brand primary color for dark section */
    color: #ffffff; /* White text for dark background */
    padding: 80px 16px;
    text-align: center;
}

.page-blog__cta-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-blog__cta-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__cta-description {
    font-size: 1.2em;
    margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%; /* Ensure buttons don't overflow */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__btn-primary {
    background-color: #C30808; /* Red for primary action (Register) */
    color: #FFFF00; /* Yellow text for contrast */
    border: 2px solid #C30808;
}

.page-blog__btn-primary:hover {
    background-color: #e00b0b; /* Darker red on hover */
    border-color: #e00b0b;
}

.page-blog__btn-secondary {
    background-color: #FFFFFF; /* White background for secondary action (Login) */
    color: #017439; /* Brand green text */
    border: 2px solid #FFFFFF;
}

.page-blog__btn-secondary:hover {
    background-color: #f0f0f0; /* Light gray on hover */
    border-color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.page-blog__faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-blog__faq-heading {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-blog__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-blog__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.page-blog__faq-item details > summary {
    list-style: none; /* Hide default marker */
}

.page-blog__faq-item details > summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #fdfdfd;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-question {
    background-color: #f0f0f0;
    border-bottom: none;
}

.page-blog__faq-question:hover {
    background-color: #f0f0f0;
}

.page-blog__faq-qtext {
    flex-grow: 1;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: normal;
    color: #017439;
    margin-left: 15px;
}

.page-blog__faq-answer {
    padding: 15px 20px 20px;
    font-size: 1em;
    color: #555555;
    background-color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-title {
        font-size: clamp(1.6em, 4vw, 2.5em);
    }
    .page-blog__hero-description {
        font-size: 1em;
    }
    .page-blog__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-blog__cta-title {
        font-size: 2em;
    }
    .page-blog__cta-description {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    /* HERO Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Fixed header offset handled by body, small top padding for section */
        padding-bottom: 30px;
    }
    .page-blog__hero-container {
        padding: 15px 15px;
    }
    .page-blog__hero-title {
        font-size: clamp(1.5em, 6vw, 2.2em); /* Adjust clamp for mobile */
        margin-bottom: 10px;
        max-width: 100%;
        text-align: center;
    }
    .page-blog__hero-description {
        font-size: 0.95em;
        text-align: center;
        max-width: 100%;
    }

    /* Articles Section */
    .page-blog__articles-section {
        padding: 40px 0;
    }
    .page-blog__articles-container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__articles-heading {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }
    .page-blog__article-image-wrapper {
        height: 180px; /* Adjust image height for mobile */
    }
    .page-blog__article-title {
        font-size: 1.2em;
    }
    .page-blog__article-excerpt {
        font-size: 0.95em;
    }

    /* Pagination */
    .page-blog__pagination {
        gap: 8px;
    }
    .page-blog__pagination-item {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    /* CTA Section */
    .page-blog__cta-section {
        padding: 50px 15px;
    }
    .page-blog__cta-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__cta-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-blog__cta-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }
    .page-blog__faq-container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__faq-heading {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-blog__faq-question {
        padding: 15px;
        font-size: 1em;
    }
    .page-blog__faq-toggle {
        font-size: 1.2em;
    }
    .page-blog__faq-answer {
        padding: 10px 15px 15px;
        font-size: 0.95em;
    }

    /* General image and container rules for mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__article-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by inner elements, or specific sections */
    }
    /* Reset padding for outer containers to allow inner elements to control spacing */
    .page-blog__articles-container,
    .page-blog__cta-container,
    .page-blog__faq-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-blog__articles-section .page-blog__article-card, /* Ensure cards have padding */
    .page-blog__faq-section .page-blog__faq-item {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}