/* style/news.css */

/* Root variables for news page, using custom colors */
:root {
    --page-news-bg-color: #08160F;
    --page-news-card-bg: #11271B;
    --page-news-text-main: #F2FFF6;
    --page-news-text-secondary: #A7D9B8;
    --page-news-border-color: #2E7A4E;
    --page-news-glow-color: #57E38D;
    --page-news-gold-color: #F2C14E;
    --page-news-divider-color: #1E3A2A;
    --page-news-deep-green: #0A4B2C;
}

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

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

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

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

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 700px;
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.page-news__hero-content {
    position: relative; /* Ensure content is above image but not overlapping */
    z-index: 2; /* Ensure text is above image */
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    margin-top: -100px; /* Pull content up slightly, but not over image */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for readability */
    border-radius: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-news__main-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--page-news-gold-color);
    margin-bottom: 20px;
    max-width: 100%; /* Ensure H1 fits */
    word-wrap: break-word;
}

.page-news__hero-description {
    font-size: 1.1em;
    color: var(--page-news-text-main);
    margin-bottom: 30px;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: var(--page-news-text-main);
    border: 2px solid transparent;
}

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

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

.page-news__btn-secondary:hover {
    background: var(--page-news-glow-color);
    color: var(--page-news-bg-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(87, 227, 141, 0.4);
}

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

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

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

.page-news__news-card {
    background-color: var(--page-news-card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 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(--page-news-divider-color);
}

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

.page-news__card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

.page-news__card-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-news__card-title a {
    color: var(--page-news-text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: var(--page-news-glow-color);
}

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

.page-news__card-excerpt {
    font-size: 1em;
    color: var(--page-news-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__card-link {
    display: inline-block;
    color: var(--page-news-glow-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start;
}

.page-news__card-link:hover {
    text-decoration: underline;
}

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

.page-news__why-choose-section {
    background-color: var(--page-news-deep-green);
}

.page-news__flex-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

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

.page-news__image-block {
    flex: 1;
    text-align: center;
}

.page-news__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-news__feature-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-news__feature-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: var(--page-news-text-main);
    font-size: 1.05em;
    line-height: 1.5;
}

.page-news__feature-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: var(--page-news-glow-color);
    font-size: 1.2em;
    line-height: 1;
}

.page-news__faq-section {
    background-color: var(--page-news-bg-color);
}

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

.page-news__faq-item {
    background-color: var(--page-news-card-bg);
    border: 1px solid var(--page-news-divider-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--page-news-text-main);
    cursor: pointer;
    list-style: none;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question:hover {
    background-color: rgba(46, 122, 78, 0.2); /* Lighter hover for dark background */
}

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

.page-news__faq-item[open] .page-news__faq-toggle {
    content: '−';
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--page-news-text-secondary);
    line-height: 1.6;
}

.page-news__cta-bottom-section {
    text-align: center;
    background: linear-gradient(90deg, var(--page-news-deep-green), var(--page-news-bg-color));
    padding: 80px 0;
}

.page-news__cta-bottom-content {
    max-width: 800px;
}

.page-news__cta-bottom-title {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--page-news-gold-color);
    margin-bottom: 20px;
}

.page-news__cta-bottom-description {
    font-size: 1.2em;
    color: var(--page-news-text-main);
    margin-bottom: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-content {
        margin-top: -50px;
        padding: 30px 20px;
    }

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

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

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

    .page-news__image-block {
        order: -1; /* Image appears above text on smaller screens */
    }
}

@media (max-width: 768px) {
    /* Mobile specific overrides with !important */
    .page-news__container,
    .page-news__latest-news-section,
    .page-news__analysis-section,
    .page-news__why-choose-section,
    .page-news__faq-section,
    .page-news__cta-bottom-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .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;
    }

    .page-news__hero-section {
        min-height: 400px;
        padding: 40px 15px 20px 15px !important;
        padding-top: 10px !important; /* body already handles header offset */
    }

    .page-news__hero-content {
        margin-top: -30px;
        padding: 20px 15px;
        width: calc(100% - 30px) !important; /* Adjust for padding */
        box-sizing: border-box !important;
    }

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

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
        max-width: 100% !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-left: 15px !important;
        padding-right: 15px !important;
    }

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

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

    .page-news__news-grid {
        grid-template-columns: 1fr;
    }

    .page-news__why-choose-section .page-news__flex-container {
        flex-direction: column;
    }

    .page-news__feature-list li {
        font-size: 1em;
    }

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

    .page-news__faq-answer {
        padding: 0 20px 15px 20px;
    }

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

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