/* style/blog.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-login: #EA7C07;
    --background-light: #FFFFFF;
    --black: #000000;
}

.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background sections */
    background-color: var(--background-light);
}

.page-blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%; /* Ensure width is 100% for desktop as well */
}

/* Hero Section */
.page-blog__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    text-align: center;
    overflow: hidden;
    background-color: var(--primary-color);
    color: var(--text-light);
}

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

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

.page-blog__hero-content {
    max-width: 800px;
    z-index: 1;
}

.page-blog__hero-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-blog__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
}

.page-blog__hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* General Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    max-width: 100%;
}

.page-blog__btn-primary {
    background-color: var(--button-login);
    color: var(--text-light);
    border: 2px solid var(--button-login);
}

.page-blog__btn-primary:hover {
    background-color: darken(var(--button-login), 10%);
    border-color: darken(var(--button-login), 10%);
}

.page-blog__btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.page-blog__btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    border-color: var(--text-light);
}

/* Section Titles & Descriptions */
.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-blog__dark-bg .page-blog__section-title {
    color: var(--text-light);
}

.page-blog__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--text-dark);
}

.page-blog__dark-bg .page-blog__section-description {
    color: var(--text-light);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
    padding: 60px 0;
    background-color: var(--background-light);
    color: var(--text-dark);
}

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

.page-blog__article-card {
    background-color: var(--secondary-color);
    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;
    color: var(--text-dark);
}

.page-blog__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px 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; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

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

.page-blog__article-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-blog__article-summary {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 15px;
}

.page-blog__article-meta {
    font-size: 0.85em;
    color: #777;
    display: flex;
    justify-content: space-between;
}

/* Categories Section */
.page-blog__categories-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

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

.page-blog__category-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: block;
}

.page-blog__category-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.page-blog__category-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-light);
}

.page-blog__category-text {
    font-size: 0.9em;
    opacity: 0.9;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--background-light);
    color: var(--text-dark);
}

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

/* FAQ Section */
.page-blog__faq-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

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

.page-blog__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-light);
}

.page-blog__faq-item summary {
    list-style: none; /* Hide default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
    transform: rotate(45deg);
}

.page-blog__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-blog__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-blog__hero-title {
        font-size: clamp(1.8em, 8vw, 2.5em);
    }

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

    .page-blog__hero-cta {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }

    .page-blog__btn-primary,
    .page-blog__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px !important;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-blog__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-blog__latest-articles-section,
    .page-blog__categories-section,
    .page-blog__cta-section,
    .page-blog__faq-section {
        padding: 40px 0;
    }

    .page-blog__container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-blog__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-blog__article-image {
        height: 180px;
    }

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

    .page-blog__categories-grid {
        grid-template-columns: 1fr;
    }

    /* Image specific mobile rules */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Video specific mobile rules (if any video is present) */
    .page-blog video,
    .page-blog__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-blog__video-section,
    .page-blog__video-container,
    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-blog__video-section {
        padding-top: 10px !important;
    }

    .page-blog__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Ensure no filter is applied to images */
.page-blog img {
    filter: none; /* Explicitly remove any filter */
}

/* Specific contrast adjustments if needed */
.page-blog__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-blog__light-bg {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-blog__article-card {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-blog__article-title {
    color: var(--primary-color);
}

.page-blog__category-card {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.page-blog__category-title {
    color: var(--text-light);
}

.page-blog__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.page-blog__faq-item summary {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

.page-blog__faq-answer {
    color: rgba(255, 255, 255, 0.8);
}