/* style/news.css */

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

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

/* Hero Section */
.page-news__hero-section {
    padding-top: 10px; /* Small top padding, assuming body has --header-offset */
    background: linear-gradient(135deg, #017439, #00562c); /* Gradient background */
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}

.page-news__hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto; /* Image above text */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
    padding: 20px 0;
}

.page-news__main-title {
    font-size: 2.8em; /* Using em for relative sizing, will adjust for mobile */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__intro-text {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

/* News Section */
.page-news__news-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background for news list */
}

.page-news__section-title {
    font-size: 2.2em;
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-news__news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.page-news__news-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-news__card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9; /* Maintain aspect ratio */
}

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

.page-news__card-title {
    font-size: 1.3em;
    color: #017439;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
}

.page-news__card-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: #555;
    margin-bottom: 0;
}

/* CTA Buttons */
.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: #017439;
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__btn-primary:hover {
    background: #00562c;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background: #017439; /* Dark background for FAQ */
    color: #ffffff; /* Light text for dark background */
}

.page-news__section-title--light {
    color: #ffffff;
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border for dark background */
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for items */
}
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: #ffffff; /* Light text for question */
}
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: rgba(255, 255, 255, 0.2);
}
.page-news__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff; /* Light color for toggle icon */
  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: rgba(0, 0, 0, 0.2); /* Darker background for answer */
  border-radius: 0 0 5px 5px;
  color: #f0f0f0; /* Slightly off-white for answer text */
}

/* --- Responsive Styles (Mobile First) --- */

/* Mobile general styles */
@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
    }

    /* Hero Section */
    .page-news__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 30px;
    }

    .page-news__main-title {
        font-size: 2em; /* Smaller H1 for mobile */
        margin-bottom: 10px;
    }

    .page-news__intro-text {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .page-news__hero-image {
        margin-bottom: 15px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* News Section */
    .page-news__news-section {
        padding: 40px 0;
    }

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

    .page-news__news-list {
        grid-template-columns: 1fr; /* Single column for news cards */
        gap: 20px;
    }

    .page-news__card-title {
        font-size: 1.1em;
    }

    .page-news__card-date {
        font-size: 0.85em;
    }

    .page-news__card-excerpt {
        font-size: 0.9em;
    }

    /* CTA Buttons */
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        flex-wrap: wrap !important;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    /* 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; }
    details.page-news__faq-item .page-news__faq-answer { padding: 0 15px 15px; }

    /* Universal image and container responsiveness for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-news__hero-section,
    .page-news__news-section,
    .page-news__faq-section,
    .page-news__news-card,
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Override for .page-news__container to not add double padding */
    .page-news__container {
        padding-left: 0;
        padding-right: 0;
    }
}