/* style/blog.css */
.page-blog {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #FFF1E8; /* Main text color for dark background */
    background-color: #140C0C; /* Overall page background from custom colors */
    padding-bottom: 50px; /* Add some padding at the bottom */
}

/* Header Section */
.page-blog__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px 40px; /* Small top padding, more bottom padding */
    background-color: #140C0C; /* Ensure background consistency */
    position: relative;
    overflow: hidden;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

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

.page-blog__hero-content {
    max-width: 900px;
    margin-bottom: 30px;
    z-index: 1;
}

.page-blog__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    color: #F3C54D; /* Gold color for main title */
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.page-blog__intro-text {
    font-size: 1.15rem;
    color: #FFF1E8;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
    max-width: 600px; /* Max width for button group */
    margin: 0 auto;
}

.page-blog__btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    max-width: 100%; /* Ensure button doesn't exceed container */
    box-sizing: border-box; /* Include padding and border in element's total width */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Custom button color */
    color: #FFF1E8; /* Text Main color */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 176, 74, 0.3);
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 176, 74, 0.4);
}

.page-blog__btn-secondary {
    background: #2A1212; /* Card BG color */
    color: #F3C54D; /* Gold color */
    border: 2px solid #6A1E1E; /* Border color */
    box-shadow: 0 4px 15px rgba(106, 30, 30, 0.3);
}

.page-blog__btn-secondary:hover {
    background: #3A1A1A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 30, 30, 0.4);
}

/* Article Content Wrapper */
.page-blog__article-wrap {
    max-width: 1150px; /* Single column max width */
    margin: 40px auto;
    padding: 0 20px;
}

.page-blog__section {
    background-color: #2A1212; /* Card BG color */
    border: 1px solid #6A1E1E; /* Border color */
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__section-title {
    font-size: 2rem;
    color: #F3C54D; /* Gold color */
    margin-bottom: 20px;
    border-bottom: 2px solid #7E0D0D; /* Deep Red for border */
    padding-bottom: 10px;
    font-weight: 600;
}

.page-blog__sub-title {
    font-size: 1.5rem;
    color: #FFB04A; /* Orange from button gradient */
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 500;
}

.page-blog p {
    margin-bottom: 15px;
    color: #FFF1E8; /* Text Main color */
}

.page-blog a {
    color: #F3C54D; /* Gold color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-blog a:hover {
    color: #FFB04A; /* Orange from button gradient on hover */
    text-decoration: underline;
}

.page-blog__figure {
    margin: 25px 0;
    text-align: center;
}

.page-blog__article-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__figcaption {
    font-size: 0.9rem;
    color: #AAA;
    margin-top: 10px;
}

/* Recent Articles Section */
.page-blog__recent-articles .page-blog__section-title {
    text-align: center;
}

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

.page-blog__article-card {
    background-color: #2A1212; /* Card BG color */
    border: 1px solid #6A1E1E; /* Border color */
    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__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-blog__card-content {
    padding: 20px;
    flex-grow: 1; /* Allow content to grow */
    display: flex;
    flex-direction: column;
}

.page-blog__card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
    flex-grow: 1; /* Allow title to grow */
}

.page-blog__card-title a {
    color: #F3C54D; /* Gold color */
    text-decoration: none;
}

.page-blog__card-title a:hover {
    color: #FFB04A; /* Orange from button gradient */
    text-decoration: underline;
}

.page-blog__card-meta {
    font-size: 0.85rem;
    color: #AAA;
    margin-bottom: 15px;
}

.page-blog__card-excerpt {
    font-size: 1rem;
    color: #FFF1E8;
    margin-bottom: 20px;
}

.page-blog__read-more-btn {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #FFF1E8;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-start; /* Align to start */
    transition: background 0.3s ease;
}

.page-blog__read-more-btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

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

/* FAQ Section */
.page-blog__faq-section {
    margin-top: 30px;
}

.page-blog__faq-item {
    background-color: #1a0f0f; /* Slightly lighter dark background for FAQ item */
    border: 1px solid #6A1E1E;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
    background-color: #2A1212; /* Card BG when open */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFB04A; /* Orange for questions */
    list-style: none; /* Hide default marker for details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
    display: none;
}

.page-blog__faq-question:hover {
    color: #F3C54D; /* Gold on hover */
}

.page-blog__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #FFF1E8; /* Text Main color */
}

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

/* General image and button responsiveness */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-blog__article-wrap {
        padding: 0 15px;
    }

    .page-blog__section {
        padding: 25px;
    }

    .page-blog__main-title {
        font-size: clamp(2.2rem, 6vw, 3rem);
    }

    .page-blog__intro-text {
        font-size: 1rem;
    }

    .page-blog__section-title {
        font-size: 1.8rem;
    }

    .page-blog__sub-title {
        font-size: 1.3rem;
    }

    .page-blog__article-list {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* 1. 顶区标题 + 双 CTA */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 30px;
    }

    .page-blog__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem); /* Smaller on mobile */
        margin-bottom: 10px;
    }

    .page-blog__intro-text {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

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

    .page-blog__btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 2. 单栏长文容器 */
    .page-blog__article-wrap {
        margin: 20px auto;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__section {
        padding: 20px;
        margin-bottom: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__section-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .page-blog__sub-title {
        font-size: 1.2rem;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .page-blog p {
        font-size: 0.95rem;
    }

    /* 3. 通通用图片与 figure */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-blog__hero-image-wrapper,
    .page-blog__figure {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    /* 4. 按钮与按钮容器 (already covered in cta-buttons) */

    /* 5. FAQ 区块 */
    .page-blog__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .page-blog__faq-answer {
        font-size: 0.9rem;
        padding: 0 20px 15px;
    }

    .page-blog__article-list {
        grid-template-columns: 1fr; /* Stack article cards vertically */
        gap: 20px;
    }

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

    .page-blog__card-title {
        font-size: 1.1rem;
    }

    .page-blog__card-excerpt {
        font-size: 0.9rem;
    }

    .page-blog__read-more-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}