/* style/blog.css */

/* Base Styles */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Explicitly set for clarity, though body handles it */
}

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

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #017439;
    line-height: 1.2;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button doesn't overflow */
    text-align: center;
}

.page-blog__btn-primary {
    background-color: #017439; /* Main color */
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-blog__btn-primary:hover {
    background-color: #005f2c; /* Slightly darker green */
    border-color: #005f2c;
}

.page-blog__btn-secondary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-blog__btn-secondary:hover {
    background-color: #a00606; /* Slightly darker red */
    border-color: #a00606;
}

/* Hero Section */
.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, shared.css handles body padding */
    padding-bottom: 60px;
    background-color: #FFFFFF; /* Light background for hero */
    color: #333333;
}

.page-blog__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 40px 16px;
}

.page-blog__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    text-align: left;
}

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

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

.page-blog__hero-image {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-blog__hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    display: block;
}

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

/* Latest Articles Section */
.page-blog__latest-articles {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

.page-blog__article-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
}

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

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

.page-blog__card-media {
    width: 100%;
    height: 200px; /* Fixed height for consistent card image display */
    overflow: hidden;
}

.page-blog__card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.page-blog__card-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #017439;
    line-height: 1.3;
}

.page-blog__card-title:hover {
    text-decoration: underline;
}

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

.page-blog__card-date {
    font-size: 0.85em;
    color: #888888;
}

.page-blog__view-all-button {
    text-align: center;
    margin-top: 50px;
}

/* Categories Section */
.page-blog__categories {
    padding: 60px 0;
    background-color: #017439; /* Dark background */
    color: #FFFFFF;
}

.page-blog__category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.page-blog__category-item {
    background-color: #FFFFFF;
    color: #017439;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 2px solid #FFFFFF;
}

.page-blog__category-item:hover {
    background-color: #f0f0f0;
    color: #005f2c;
}

/* Popular Posts Section */
.page-blog__popular-posts {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-blog__popular-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-blog__popular-item {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-blog__popular-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.page-blog__popular-title a {
    color: #017439;
    text-decoration: none;
}

.page-blog__popular-title a:hover {
    text-decoration: underline;
}

.page-blog__popular-date {
    font-size: 0.8em;
    color: #888888;
}

/* Call to Action Section */
.page-blog__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #FFFFFF;
    text-align: center;
}

.page-blog__cta-container {
    max-width: 800px;
}

.page-blog__cta-text {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-blog__cta-buttons {
    justify-content: center; /* Center buttons in CTA */
    gap: 20px;
}

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

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

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

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

    /* 1. HERO 双栏 */
    .page-blog__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 40px;
    }
    .page-blog__hero-container {
        flex-direction: column;
        padding: 30px 15px;
        gap: 30px;
    }
    .page-blog__hero-content {
        text-align: center;
        flex: 1 1 100%;
    }
    .page-blog__hero-title {
        font-size: clamp(2em, 8vw, 2.5em); /* Adjust for smaller screens */
    }
    .page-blog__hero-image {
        flex: 1 1 100%;
    }
    
    /* 2. 模块1 三栏正圆图 (Mandatory in list, even if not in current HTML) */
    .page-blog__icon-box-media {
        width: 200px !important;
        height: 200px !important;
        margin-bottom: 10px;
    }
    .page-blog__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 3. 七 Tab 游戏区 (Mandatory in list, even if not in current HTML) */
    .page-blog__game-tabs {
        padding: 30px 0;
    }
    .page-blog__tab-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .page-blog__tab-nav button {
        flex: 1 1 auto;
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .page-blog__game-panel {
        padding: 20px 0;
    }

    /* 4. 教程长文 / 促销 / 信任 / FAQ / intro 排版 (Applying to relevant sections) */
    .page-blog__latest-articles,
    .page-blog__categories,
    .page-blog__popular-posts,
    .page-blog__cta-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-blog__article-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }
    .page-blog__card-media {
        height: 180px; /* Adjust card image height */
    }
    .page-blog__card-title {
        font-size: 1.2em;
    }

    .page-blog__category-list {
        flex-direction: column; /* Stack categories vertically */
        gap: 10px;
    }
    .page-blog__category-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-blog__popular-item {
        padding: 15px;
    }
    .page-blog__popular-title {
        font-size: 1.1em;
    }

    .page-blog__cta-container {
        padding: 0 15px;
    }
    .page-blog__cta-text {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    /* 5. 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* 6. 按钮与按钮容器 */
    .page-blog__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%; /* Ensure container takes full width */
        max-width: 100%;
        box-sizing: border-box;
    }
    .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;
    }
}