/* style/news.css */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --bg-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
}

.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    overflow: hidden;
    background-color: var(--deep-green);
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1920px;
    margin-bottom: 30px;
}

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

.page-news__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-news__main-title {
    color: var(--gold-color);
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.page-news__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.page-news__section {
    padding: 60px 0;
    background-color: var(--bg-color);
    color: var(--text-main);
}

.page-news__section.page-news__light-bg {
    background-color: #f8f8f8; /* A lighter background for contrast */
    color: #333333;
}

.page-news__section.page-news__dark-bg {
    background-color: var(--bg-color);
    color: var(--text-main);
}

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

.page-news__section-title {
    text-align: center;
    color: var(--gold-color);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.page-news__section-description {
    text-align: center;
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__news-grid,
.page-news__promotions-grid,
.page-news__security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-news__news-card,
.page-news__promotion-card,
.page-news__security-item {
    background-color: var(--card-bg);
    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;
    border: 1px solid var(--border-color);
}

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

.page-news__news-card-image,
.page-news__promotion-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-news__news-card-content,
.page-news__promotion-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__news-card-title,
.page-news__promotion-card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--gold-color);
}

.page-news__news-card-title a,
.page-news__promotion-card-title a {
    color: var(--gold-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover,
.page-news__promotion-card-title a:hover {
    color: var(--glow-color);
}

.page-news__news-card-meta {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-news__news-card-text,
.page-news__promotion-card-text {
    color: var(--text-main);
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__news-card-link,
.page-news__promotion-card-link {
    display: inline-block;
    background-color: var(--deep-green);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-news__news-card-link:hover,
.page-news__promotion-card-link:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-news__view-all-button {
    text-align: center;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure long words break */
    box-sizing: border-box;
}

.page-news__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(42, 209, 111, 0.3);
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(42, 209, 111, 0.4);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--glow-color);
    border: 2px solid var(--glow-color);
    margin-left: 20px;
}

.page-news__btn-secondary:hover {
    background-color: var(--glow-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

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

.page-news__mobile-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-news__mobile-content {
    flex: 1;
    min-width: 300px;
}

.page-news__mobile-image-wrapper {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

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

.page-news__mobile-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.page-news__mobile-features li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--text-main);
}

.page-news__feature-icon {
    color: var(--glow-color);
    font-size: 1.5em;
    margin-right: 10px;
}

.page-news__security-item {
    text-align: center;
    padding: 30px;
}

.page-news__security-title {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-bottom: 15px;
}

.page-news__security-text {
    color: var(--text-secondary);
}

.page-news__security-cta {
    margin-top: 50px;
}

.page-news__faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-news__faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.page-news__faq-item[open] {
    background-color: var(--deep-green);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.3s ease;
    list-style: none; /* For details/summary native styling */
}

.page-news__faq-question::-webkit-details-marker {
    display: none;
}

.page-news__faq-item[open] .page-news__faq-question {
    color: var(--gold-color);
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--glow-color);
}

.page-news__faq-answer {
    padding: 0 25px 20px;
    color: var(--text-secondary);
    font-size: 1.05em;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.page-news__faq-item[open] .page-news__faq-answer {
    max-height: 500px; /* Sufficient height for most answers */
    transition: max-height 0.5s ease-in;
}

.page-news__faq-answer p {
    margin-top: 0;
    margin-bottom: 0;
}

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

.page-news__conclusion .page-news__section-description {
    font-size: 1.2em;
    max-width: 900px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }

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

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

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

    .page-news__description {
        font-size: 1em;
    }

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

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

    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-news__section {
        padding: 40px 0;
    }

    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__news-grid,
    .page-news__promotions-grid,
    .page-news__security-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__news-card-image,
    .page-news__promotion-card-image {
        height: 180px;
    }

    .page-news__news-card-title,
    .page-news__promotion-card-title {
        font-size: 1.2em;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__mobile-flex {
        flex-direction: column;
        gap: 30px;
    }

    .page-news__mobile-content,
    .page-news__mobile-image-wrapper {
        min-width: unset;
        width: 100%;
    }

    .page-news__mobile-image {
        max-width: 100%;
    }

    /* Mobile image and container responsive rules */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }

    .page-news__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95em;
    }

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

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }

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

    .page-news__news-card-content,
    .page-news__promotion-card-content,
    .page-news__security-item {
        padding: 20px;
    }
}

/* Ensure h1 in hero section does not have fixed large font size */
.page-news__hero-content h1 {
    font-size: clamp(2em, 5vw, 3.5em); /* Example clamp for responsive H1 */
}

/* Color contrast safety for light background sections */
.page-news__light-bg .page-news__section-title,
.page-news__light-bg .page-news__section-description,
.page-news__light-bg .page-news p,
.page-news__light-bg .page-news li,
.page-news__light-bg .page-news__faq-question,
.page-news__light-bg .page-news__faq-answer {
    color: #333333; /* Ensuring dark text on light background */
}

.page-news__light-bg .page-news__card {
    background-color: #ffffff;
    color: #333333;
    border-color: #e0e0e0;
}

.page-news__light-bg .page-news__faq-toggle {
    color: var(--primary-color);
}

.page-news__light-bg .page-news__faq-item[open] .page-news__faq-question {
    color: var(--primary-color);
}

.page-news__hero-section .page-news__cta-buttons .page-news__btn-secondary {
    background-color: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
}

.page-news__hero-section .page-news__cta-buttons .page-news__btn-secondary:hover {
    background-color: var(--gold-color);
    color: var(--bg-color);
}