/* style/news.css */

/* --- General Page Styles --- */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Body background from shared.css is #FFFFFF */
}

.page-news__section {
    padding: 60px 0;
    text-align: center;
}

.page-news__dark-section {
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF; /* White text for dark background */
}

.page-news__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

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

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from parent section */
}

.page-news__section-description {
    font-size: 18px;
    margin-bottom: 40px;
    color: inherit; /* Inherit color from parent section */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #017439, #FFFFFF); /* Blending brand color with white */
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px; /* Match container border-radius */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -80px; /* Overlap with image for better visual flow */
}

.page-news__hero-title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 15px;
    color: #017439; /* Primary brand color for title */
}

.page-news__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    color: #555555;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-news__cta-button:hover {
    background: #e02a2a; /* Slightly darker red on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Articles Grid (Latest News) --- */
.page-news__articles-grid,
.page-news__updates-grid,
.page-news__promotions-grid,
.page-news__insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.page-news__article-card,
.page-news__update-item,
.page-news__promo-card,
.page-news__insight-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have equal height */
}

.page-news__article-card:hover,
.page-news__update-item:hover,
.page-news__promo-card:hover,
.page-news__insight-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-card img,
.page-news__update-item img,
.page-news__promo-card img,
.page-news__insight-item img {
    width: 100%;
    height: 220px; /* Fixed height for consistent card image display */
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.page-news__article-content {
    padding: 25px;
    flex-grow: 1; /* Allow content to grow and push read-more to bottom */
    display: flex;
    flex-direction: column;
}

.page-news__article-title,
.page-news__update-title,
.page-news__promo-title,
.page-news__insight-title {
    font-size: 22px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-news__article-title a,
.page-news__update-title a,
.page-news__promo-title a,
.page-news__insight-title a {
    color: #017439; /* Primary color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover,
.page-news__update-title a:hover,
.page-news__promo-title a:hover,
.page-news__insight-title a:hover {
    color: #005f2f; /* Slightly darker green on hover */
}

.page-news__article-excerpt,
.page-news__update-text,
.page-news__promo-text,
.page-news__insight-text {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to grow and push read-more to bottom */
}

.page-news__read-more {
    display: inline-flex;
    align-items: center;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto; /* Push to bottom */
    transition: color 0.3s ease;
}

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

.page-news__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

.page-news__button-group {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
    background: #017439; /* Primary brand color */
    color: #FFFFFF;
    border-color: #017439;
}

.page-news__btn-primary:hover {
    background: #005f2f;
    border-color: #005f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-news__btn-secondary {
    background: #FFFFFF;
    color: #017439;
    border-color: #017439;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #005f2f;
    border-color: #005f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Game Updates Section (uses similar card styles) --- */
.page-news__game-updates .page-news__section-title,
.page-news__game-updates .page-news__section-description {
    color: #FFFFFF;
}

.page-news__update-item {
    background-color: #FFFFFF;
    color: #333333;
}
.page-news__update-item img {
    border-radius: 12px 12px 0 0;
}
.page-news__update-item .page-news__update-title a {
    color: #017439;
}
.page-news__update-item .page-news__read-more {
    color: #017439;
}

/* --- Promotions Section (uses similar card styles) --- */
.page-news__promotions-section .page-news__promo-card {
    background-color: #FFFFFF;
    color: #333333;
}
.page-news__promotions-section .page-news__promo-card img {
    border-radius: 12px 12px 0 0;
}
.page-news__promotions-section .page-news__promo-card .page-news__promo-title a {
    color: #017439;
}
.page-news__promotions-section .page-news__promo-card .page-news__btn-primary,
.page-news__promotions-section .page-news__promo-card .page-news__btn-secondary {
    width: fit-content; /* Allow buttons to take only necessary width */
    margin-top: 20px;
    align-self: flex-start; /* Align button to start in column layout */
}


/* --- Industry Insights Section (uses similar card styles) --- */
.page-news__industry-insights .page-news__section-title,
.page-news__industry-insights .page-news__section-description {
    color: #FFFFFF;
}

.page-news__insight-item {
    background-color: #FFFFFF;
    color: #333333;
}
.page-news__insight-item img {
    border-radius: 12px 12px 0 0;
}
.page-news__insight-item .page-news__insight-title a {
    color: #017439;
}
.page-news__insight-item .page-news__read-more {
    color: #017439;
}

/* --- FAQ Section --- */
.page-news__faq-section {
    text-align: center;
    background-color: #f9f9f9; /* Light background for FAQ */
}

.page-news__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: left;
}

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    background: #f9f9f9; /* Match section background */
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure it expands sufficiently */
    padding: 20px 15px !important;
    opacity: 1;
    border-radius: 0 0 5px 5px;
    background: #ffffff; /* White background for expanded answer */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-news__faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
}

.page-news__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: #005f2f;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    color: #333333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-news__faq-item.active .page-news__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #d0d0d0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.page-news__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-news__faq-question:active {
    background: #eeeeee;
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: #017439; /* Primary color for FAQ questions */
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #017439; /* Primary color when active */
    transform: rotate(45deg); /* Rotate for minus effect */
}

/* --- Bottom CTA Section --- */
.page-news__cta-bottom {
    padding: 80px 20px;
    text-align: center;
    background-color: #017439; /* Primary brand color */
    color: #FFFFFF;
}

.page-news__cta-bottom .page-news__cta-title {
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.page-news__cta-bottom .page-news__cta-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 36px;
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__section-title {
        font-size: 30px;
    }
    .page-news__section-description {
        font-size: 16px;
    }
    .page-news__article-title,
    .page-news__update-title,
    .page-news__promo-title,
    .page-news__insight-title,
    .page-news__faq-question h3 {
        font-size: 20px;
    }
    .page-news__cta-bottom .page-news__cta-title {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    /* Mobile specific padding for main content area */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure it applies to mobile */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-content {
        margin-top: -60px; /* Adjust overlap for mobile */
        padding: 20px;
    }
    .page-news__hero-title {
        font-size: 28px;
    }
    .page-news__hero-description {
        font-size: 16px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 18px;
        max-width: 100% !important; /* Mobile button adaptation */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__section {
        padding: 40px 0;
    }
    .page-news__container {
        padding: 0 15px; /* Adjust container padding for mobile */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .page-news__articles-grid,
    .page-news__updates-grid,
    .page-news__promotions-grid,
    .page-news__insights-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

    .page-news__article-card img,
    .page-news__update-item img,
    .page-news__promo-card img,
    .page-news__insight-item img {
         /* Smaller image height on mobile */
        max-width: 100% !important; /* Mobile image adaptation */
        width: 100% !important;
        height: auto !important; /* Use auto height for responsive images */
    }
    .page-news__article-content {
        padding: 20px;
    }
    .page-news__article-title,
    .page-news__update-title,
    .page-news__promo-title,
    .page-news__insight-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .page-news__article-excerpt,
    .page-news__update-text,
    .page-news__promo-text,
    .page-news__insight-text {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .page-news__button-group {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important; /* Mobile button adaptation */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 16px;
    }

    .page-news__faq-list {
        margin-top: 30px;
        padding: 0 15px;
    }
    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
    .page-news__faq-answer p {
        font-size: 15px;
    }

    .page-news__cta-bottom {
        padding: 50px 15px;
    }
    .page-news__cta-bottom .page-news__cta-title {
        font-size: 28px;
    }
    .page-news__cta-bottom .page-news__cta-description {
        font-size: 16px;
    }
}