/* style/news.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --button-register-login-bg: #C30808;
    --button-register-login-text: #FFFF00;
}

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

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

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

.page-news__dark-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__section-description,
.page-news__dark-section .page-news__update-title,
.page-news__dark-section .page-news__update-text,
.page-news__dark-section .page-news__promo-title a {
    color: var(--text-color-light);
}

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-news__dark-section .page-news__section-title {
    color: var(--secondary-color);
}

.page-news__section-description {
    font-size: 18px;
    margin-bottom: 40px;
    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-bottom: 60px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, #000000 100%); /* Darker gradient for hero */
    color: var(--text-color-light);
}

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

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto 30px auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-register-login-bg);
    color: var(--button-register-login-text);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--button-register-login-text);
}

/* Article Grid */
.page-news__articles-grid,
.page-news__insights-grid,
.page-news__promotions-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__insight-card,
.page-news__promo-card {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-image,
.page-news__insight-image,
.page-news__promo-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-news__article-content,
.page-news__insight-content,
.page-news__promo-content {
    padding: 25px;
}

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

.page-news__article-title a,
.page-news__insight-title a,
.page-news__promo-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover,
.page-news__insight-title a:hover,
.page-news__promo-title a:hover {
    color: #005f2e;
}

.page-news__article-summary,
.page-news__insight-summary,
.page-news__promo-summary {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
}

.page-news__read-more-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #005f2e;
    text-decoration: underline;
}

/* Platform Updates List */
.page-news__updates-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

.page-news__update-item {
    display: flex;
    align-items: center;
    gap: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__update-item:nth-child(even) {
    flex-direction: row-reverse;
}

.page-news__update-image {
    width: 40%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.page-news__update-content {
    flex: 1;
}

.page-news__update-title {
    font-size: 28px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color-light);
}

.page-news__update-text {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.8);
}

.page-news__button-group {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-news__btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-news__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-news__faq-item.active .page-news__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--primary-color);
    background-color: #f0fdf5; /* Light green for active question */
}

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

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-color-dark);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Change to X or rotate */
    color: var(--primary-color);
}

.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 25px;
    opacity: 0;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px 25px !important;
    opacity: 1;
}

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

.page-news__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

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

/* Call to Action at bottom */
.page-news__cta-content {
    padding: 40px 20px;
}

.page-news__cta-content .page-news__section-title,
.page-news__cta-content .page-news__section-description {
    color: var(--text-color-light);
}

.page-news__cta-content .page-news__cta-button {
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 40px;
    }
    .page-news__hero-description {
        font-size: 18px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__section-description {
        font-size: 16px;
    }
    .page-news__update-item {
        flex-direction: column;
        text-align: center;
    }
    .page-news__update-item:nth-child(even) {
        flex-direction: column;
    }
    .page-news__update-image {
        width: 80%;
        max-width: 500px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-image img {
        border-radius: 4px;
    }
    .page-news__main-title {
        font-size: 32px;
    }
    .page-news__hero-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        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__section-title {
        font-size: 28px;
    }
    .page-news__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-news__articles-grid,
    .page-news__insights-grid,
    .page-news__promotions-grid {
        gap: 20px;
    }
    .page-news__article-image,
    .page-news__insight-image,
    .page-news__promo-image {
        height: 180px;
    }
    .page-news__article-content,
    .page-news__insight-content,
    .page-news__promo-content {
        padding: 15px;
    }
    .page-news__article-title,
    .page-news__insight-title,
    .page-news__promo-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .page-news__article-summary,
    .page-news__insight-summary,
    .page-news__promo-summary {
        font-size: 14px;
        margin-bottom: 15px;
    }
    .page-news__read-more-link {
        font-size: 14px;
    }
    .page-news__updates-list {
        gap: 20px;
    }
    .page-news__update-item {
        padding: 20px;
    }
    .page-news__update-image {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    .page-news__update-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    .page-news__update-text {
        font-size: 15px;
    }
    .page-news__button-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px !important;
    }
    .page-news__faq-answer p {
        font-size: 15px;
    }
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !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;
    }
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-news__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 28px;
    }
    .page-news__section-title {
        font-size: 24px;
    }
    .page-news__article-image,
    .page-news__insight-image,
    .page-news__promo-image {
        height: 150px;
    }
    .page-news__article-title a,
    .page-news__insight-title a,
    .page-news__promo-title a {
        font-size: 17px;
    }
    .page-news__update-title {
        font-size: 20px;
    }
}