/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared, default to white */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    width: 100%;
    padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
    margin-bottom: 40px;
    display: flex;
    flex-direction: column; /* Image above, content below */
    align-items: center;
    text-align: center;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    max-height: 600px; /* Limit height for aesthetic */
}

.page-blog__hero-content {
    max-width: 900px;
    padding: 40px 20px;
    background-color: #ffffff; /* Explicit white background for readability */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -80px; /* Overlap slightly for visual effect */
    position: relative;
    z-index: 1;
    border-radius: 8px;
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* H1 clamp font size */
    font-weight: 700;
    line-height: 1.2;
    color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    margin-bottom: 20px;
}

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

/* CTA Buttons */
.page-blog__cta-button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.page-blog__cta-button--primary {
    background-color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    color: #FFFFFF;
    border: 2px solid #1A7FB5;
    margin-right: 15px;
}

.page-blog__cta-button--primary:hover {
    background-color: #15628D;
    border-color: #15628D;
}

.page-blog__cta-button--secondary {
    background-color: #FFFFFF;
    color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    border: 2px solid #1A7FB5;
}

.page-blog__cta-button--secondary:hover {
    background-color: #1A7FB5;
    color: #FFFFFF;
}

/* General Section Styling */
.page-blog__section-title {
    font-size: 2.5em;
    color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-blog__section-title--light {
    color: #FFFFFF;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.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: 8px;
    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 8px 25px rgba(0, 0, 0, 0.15);
}

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

.page-blog__article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-blog__article-content {
    padding: 20px;
}

.page-blog__article-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    margin-bottom: 10px;
}

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

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

.page-blog__read-more-button {
    color: #B86000; /* Adjusted login color for AA contrast */
    font-weight: bold;
    text-decoration: none;
}

.page-blog__view-all-container {
    text-align: center;
}

/* Categories Section */
.page-blog__categories-section {
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.page-blog__categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.page-blog__category-card {
    background-color: #f0f8ff; /* Light blue background */
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: #333333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__category-card:hover {
    background-color: #e0f0ff;
    transform: translateY(-3px);
}

.page-blog__category-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    margin-bottom: 10px;
}

.page-blog__category-description {
    font-size: 0.95em;
    color: #666666;
}

/* CTA Banner Section */
.page-blog__cta-banner {
    position: relative;
    width: 100%;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 60px;
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-blog__cta-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* Darken image for text readability, no color change */
    z-index: 0;
}

.page-blog__cta-banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.page-blog__description--light {
    color: #f0f0f0;
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* FAQ Section */
.page-blog__faq-section {
    max-width: 900px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.page-blog__faq-list {
    margin-top: 30px;
}

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

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: #1A7FB5; /* Adjusted brand blue for AA contrast */
    cursor: pointer;
    list-style: none; /* For details/summary */
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #B86000; /* Adjusted login color for AA contrast */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
    content: "−"; /* Change to minus when open */
}

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

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


/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__hero-content {
        margin-top: -60px;
        padding: 30px 20px;
    }
    .page-blog__main-title {
        font-size: clamp(1.8em, 4.5vw, 2.8em);
    }
    .page-blog__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-blog__categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .page-blog__cta-banner {
        padding: 60px 20px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
        margin-bottom: 20px;
    }
    .page-blog__hero-image {
        max-height: 400px;
    }
    .page-blog__hero-content {
        margin-top: -40px;
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-blog__main-title {
        font-size: clamp(1.6em, 6vw, 2.2em) !important;
        margin-bottom: 15px;
    }
    .page-blog__description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-blog__latest-articles-section,
    .page-blog__categories-section,
    .page-blog__cta-banner,
    .page-blog__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 按钮与按钮容器 */
    .page-blog__cta-button,
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog a[class*="button"],
    .page-blog a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-right: 0 !important; /* Remove margin for stacked buttons */
        margin-bottom: 10px;
    }

    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        flex-direction: column !important;
        gap: 0 !important;
        align-items: stretch !important;
    }

    /* 其他内容模块 */
    .page-blog__section-title {
        font-size: 2em !important;
        margin-bottom: 30px;
    }
    .page-blog__articles-grid {
        grid-template-columns: 1fr; /* Single column for articles */
        gap: 20px;
    }
    .page-blog__category-card {
        padding: 20px;
    }
    .page-blog__categories-grid {
        grid-template-columns: 1fr; /* Single column for categories */
        gap: 15px;
    }
    .page-blog__cta-banner {
        padding: 40px 15px;
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px;
    }
    .page-blog__faq-answer {
        padding: 0 15px 15px 15px;
    }
}