:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #ffffff;
    --bg-dark: #017439; /* Using primary color as dark background for contrast sections */
    --button-register: #C30808;
    --button-login: #C30808;
    --font-login-register: #FFFF00;
    --header-offset: 0px; /* Placeholder, actual value from shared.css */
}

/* Base styles for the blog page */
.page-blog {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background body */
    background-color: var(--bg-light); /* Default body background is white */
}

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

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

.page-blog__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

.page-blog__hero-section {
    padding-top: 10px; /* Small top padding, main offset from body padding-top */
    margin-bottom: 40px;
}

.page-blog__hero-image-wrapper {
    width: 100%;
    overflow: hidden;
    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: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.page-blog__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Clamp for H1 font size */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-blog__hero-description {
    font-size: 1.2em;
    color: var(--text-dark);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-blog__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    max-width: 100%; /* For responsive button */
    box-sizing: border-box; /* For responsive button */
    white-space: normal; /* For responsive button text */
    word-wrap: break-word; /* For responsive button text */
}

.page-blog__btn-primary {
    background-color: var(--button-register); /* Using #C30808 for primary action */
    color: var(--text-light);
    border: 2px solid var(--button-register);
}

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

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

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

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

.page-blog__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-blog__text-block {
    flex: 1;
}

.page-blog__text-block p {
    margin-bottom: 15px;
}

.page-blog__text-block a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-blog__image-block {
    flex: 0 0 400px; /* Fixed width for desktop, adjust for mobile */
    max-width: 400px;
    border-radius: 8px;
    overflow: hidden;
}

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

.page-blog__categories-section {
    background-color: var(--bg-dark); /* Using primary color as dark background */
    color: var(--text-light);
}

.page-blog__categories-section .page-blog__section-title {
    color: var(--text-light); /* Title color for dark background */
}

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

.page-blog__grid-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards on dark bg */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 100%; /* Ensure equal height */
    display: flex;
    flex-direction: column;
}

.page-blog__grid-title {
    font-size: 1.5em;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__grid-item p {
    color: rgba(255, 255, 255, 0.8);
    flex-grow: 1;
}

.page-blog__grid-item a {
    color: var(--font-login-register); /* Using yellow for links on dark bg */
    text-decoration: underline;
}

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

.page-blog__masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch; /* Ensures cards in a row have equal height */
}

.page-blog__card {
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

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

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

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

.page-blog__card-description {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 15px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-blog__btn-outline {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    align-self: flex-start; /* Align button to start */
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

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

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

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

.page-blog__why-follow-section .page-blog__section-title {
    color: var(--text-light);
}

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

.page-blog__why-follow-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-blog__why-follow-title {
    font-size: 1.4em;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-blog__why-follow-item p {
    color: rgba(255, 255, 255, 0.8);
    flex-grow: 1;
}

.page-blog__cta-section {
    background-color: var(--bg-light);
    color: var(--text-dark);
    text-align: center;
}

.page-blog__cta-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-blog__cta-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.page-blog__cta-section .page-blog__section-title {
    margin-top: 0;
    font-size: 2em;
    color: var(--primary-color);
}

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

.page-blog__cta-description a {
    color: var(--primary-color);
    text-decoration: underline;
}

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

/* --- Mobile responsiveness (1024px) --- */
@media (max-width: 1024px) {
    .page-blog__container {
        padding: 0 15px;
    }

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

    .page-blog__main-title {
        font-size: clamp(1.8em, 5vw, 2.8em);
    }

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

    .page-blog__content-wrapper {
        flex-direction: column;
    }

    .page-blog__image-block {
        flex: 0 0 auto;
        max-width: 100%;
        margin-top: 30px;
    }

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

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

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

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

    .page-blog__why-follow-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* --- Mobile responsiveness (768px) --- */
@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-blog__hero-section {
        padding-top: 10px;
        margin-bottom: 30px;
    }

    .page-blog__hero-content {
        padding: 0 15px;
    }

    .page-blog__main-title {
        font-size: clamp(1.6em, 6vw, 2.5em) !important;
        margin-bottom: 15px;
    }

    .page-blog__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* 通用图片与容器 */
    .page-blog img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-blog__section,
    .page-blog__card,
    .page-blog__container,
    .page-blog__content-wrapper,
    .page-blog__image-block,
    .page-blog__grid-item,
    .page-blog__why-follow-item,
    .page-blog__cta-content {
        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: 25px;
    }

    /* 博客卡片区 */
    .page-blog__masonry {
        grid-template-columns: 1fr !important;
        gap: 20px;
        align-items: stretch;
    }

    .page-blog__card-image {
        height: 160px;
    }

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

    /* 按钮与按钮容器 */
    .page-blog__cta-button,
    .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;
    }
    
    .page-blog__cta-buttons,
    .page-blog__button-group,
    .page-blog__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column !important;
        gap: 10px;
    }

    /* Long text / gold frame area - Not applicable for this page */
    /* Game carousel - Not applicable for this page */
    /* Coop brand grid - Not applicable for this page */
    /* Blog slider track - Not applicable for this page as masonry is used */
}