/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #ffffff;
}

.page-blog__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 16px;
    box-sizing: border-box;
}

/* Hero Section (Main Title Area for Blog Page) */
.page-blog__hero-section {
    padding-top: 10px; /* Adhering to the 10px rule for non-shared header offset */
    padding-bottom: 40px;
    background-color: #f8f8f8; /* Light background for contrast */
}

.page-blog__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 40px 16px;
    gap: 24px;
}

.page-blog__hero-content {
    flex: 1 1 45%;
    min-width: 300px;
    color: #333333; /* Dark text for light background */
}

.page-blog__main-title {
    font-size: clamp(2.2em, 4vw, 2.8em); /* Clamp for H1 as per rule */
    font-weight: bold;
    color: #017439; /* Brand color for main title */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__description {
    font-size: 1.1em;
    margin-bottom: 25px;
}

.page-blog__hero-image {
    flex: 1 1 45%;
    text-align: center;
    min-width: 300px;
}

.page-blog__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* CTA Buttons */
.page-blog__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* For responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-blog__btn-primary {
    background-color: #017439; /* Main brand color */
    color: #ffffff;
    border: 2px solid #017439;
    margin-right: 10px;
}

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

.page-blog__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

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

/* Blog Posts Section */
.page-blog__posts-section {
    padding: 60px 0;
    background-color: #ffffff;
}

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

.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: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.page-blog__post-card:hover .page-blog__post-image {
    transform: scale(1.05);
}

.page-blog__post-title {
    font-size: 1.4em;
    color: #017439;
    padding: 15px 20px 0;
    margin-bottom: 10px;
    min-height: 70px; /* Ensure consistent title height */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-blog__post-meta {
    font-size: 0.9em;
    color: #666666;
    padding: 0 20px;
    margin-bottom: 10px;
}

.page-blog__post-excerpt {
    font-size: 1em;
    color: #555555;
    padding: 0 20px;
    margin-bottom: 15px;
    min-height: 70px; /* Consistent excerpt height */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.page-blog__read-more {
    display: block;
    color: #017439;
    font-weight: bold;
    padding: 0 20px 20px;
}

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

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

.page-blog__faq-list {
    max-width: 800px;
    margin: 0 auto;
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    list-style: none; /* Hide default marker for details */
}

.page-blog__faq-item[open] .page-blog__faq-question {
    border-bottom: 1px solid #eee;
}

/* Hide default marker for Webkit browsers */
.page-blog__faq-question::-webkit-details-marker {
    display: none;
}

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
}

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
    line-height: 1.7;
}

.page-blog__faq-answer p {
    margin: 0;
}

/* General image responsive styles (for all images in .page-blog) */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .page-blog {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-blog__container,
    .page-blog__hero-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* Prevent content overflow */
    }

    /* HERO Section */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Specific override for mobile */
        padding-bottom: 30px;
    }

    .page-blog__hero-container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 20px;
    }

    .page-blog__hero-content,
    .page-blog__hero-image {
        flex: 1 1 100%;
        min-width: unset;
    }

    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.2em); /* Adjust H1 size for mobile */
        text-align: center;
    }

    .page-blog__description {
        font-size: 1em;
        text-align: center;
    }

    /* CTA Buttons for mobile */
    .page-blog__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-right: 0 !important; /* Remove margin for stacked buttons */
        margin-bottom: 10px; /* Add space between stacked buttons */
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-blog__hero-content .page-blog__cta-button:last-child {
        margin-bottom: 0;
    }
    
    .page-blog__view-all-wrapper .page-blog__cta-button {
        max-width: 80% !important; /* Adjust width for single button */
        width: 100% !important;
        margin: 0 auto !important; /* Center the button */
    }

    /* Blog Posts Section */
    .page-blog__posts-section {
        padding: 40px 0;
    }

    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

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

    .page-blog__post-title {
        font-size: 1.2em;
        min-height: unset; /* Allow height to adjust */
        -webkit-line-clamp: unset; /* Remove line clamp for mobile */
    }

    .page-blog__post-excerpt {
        font-size: 0.95em;
        min-height: unset; /* Allow height to adjust */
        -webkit-line-clamp: unset; /* Remove line clamp for mobile */
    }

    /* FAQ Section */
    .page-blog__faq-section {
        padding: 40px 0;
    }

    .page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-blog__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95em;
    }

    /* General image responsive styles for mobile */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}