:root {
    --primary-color: #2F6BFF;
    --secondary-color: #6FA3FF;
    --button-gradient: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    --card-bg: #FFFFFF;
    --background-color: #F4F7FB; /* Body background color */
    --text-main: #1F2D3D;
    --border-color: #D6E2FF;
    --glow-color: #A5C4FF;
}

/* Base styles for the blog page, respecting body background from shared.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Dark text for light body background */
    background-color: var(--background-color); /* Matches the light background from shared.css */
}

.page-blog__section {
    padding: 60px 20px;
    margin-bottom: 20px;
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-blog__section-title {
    font-size: clamp(24px, 4vw, 36px); /* Responsive font size for titles */
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__section-description {
    font-size: 18px;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* HERO Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    /* body { padding-top: var(--header-offset); } handles main offset */
    padding-top: 10px; /* Small top padding for aesthetic */
    background-color: var(--background-color);
}

.page-blog__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure it takes full width within max-width */
}

.page-blog__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-blog__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    /* No filter allowed */
}

.page-blog__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

.page-blog__main-title {
    font-size: clamp(32px, 5vw, 50px); /* Responsive font size for H1 */
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-gradient);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    max-width: 100%; /* For mobile responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-blog__cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Latest Posts Section */
.page-blog__latest-posts {
    background-color: var(--background-color);
}

.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: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-blog__post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-blog__post-link {
    text-decoration: none;
    color: var(--text-main);
    display: block;
}

.page-blog__post-image {
    width: 100%;
    height: 225px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    /* No filter allowed */
}

.page-blog__post-content {
    padding: 25px;
}

.page-blog__post-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--text-main);
}

.page-blog__post-excerpt {
    font-size: 16px;
    color: #666666;
    margin-bottom: 20px;
}

.page-blog__post-date {
    font-size: 14px;
    color: #999999;
    display: block;
}

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

/* FAQ Section */
.page-blog__faq-section {
    background-color: #F8F9FA; /* Slightly different background for visual separation */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

details.page-blog__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
details.page-blog__faq-item summary.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    font-weight: bold;
    color: var(--text-main);
    font-size: 18px;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
    display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
    background: #f0f4ff; /* Lighter hover for FAQ question */
}
.page-blog__faq-qtext {
    flex: 1;
    line-height: 1.5;
    text-align: left;
}
.page-blog__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-left: 20px;
    width: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}
details.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to cross when open */
}
details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 25px 25px;
    background: #fcfdff; /* Slightly different background for answer */
    border-radius: 0 0 10px 10px;
    color: #555555;
    font-size: 16px;
}

/* Bottom CTA Section */
.page-blog__cta-bottom-section {
    background: var(--button-gradient); /* Use gradient for this section's background */
    color: #ffffff; /* White text for dark gradient background */
    padding: 80px 20px;
    text-align: center;
    border-radius: 10px;
    margin: 40px auto;
}

.page-blog__cta-bottom-section .page-blog__section-title {
    color: #ffffff;
    margin-bottom: 25px;
}

.page-blog__cta-bottom-section .page-blog__section-description {
    color: #e0e0e0;
    margin-bottom: 30px;
}

/* Text alignment helper */
.page-blog__text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-blog__posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    .page-blog__post-title {
        font-size: 20px;
    }
    .page-blog__post-excerpt {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-blog__hero-section {
        padding-top: 10px !important; /* Ensure small top padding on mobile */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__main-title {
        font-size: clamp(28px, 8vw, 40px);
        margin-bottom: 15px;
    }
    .page-blog__hero-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .page-blog__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important; /* Force full width on mobile */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-top: 15px;
    }
    
    .page-blog__section {
        padding: 40px 15px;
    }
    .page-blog__section-title {
        font-size: clamp(22px, 6vw, 30px);
        margin-bottom: 15px;
    }
    .page-blog__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-blog__posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-blog__post-card {
        border-radius: 8px;
    }
    .page-blog__post-image {
        height: 180px; /* Adjust height for mobile */
    }
    .page-blog__post-content {
        padding: 20px;
    }
    .page-blog__post-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .page-blog__post-excerpt {
        font-size: 14px;
        margin-bottom: 15px;
    }

    details.page-blog__faq-item summary.page-blog__faq-question {
        padding: 15px 20px;
        font-size: 16px;
    }
    .page-blog__faq-qtext {
        font-size: 16px;
    }
    .page-blog__faq-toggle {
        font-size: 24px;
        margin-left: 15px;
        width: 25px;
    }
    details.page-blog__faq-item .page-blog__faq-answer {
        padding: 0 20px 20px;
        font-size: 15px;
    }
    .page-blog__cta-bottom-section {
        padding: 50px 15px;
        margin: 30px auto;
    }
    .page-blog__cta-bottom-section .page-blog__section-title {
        color: #ffffff;
        font-size: clamp(20px, 6vw, 28px);
        margin-bottom: 20px;
    }
    .page-blog__cta-bottom-section .page-blog__section-description {
        color: #e0e0e0;
        font-size: 15px;
        margin-bottom: 25px;
    }

    /* Enforce image responsiveness */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}