.page-blog {
    font-family: 'Arial', sans-serif;
    background-color: #0a0a0a; /* Ensure consistency with body background */
    color: #ffffff; /* Light text for dark background */
    line-height: 1.6;
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 70vh; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.page-blog__hero-content {
    position: relative; /* Ensure content is above any potential background layers */
    z-index: 2; /* Ensure text is on top if there's any overlay */
    padding: 30px 20px;
    max-width: 800px;
    margin-top: -100px; /* Overlap slightly with image for visual appeal, but not cover it */
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent dark background for text readability */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
    font-weight: bold;
    color: #26A9E0; /* Primary color for title */
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-blog__description {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow word breaking */
}

.page-blog__btn-primary {
    background-color: #26A9E0; /* Primary color */
    color: #ffffff;
    border: 2px solid #26A9E0;
    margin-right: 15px;
}

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

.page-blog__btn-secondary {
    background-color: transparent;
    color: #26A9E0; /* Primary color */
    border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Primary color */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 60px;
    font-weight: bold;
}

/* Latest Posts Grid */
.page-blog__latest-posts {
    padding-bottom: 60px;
}

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

.page-blog__post-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-blog__post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    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;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
}

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

.page-blog__post-excerpt {
    font-size: 1em;
    color: #e0e0e0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.page-blog__read-more {
    color: #26A9E0;
    font-weight: bold;
    align-self: flex-start;
}

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

/* Categories Section */
.page-blog__categories {
    padding-bottom: 60px;
}

.page-blog__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-blog__category-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid transparent;
}

.page-blog__category-item:hover {
    background-color: #26A9E0;
    border-color: #26A9E0;
}

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

.page-blog__featured-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 30px;
}

@media (min-width: 768px) {
    .page-blog__featured-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on larger screens */
    }
}

.page-blog__featured-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__featured-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-blog__featured-image {
    width: 100%;
    height: 338px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-blog__featured-title {
    font-size: 1.6em;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
}

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

.page-blog__featured-excerpt {
    font-size: 1em;
    color: #e0e0e0;
    margin-bottom: 15px;
    line-height: 1.5;
}


/* Call to Action Section */
.page-blog__call-to-action {
    background: linear-gradient(45deg, #26A9E0, #1e87bb); /* Gradient background with primary color */
    padding: 80px 20px;
    text-align: center;
    border-radius: 10px;
    margin: 60px auto;
    max-width: 1200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-blog__cta-description {
    font-size: 1.2em;
    color: #f0f0f0;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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


/* FAQ Section */
.page-blog__faq-section {
    padding-bottom: 80px;
}

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

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

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

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

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

.page-blog__faq-answer {
    padding: 20px;
    font-size: 1em;
    color: #e0e0e0;
    line-height: 1.6;
    background-color: rgba(255, 255, 255, 0.05);
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__main-title {
        font-size: clamp(2em, 5vw, 2.8em);
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__cta-title {
        font-size: 2.2em;
    }
    .page-blog__post-image,
    .page-blog__featured-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-blog__container {
        padding: 0 15px; /* Mobile padding */
    }

    /* Images */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__hero-section,
    .page-blog__latest-posts,
    .page-blog__categories,
    .page-blog__featured-posts,
    .page-blog__call-to-action,
    .page-blog__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow: hidden !important; /* Ensure no overflow */
    }
    
    .page-blog__hero-section {
        padding-top: 10px !important; /* body already has padding-top */
        padding-bottom: 40px !important;
    }

    .page-blog__hero-content {
        margin-top: -60px;
        padding: 20px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em) !important;
        margin-bottom: 10px;
    }

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

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px; /* Stack buttons */
        padding: 12px 20px;
    }

    .page-blog__cta-buttons {
        flex-direction: column !important; /* Stack CTA buttons */
        gap: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-blog__post-grid {
        grid-template-columns: 1fr; /* Single column for blog posts */
    }

    .page-blog__post-image,
    .page-blog__featured-image {
        height: 180px;
    }

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

    .page-blog__category-list {
        flex-direction: column;
        align-items: center;
    }

    .page-blog__category-item {
        width: 100%;
        text-align: center;
        max-width: 300px;
    }

    .page-blog__cta-title {
        font-size: 1.8em;
    }

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

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

    .page-blog__faq-answer {
        padding: 15px;
    }
}