/* 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: var(--secondary-color, #FFFFFF); /* Body background is light */
}

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

.page-news__section-title {
    font-size: 36px;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__section-description {
    font-size: 18px;
    color: #555555;
    text-align: center;
    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: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(135deg, #017439, #005a2d); /* Darker green gradient for hero */
    color: #ffffff;
    overflow: hidden; /* Ensure content 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;
    z-index: 1;
}

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

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

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

.page-news__hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFFFF;
}

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

/* CTA Button Styles */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Ensure padding/border included in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
    background: #C30808; /* Register color */
    color: #FFFF00; /* Register/Login font color */
    border: none;
}

.page-news__btn-primary:hover {
    background: #a80707;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
    background: #FFFFFF;
    color: #017439; /* Primary brand color */
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #005a2d;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
    background: #f9f9f9; /* Light background for articles */
    color: #333333;
}

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

.page-news__article-card {
    background: #ffffff;
    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;
}

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

.page-news__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent image size */
    overflow: hidden;
}

.page-news__article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-image img {
    transform: scale(1.05);
}

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

.page-news__article-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #005a2d;
    text-decoration: underline;
}

.page-news__article-meta {
    font-size: 14px;
    color: #888888;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more-btn {
    display: inline-flex;
    align-items: center;
    color: #C30808; /* Use register color for accent */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-btn:hover {
    color: #a80707;
}

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

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

.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #e0e0e0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-news__pagination-link:hover {
    background: #017439;
    color: #ffffff;
    border-color: #017439;
}

.page-news__pagination-link--active {
    background: #017439;
    color: #ffffff;
    border-color: #017439;
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background: #017439; /* Primary brand color as background */
    color: #ffffff;
}

.page-news__cta-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.page-news__cta-description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background: #FFFFFF; /* White background for FAQ */
    color: #333333;
}

.page-news__faq-list {
    margin-top: 40px;
}

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

.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 20px;
    opacity: 0;
    background: #f9f9f9;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure content fits */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #fff;
    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-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;
    color: #333333;
    pointer-events: none;
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Brand color for toggle */
    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: #C30808; /* Accent color when active */
    transform: rotate(45deg); /* Rotate to form an 'x' or similar */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 40px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__article-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__hero-title {
        font-size: 32px;
    }
    .page-news__hero-description {
        font-size: 16px;
    }
}