/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #FFF6D6; /* Main text color for dark background */
    background-color: #0A0A0A; /* Page background */
}

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

.page-blog__section {
    padding: 60px 0;
}

.page-blog__dark-section {
    background-color: #111111; /* Card BG color for dark sections */
}

.page-blog__section-title {
    font-size: 2.5em;
    color: #FFD36B; /* Auxiliary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
    padding-bottom: 60px;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

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

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

.page-blog__hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 1; /* Ensure content is above any background elements if not siblings */
}

.page-blog__main-title {
    font-weight: bold;
    line-height: 1.2;
    color: #FFD36B; /* Auxiliary color for main title */
    margin-bottom: 20px;
    /* No fixed font-size as per rule, letting browser handle responsive scaling */
}

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

/* Buttons */
.page-blog__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-blog__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #111111; /* Dark text for light button */
    border: none;
    margin-right: 15px;
}

.page-blog__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-blog__btn-secondary {
    background: transparent;
    color: #FFD36B; /* Auxiliary color for text */
    border: 2px solid #FFD36B; /* Border color */
}

.page-blog__btn-secondary:hover {
    background: #FFD36B;
    color: #111111;
    transform: translateY(-2px);
}

.page-blog__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-blog__cta-buttons--center {
    margin-top: 40px;
}

/* Latest Posts Grid */
.page-blog__posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.page-blog__post-card {
    background-color: #111111; /* Card BG color */
    border: 1px solid #3A2A12; /* Border color */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-blog__post-card:hover {
    transform: translateY(-5px);
}

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

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

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

.page-blog__post-meta {
    font-size: 0.9em;
    color: #FFD36B; /* Auxiliary color for meta info */
    margin-bottom: 10px;
}

.page-blog__post-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #FFF6D6; /* Main text color */
    margin-bottom: 10px;
    flex-grow: 1; /* Allow title to grow */
}

.page-blog__post-excerpt {
    font-size: 0.95em;
    color: #CCC;
    margin-bottom: 15px;
}

.page-blog__read-more {
    color: #F2C14E; /* Main brand color for read more */
    font-weight: bold;
    text-decoration: none;
    margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
    text-decoration: underline;
}

/* About Blog Section */
.page-blog__about-blog .page-blog__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #FFF6D6;
    text-align: justify;
}

/* Categories Section */
.page-blog__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    justify-content: center;
}

.page-blog__category-card {
    background-color: #111111; /* Card BG color */
    border: 1px solid #3A2A12; /* Border color */
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFF6D6;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__category-card:hover {
    background-color: #F2C14E; /* Main brand color */
    color: #111111;
}

/* Featured Articles Section */
.page-blog__featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.page-blog__featured-card {
    background-color: #111111; /* Card BG color */
    border: 1px solid #3A2A12; /* Border color */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.page-blog__featured-card:hover {
    transform: translateY(-5px);
}

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

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

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

.page-blog__featured-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFF6D6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-blog__featured-title a {
    color: inherit;
    text-decoration: none;
}

.page-blog__featured-title a:hover {
    text-decoration: underline;
    color: #F2C14E;
}

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

.page-blog__btn-read-more {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #F2C14E;
    border: 2px solid #F2C14E;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
}

.page-blog__btn-read-more:hover {
    background: #F2C14E;
    color: #111111;
}

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

.page-blog__faq-item {
    background-color: #111111; /* Card BG color */
    border: 1px solid #3A2A12; /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #FFF6D6;
}

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

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

.page-blog__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #F2C14E; /* Main brand color */
}

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

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

/* CTA Section - reused styles from hero content */
.page-blog__cta-content {
    text-align: center;
}

.page-blog__cta-content .page-blog__description {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

/* General image styling for content areas */
.page-blog img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-blog__posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-blog__featured-grid {
        grid-template-columns: 1fr;
    }
    .page-blog__section-title {
        font-size: 2em;
    }
    .page-blog__main-title {
        font-size: 2.8em;
    }
}

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

    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }
    .page-blog__hero-image-wrapper {
        max-height: 300px;
        margin-bottom: 20px;
    }
    .page-blog__hero-content {
        padding: 0 15px;
    }
    .page-blog__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-blog__description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    /* 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-blog__container,
    .page-blog__section,
    .page-blog__post-card,
    .page-blog__featured-card,
    .page-blog__category-card,
    .page-blog__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-blog__section {
        padding: 40px 0;
    }
    .page-blog__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    /* 按钮与按钮容器 */
    .page-blog__btn,
    .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;
        padding-right: 15px;
        margin-right: 0 !important;
    }

    .page-blog__cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 其他内容模块 */
    .page-blog__posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-blog__post-image {
        height: 180px;
    }
    .page-blog__featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-blog__featured-image {
        height: 200px;
    }
    .page-blog__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    .page-blog__category-card {
        font-size: 1em;
        padding: 15px 10px;
    }
    .page-blog__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-blog__faq-answer {
        padding: 0 20px 15px;
    }
}