/* style/blog.css */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #FFF5E1; /* Default text color for the page, assuming dark body background from shared.css */
    background: #B71C1C; /* Main page background from custom colors */
}

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

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    overflow: hidden;
    padding-top: 10px; /* Specific top padding for hero section */
    padding-bottom: 60px;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #7A0E0E; /* Deep Red from custom colors */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-blog__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.8); /* Slightly dim the image for better text contrast if needed, but not changing color */
}

.page-blog__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
}

.page-blog__hero-title {
    font-size: 3.2em;
    font-weight: bold;
    color: #FFD86A; /* Gold-like color from custom colors */
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: #FFF5E1;
    margin-bottom: 30px;
}

.page-blog__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* General Button Styles */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button gradient */
    color: #7A0E0E; /* Deep Red text for contrast */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 216, 106, 0.4);
}

.page-blog__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 216, 106, 0.6);
}

.page-blog__btn-secondary {
    background: #B71C1C; /* Background color from custom colors */
    color: #FFD86A; /* Gold-like color for text */
    border: 2px solid #FFD86A; /* Gold-like border */
}

.page-blog__btn-secondary:hover {
    background: #7A0E0E; /* Deep Red hover background */
    transform: translateY(-2px);
    border-color: #FFCC66; /* Glow color for hover border */
}

/* Section Titles */
.page-blog__section-title {
    font-size: 2.5em;
    color: #FFD86A; /* Gold-like color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 60px 0;
    background: #B71C1C; /* Background color from custom colors */
}

.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: #D32F2F; /* Card BG color from custom colors */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

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

.page-blog__article-image {
    width: 100%;
    height: 220px; /* Fixed height for article images */
    object-fit: cover;
    display: block;
}

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

.page-blog__article-title {
    font-size: 1.4em;
    color: #FFD86A; /* Gold-like color */
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

.page-blog__article-excerpt {
    font-size: 0.95em;
    color: #FFF5E1; /* Main text color */
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__article-date {
    font-size: 0.85em;
    color: rgba(255, 245, 225, 0.7); /* Lighter main text color */
    margin-top: auto;
    margin-bottom: 15px;
}

.page-blog__read-more-btn {
    background: #C91F17; /* Main brand color */
    color: #FFF5E1; /* Main text color */
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9em;
    align-self: flex-start;
    border: 1px solid #C91F17;
}

.page-blog__read-more-btn:hover {
    background: #E53935; /* Auxiliary color */
    border-color: #E53935;
}

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

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background: #7A0E0E; /* Deep Red for dark section */
}

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

.page-blog__category-card {
    background: #D32F2F; /* Card BG color */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #FFF5E1; /* Main text color */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.page-blog__category-title {
    font-size: 1.5em;
    color: #FFD86A; /* Gold-like color */
    margin-bottom: 10px;
    font-weight: bold;
}

.page-blog__category-description {
    font-size: 1em;
    color: #FFF5E1; /* Main text color */
}

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

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

.page-blog__faq-item {
    background: #D32F2F; /* Card BG color */
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: #FFD86A; /* Gold-like color */
    cursor: pointer;
    background: #C91F17; /* Main brand color for summary */
    border-bottom: 1px solid rgba(255, 245, 225, 0.1);
    list-style: none; /* Remove default marker */
}

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    color: #FFD86A; /* Gold-like color */
    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: 20px 25px;
    font-size: 1em;
    color: #FFF5E1; /* Main text color */
    background: #D32F2F; /* Card BG color */
    border-top: 1px solid rgba(255, 245, 225, 0.1);
}

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

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

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
    background: #7A0E0E; /* Deep Red for dark section */
}

.page-blog__cta-title {
    font-size: 2.8em;
    color: #FFD86A; /* Gold-like color */
    margin-bottom: 20px;
    font-weight: bold;
}

.page-blog__cta-description {
    font-size: 1.1em;
    color: #FFF5E1; /* Main text color */
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Common Image Styles */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

    .page-blog__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Specific top padding */
        padding-bottom: 40px;
    }

    .page-blog__hero-title {
        font-size: 2.2em;
    }

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

    .page-blog__hero-cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        max-width: 90%; /* Adjust width for smaller screens */
    }

    /* 按钮与按钮容器 */
    .page-blog__btn-primary,
    .page-blog__btn-secondary,
    .page-blog__read-more-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;
    }

    .page-blog__hero-cta-buttons,
    .page-blog__view-all-button-container,
    .page-blog__view-all-faq-button-container,
    .page-blog__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
        display: flex;
        flex-direction: column; /* Ensure vertical stacking for button groups */
        gap: 15px;
    }

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

    /* 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-blog__article-image {
        height: auto !important; /* Allow height to adjust */
        max-height: 200px;
    }

    .page-blog__articles-grid,
    .page-blog__categories-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-blog__article-card {
        padding: 0; /* Remove padding if any, card itself has padding */
    }

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

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

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

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

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