/* style/news.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-font-color: #FFFF00;
    --bg-light: #FFFFFF;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Body background is light, so use dark text */
    background-color: var(--bg-light);
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

/* Hero Section */
.page-news__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    position: relative;
}

.page-news__hero-title {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
}

.page-news__hero-cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-top: 20px;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* General Section Styling */
.page-news__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
}

/* Article Grid */
.page-news__latest-articles {
    padding: 60px 0;
    background-color: var(--bg-light);
}

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

.page-news__article-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 10px;
    flex-grow: 1;
}

.page-news__article-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-news__article-title a:hover {
    text-decoration: underline;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.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; /* Darker shade of primary */
}

/* Featured Topics */
.page-news__featured-topics {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.page-news__topic-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-news__topic-item {
    background-color: var(--primary-color);
    border-radius: 25px;
    padding: 10px 25px;
    transition: background-color 0.3s ease;
}

.page-news__topic-item:hover {
    background-color: #005f2e;
}

.page-news__topic-item a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
}

/* Call to Action Section */
.page-news__cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-news__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin-bottom: 40px;
}

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    z-index: 1; /* Ensure buttons are above image */
}

.page-news__cta-image-wrapper {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%; /* Adjust as needed */
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.page-news__cta-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: var(--button-register-bg);
    color: var(--button-font-color);
    border: 2px solid var(--button-register-bg);
}

.page-news__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

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

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

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

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

.page-news__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: #f9f9f9;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question-text {
    margin: 0;
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Plus sign to X or minus */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 15px 25px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.5em;
    }

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

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

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__featured-topics,
    .page-news__cta-section,
    .page-news__faq-section {
        padding: 40px 0 !important;
    }

    .page-news__container {
        padding: 0 15px !important;
    }

    .page-news__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-news__hero-cta-buttons,
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }

    .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: 12px 20px;
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-news__article-card {
        margin-bottom: 20px;
    }

    .page-news__article-image {
        height: 180px;
    }

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

    .page-news__topic-list {
        flex-direction: column;
        align-items: center;
    }

    .page-news__topic-item {
        width: 100%;
        max-width: 300px;
    }

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

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

    .page-news__cta-image-wrapper {
        position: relative;
        width: 100%;
        opacity: 0.15;
        margin-top: 30px;
    }

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

    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__featured-topics,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__articles-grid,
    .page-news__article-card,
    .page-news__cta-buttons,
    .page-news__cta-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
}