.page-blog {
    font-family: Arial, sans-serif;
    color: #333333;
    line-height: 1.6;
    background-color: var(--background-color, #FFFFFF); /* Fallback to white if var not defined */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px; /* Space between image and text */
}

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

.page-blog__main-title {
    font-size: clamp(2em, 3.5vw, 3em); /* Use clamp for H1 */
    font-weight: 700;
    line-height: 1.2;
    color: #26A9E0;
    margin-bottom: 20px;
}

.page-blog__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #555555;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-blog__btn-primary {
    background-color: #26A9E0;
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

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

.page-blog__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #1a8ccb;
    border-color: #1a8ccb;
}

/* General Section Styling */
.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

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

.page-blog__section-intro {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #555555;
}

.page-blog__content-area {
    padding: 60px 0;
}

/* Background colors for sections for contrast */
.page-blog__dark-bg {
    background-color: #26A9E0;
    color: #FFFFFF;
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__description,
.page-blog__dark-bg p {
    color: #FFFFFF; /* Ensure text is white on dark background */
}

.page-blog__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__description,
.page-blog__light-bg p {
    color: #333333; /* Ensure text is dark on light background */
}

/* Featured Posts Grid */
.page-blog__featured-posts {
    padding: 60px 0;
}

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

.page-blog__post-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;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have same height */
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px 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: 220px; /* Fixed height for consistent image size */
    object-fit: cover;
    display: block;
}

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

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #26A9E0;
    margin-bottom: 10px;
    flex-grow: 1; /* Allow title to take available space */
}

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

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

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

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

.page-blog__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__faq-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: #26A9E0;
    cursor: pointer;
    background-color: #f9f9f9;
    user-select: none;
    list-style: none; /* Remove default marker for details summary */
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #26A9E0;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to cross */
}

.page-blog__faq-answer {
    padding: 15px 25px 25px 25px;
    font-size: 1em;
    color: #555555;
    border-top: 1px solid #e0e0e0;
}

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


/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #26A9E0; /* Brand color background */
    color: #FFFFFF;
}

.page-blog__cta-section .page-blog__section-title {
    color: #FFFFFF; /* White title on brand color background */
}

.page-blog__cta-section .page-blog__description {
    color: #FFFFFF;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(1.8em, 4vw, 2.5em);
    }

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

    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px;
    }
}

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

    .page-blog__hero-section {
        padding: 30px 15px;
        padding-top: 10px !important; /* body handles --header-offset */
    }

    .page-blog__main-title {
        font-size: clamp(1.6em, 6vw, 2.2em) !important; /* Ensure H1 is not too large */
        margin-bottom: 15px;
    }

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

    .page-blog__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain button group width */
        margin: 0 auto;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 15px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-blog__container {
        padding: 0 15px;
    }

    .page-blog__section-title {
        font-size: 1.8em;
        padding-top: 30px;
    }

    .page-blog__section-intro {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-blog__content-area,
    .page-blog__featured-posts,
    .page-blog__faq-section,
    .page-blog__cta-section {
        padding: 40px 0;
    }

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

    .page-blog__post-image {
        height: 180px; /* Adjust image height for mobile cards */
    }

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

    /* All images must be responsive */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* All image containers must be responsive */
    .page-blog__hero-image-wrapper,
    .page-blog__post-card,
    .page-blog__post-link {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* General containers for mobile padding */
    .page-blog__section,
    .page-blog__card,
    .page-blog__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* FAQ item padding for mobile */
    .page-blog__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-blog__faq-answer {
        padding: 10px 20px 20px 20px;
    }
}