/* style/news.css */

/* General styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #f9f9f9; /* Light background for the page */
}

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

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    background-color: #017439; /* Brand color background for hero section */
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit hero image height */
}

.page-news__hero-content {
    text-align: center;
    padding: 40px 20px;
    color: #FFFFFF;
}

.page-news__main-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Articles Section */
.page-news__articles-section {
    padding: 60px 0;
    background-color: #FFFFFF; /* Light background for articles */
}

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

.page-news__article-card {
    background: #f9f9f9;
    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 {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-news__article-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    padding: 20px;
}

.page-news__article-title {
    font-size: 20px;
    font-weight: 700;
    color: #017439;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-excerpt {
    font-size: 15px;
    color: #555555;
    margin-bottom: 15px;
}

.page-news__article-date {
    font-size: 14px;
    color: #888888;
    display: block;
}

.page-news__view-all-button {
    text-align: center;
    margin-top: 20px;
}

.page-news__btn-primary {
    display: inline-block;
    background-color: #017439;
    color: #FFFFFF;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary:hover {
    background-color: #005a2d;
    transform: translateY(-2px);
}

/* CTA Section */
.page-news__cta-section {
    background-color: #017439;
    color: #FFFFFF;
    padding: 60px 0;
    text-align: center;
}

.page-news__cta-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.page-news__cta-description {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-news__btn-register,
.page-news__btn-login {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-register {
    background-color: #C30808; /* Custom color for register */
    color: #FFFF00; /* Custom font color for register */
    border: 2px solid #C30808;
}

.page-news__btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(195, 8, 8, 0.4);
}

.page-news__btn-login {
    background-color: #FFFFFF;
    color: #C30808; /* Custom color for login */
    border: 2px solid #FFFFFF;
}

.page-news__btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

details.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #fff;
}
details.page-news__faq-item summary.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    color: #333333; /* Ensure contrast */
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
    display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
    background: #f5f5f5;
}
.page-news__faq-qtext {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #017439; /* Brand color for question text */
}
.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
    padding: 0 20px 20px;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #333333; /* Ensure contrast */
}
.page-news__faq-answer p {
    margin: 0;
    font-size: 16px;
}


/* --- Responsive Styles --- */

/* Tablet and Mobile (max-width: 1024px) - General adjustments if needed */
@media (max-width: 1024px) {
    .page-news__hero-content {
        padding: 30px 15px;
    }
    .page-news__main-title {
        font-size: clamp(28px, 5vw, 40px);
    }
    .page-news__description {
        font-size: 16px;
    }
    .page-news__section-title {
        font-size: 32px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__cta-title {
        font-size: 28px;
    }
    .page-news__cta-description {
        font-size: 16px;
    }
    .page-news__btn-register,
    .page-news__btn-login {
        padding: 12px 25px;
        font-size: 16px;
    }
    .page-news__faq-qtext {
        font-size: 16px;
    }
}


/* Mobile (max-width: 768px) - Must include all required sections */
@media (max-width: 768px) {
    /* Hero Section */
    .page-news__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    }
    .page-news__hero-image {
        max-height: 300px;
    }
    .page-news__hero-content {
        padding: 20px 15px;
    }
    .page-news__main-title {
        /* font-size: 28px; */ /* Removed fixed font-size as per rule */
        margin-bottom: 15px;
        line-height: 1.3;
    }
    .page-news__description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Articles Section */
    .page-news__articles-section {
        padding: 40px 0;
    }
    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 30px;
        padding-top: 20px;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
    }
    .page-news__article-card {
        margin: 0 15px; /* Add horizontal margin for cards */
    }
    .page-news__article-image {
        height: 180px; /* Adjust height for mobile */
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-excerpt {
        font-size: 14px;
    }
    .page-news__article-date {
        font-size: 13px;
    }

    /* CTA Section */
    .page-news__cta-section {
        padding: 40px 15px;
    }
    .page-news__cta-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-news__cta-description {
        font-size: 15px;
        margin-bottom: 25px;
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
    }
    .page-news__btn-register,
    .page-news__btn-login {
        padding: 12px 20px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* FAQ Section */
    .page-news__faq-section {
        padding: 40px 0;
    }
    details.page-news__faq-item summary.page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-qtext {
        font-size: 15px;
    }
    .page-news__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    details.page-news__faq-item .page-news__faq-answer {
        padding: 0 15px 15px;
    }
    .page-news__faq-answer p {
        font-size: 14px;
    }

    /* General image and container responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .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__view-all-button a {
        padding: 10px 20px;
        font-size: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0 15px; /* Add margin to align with cards */
    }
}