/* style/news.css */
.page-news {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color, #0D0E12); /* Fallback to default if --bg-color is not set in shared */
    color: var(--text-main-color, #FFF3E6); /* Main text color for dark background */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, relying on body for --header-offset */
    padding-bottom: 40px;
    color: #FFF3E6;
    text-align: center;
    overflow: hidden; /* Ensure no overflow */
}

.page-news__hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    margin-bottom: 20px;
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    background: rgba(13, 14, 18, 0.7); /* Semi-transparent dark background for text readability */
    border-radius: 8px;
    margin-top: -100px; /* Overlap slightly for visual effect, but not on image */
    padding-top: 100px; /* Compensate for overlap */
}

.page-news__main-title {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary-color, #FF8C1A);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-news__description {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* Call to Action Button */
.page-news__cta-button,
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
    color: #ffffff; /* White text for contrast */
    border: none;
    margin: 10px;
}

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

.page-news__btn-secondary {
    background: transparent;
    color: var(--primary-color, #FF8C1A);
    border: 2px solid var(--border-color, #A84F0C);
    margin: 10px;
}

.page-news__btn-secondary:hover {
    background-color: rgba(255, 140, 26, 0.1);
    transform: translateY(-2px);
}

/* Latest Articles Section */
.page-news__latest-articles-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

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

.page-news__article-card {
    background-color: var(--card-bg-color, #17191F);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

.page-news__article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: var(--text-main-color, #FFF3E6);
}

.page-news__article-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color, #FF8C1A);
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #A8A8A8; /* Lighter grey for meta info */
    margin-bottom: 15px;
}

.page-news__article-summary {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow summary to take available space */
}

.page-news__read-more {
    color: var(--aux-color, #FFA53A);
    font-weight: bold;
    text-decoration: underline;
    align-self: flex-start; /* Align to the start of the flex container */
}

.page-news__read-more:hover {
    color: #FFF3E6;
}

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

/* CTA Section */
.page-news__cta-section {
    background-color: var(--card-bg-color, #17191F); /* Use card background for this section */
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-news__cta-content {
    position: relative;
    z-index: 2;
}

.page-news__cta-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
    z-index: 1;
}

.page-news__cta-title {
    font-size: 2.8em;
    color: var(--primary-color, #FF8C1A);
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: var(--text-main-color, #FFF3E6);
}

.page-news__cta-buttons-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* General image styling for responsiveness */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below images */
}

/* Tablet responsiveness */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.5em;
    }
    .page-news__section-title,
    .page-news__cta-title {
        font-size: 2em;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__hero-content {
        margin-top: -80px;
        padding-top: 80px;
    }
}

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

    /* HERO 主图区域 */
    .page-news__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
        padding-bottom: 20px;
    }

    .page-news__hero-content {
        margin-top: -50px; /* Adjust overlap */
        padding-top: 50px; /* Compensate for overlap */
    }

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

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

    /* 通用图片与容器 */
    .page-news__container,
    .page-news__latest-articles-section,
    .page-news__cta-section,
    .page-news__cta-content,
    .page-news__articles-grid,
    .page-news__cta-buttons-group {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 其他内容模块 - Articles Grid */
    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-news__article-image {
        height: 180px; /* Adjust image height for mobile */
    }

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

    .page-news__article-summary {
        font-size: 0.95em;
    }

    /* 其他内容模块 - CTA Section */
    .page-news__cta-title {
        font-size: 1.8em;
    }

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

    /* 按钮与按钮容器 */
    .page-news__cta-buttons-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }

    .page-news__cta-button,
    .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-left: 15px;
        padding-right: 15px;
    }

    /* 所有图片 */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}