/* style/news.css */

/* General page styles */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text on dark body background */
    background-color: transparent; /* Body background handled by shared.css */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__section-description {
    font-size: 1.1em;
    color: #f0f0f0;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    line-height: 1.5;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    overflow: hidden;
    padding: 0; /* Assuming shared.css handles body padding-top */
    margin-bottom: 60px;
    text-align: center;
    background-color: #017439; /* Fallback for image loading */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6); /* Darken image for text readability */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 800px;
    padding: 40px 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
    color: #ffffff;
}

.page-news__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #f0f0f0;
}

.page-news__hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__card-link {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: #C30808; /* Custom color for register/login buttons */
    color: #FFFF00; /* Custom font color for register/login buttons */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background-color: #e01010;
    border-color: #e01010;
}

.page-news__btn-secondary {
    background-color: #017439;
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background-color: #005a2d;
    border-color: #005a2d;
}

.page-news__card-link {
    background-color: #017439;
    color: #ffffff;
    border: 1px solid #017439;
    padding: 10px 20px;
    font-size: 0.9em;
    margin-top: 15px;
}

.page-news__card-link:hover {
    background-color: #005a2d;
    border-color: #005a2d;
}

/* Latest News Section */
.page-news__latest-section,
.page-news__strategy-section,
.page-news__community-section,
.page-news__cta-section {
    padding: 80px 0;
    margin-bottom: 40px;
}

.page-news__dark-bg {
    background-color: #1a1a2e; /* Inherited from body, but explicitly set for sections */
    color: #ffffff;
}

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

.page-news__news-card,
.page-news__article-item,
.page-news__community-card {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for cards on dark background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #ffffff; /* Ensure text is light on card background */
}

.page-news__news-card:hover,
.page-news__article-item:hover,
.page-news__community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__card-image,
.page-news__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-news__card-title,
.page-news__article-title,
.page-news__community-card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

.page-news__card-title a,
.page-news__article-title a {
    color: #ffffff; /* Link color in card title */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover,
.page-news__article-title a:hover {
    color: #017439; /* Brand color on hover */
}

.page-news__card-meta {
    font-size: 0.9em;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-news__card-text,
.page-news__article-text,
.page-news__community-card-text {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Community Section Specifics */
.page-news__community-card {
    text-align: center;
    padding: 30px;
}

.page-news__community-card-title {
    color: #ffffff;
    margin-bottom: 15px;
}

/* CTA Section */
.page-news__cta-section {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(45deg, #017439, #005a2d); /* Gradient background */
    color: #ffffff;
    border-radius: 15px;
    margin: 60px auto;
    max-width: 1000px;
}

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

/* --- Responsive Styles --- */

/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }

    .page-news__hero-description {
        font-size: 1.2em;
    }

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

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

    .page-news__latest-section,
    .page-news__strategy-section,
    .page-news__community-section,
    .page-news__cta-section {
        padding: 60px 0;
    }

    .page-news__news-grid,
    .page-news__article-list,
    .page-news__community-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .page-news__card-image,
    .page-news__article-image {
        height: 200px;
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-news__hero-section {
        min-height: 400px;
        margin-bottom: 40px;
        padding-top: 0 !important; /* Assuming shared.css handles body padding-top */
    }

    .page-news__hero-content {
        padding: 30px 15px;
    }

    .page-news__hero-title {
        font-size: 2.2em !important;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em !important;
        margin-bottom: 25px;
    }

    .page-news__hero-buttons {
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* 其他内容模块 - 通用 padding 和字体 */
    .page-news__container {
        padding: 0 15px !important;
    }

    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__section-title {
        font-size: 1.8em !important;
        margin-bottom: 15px;
    }

    .page-news__section-description {
        font-size: 0.95em !important;
        margin-bottom: 25px;
    }

    /* 产品展示图区域 (News cards/articles) */
    .page-news__news-grid,
    .page-news__article-list,
    .page-news__community-grid {
        grid-template-columns: 1fr !important; /* Single column layout */
        gap: 25px;
        margin-top: 30px;
    }

    .page-news__news-card,
    .page-news__article-item,
    .page-news__community-card {
        padding-bottom: 15px;
    }

    .page-news__card-image,
    .page-news__article-image {
        height: 180px !important; /* Smaller fixed height for mobile */
    }

    .page-news__card-content,
    .page-news__article-content {
        padding: 20px;
    }

    .page-news__card-title,
    .page-news__article-title,
    .page-news__community-card-title {
        font-size: 1.2em !important;
    }

    .page-news__card-text,
    .page-news__article-text,
    .page-news__community-card-text {
        font-size: 0.9em !important;
    }

    /* 通用图片与容器 */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-news__latest-section,
    .page-news__strategy-section,
    .page-news__community-section,
    .page-news__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 按钮与按钮容器 */
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news 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: 12px 20px !important;
        font-size: 1em !important;
    }
    
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important; /* Handled by button width 100% */
        padding-right: 0 !important; /* Handled by button width 100% */
        flex-direction: column !important;
        gap: 10px !important;
    }

    .page-news__cta-section {
        padding: 60px 15px !important;
        margin: 40px auto !important;
    }
}