/* style/news.css */

/* Base styles for the page content, considering body background is #08160F (dark) */
.page-news {
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px; /* Small top padding, more bottom padding */
  text-align: center;
  overflow: hidden; /* Ensure content doesn't spill */
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px; /* Limit height for hero image */
  margin-bottom: 40px; /* Space between image and text */
}

.page-news__hero-content {
  position: relative; /* Not absolute to overlap image */
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-news__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__description {
  font-size: 1.125rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons are responsive */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6; /* Text Main */
  border: none;
}

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background: transparent;
  color: #2AD16F; /* Brighter green for secondary text */
  border: 2px solid #2AD16F; /* Border color from button gradient start */
}

.page-news__btn-secondary:hover {
  background: rgba(42, 209, 111, 0.1);
  transform: translateY(-2px);
}

/* Section common styles */
.page-news__section {
  padding: 60px 0;
  border-bottom: 1px solid #1E3A2A; /* Divider */
}

.page-news__section:last-of-type {
  border-bottom: none;
}

.page-news__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
}

.page-news__text-block {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  max-width: 900px;
  margin: 0 auto 40px;
  text-align: center;
}

/* News Grid */
.page-news__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-news__news-card {
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-news__card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1; /* Allow title to take up available space */
}

.page-news__card-title a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: #2AD16F; /* Brighter green on hover */
}

.page-news__card-meta {
  font-size: 0.9rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-news__card-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
}

.page-news__read-more {
  display: inline-block;
  color: #57E38D; /* Glow */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom of card */
}

.page-news__read-more:hover {
  text-decoration: underline;
  color: #2AD16F;
}

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

/* Guides and Safety Section */
.page-news__guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__guide-card {
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-news__guide-card:hover {
  transform: translateY(-5px);
}

.page-news__guide-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
}

.page-news__guide-text {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
}

/* FAQ Section */
.page-news__faq-section {
  padding-bottom: 60px;
}

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

.page-news__faq-item {
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #2E7A4E; /* Border */
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  cursor: pointer;
  background-color: #0A4B2C; /* Deep Green */
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none;
}
.page-news__faq-item summary::marker {
  display: none;
}

.page-news__faq-question:hover {
  background-color: #13994A; /* Darker shade of button gradient */
}

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  border-top: 1px solid #1E3A2A; /* Divider */
}

.page-news__faq-item[open] .page-news__faq-question {
  background-color: #13994A;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-news__faq-answer p {
  margin-bottom: 10px;
}

.page-news__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-news__faq-answer a {
  color: #57E38D; /* Glow */
  text-decoration: underline;
}

.page-news__faq-answer a:hover {
  color: #2AD16F;
}

/* Final CTA Section */
.page-news__cta-final {
  text-align: center;
  padding: 80px 0;
}

.page-news__cta-final .page-news__container {
  background-color: #11A84E; /* Main color */
  border-radius: 15px;
  padding: 60px 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-news__section-title--light,
.page-news__description--light {
  color: #F2FFF6; /* Text Main */
}

.page-news__cta-final .page-news__description {
  margin-bottom: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-image {
    max-height: 400px;
  }
  .page-news__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .page-news__section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
}

@media (max-width: 768px) {
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 40px;
  }
  .page-news__hero-image {
    max-height: 300px;
    margin-bottom: 30px;
  }
  .page-news__hero-content {
    padding: 0 15px;
  }
  .page-news__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }
  .page-news__description {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  .page-news__cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__section {
    padding: 40px 0;
  }
  .page-news__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 30px;
  }
  .page-news__text-block {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  /* Images responsive */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__card-image {
    height: 200px; /* Adjust height for mobile cards */
  }

  .page-news__news-grid,
  .page-news__guides-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__news-card,
  .page-news__guide-card {
    padding: 20px;
  }
  .page-news__card-title {
    font-size: 1.1rem;
  }
  .page-news__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-news__faq-answer {
    padding: 15px 20px;
  }
  .page-news__cta-final .page-news__container {
    padding: 40px 20px;
  }
}

/* Ensure all content sections and their children respect max-width 100% and padding on mobile */
@media (max-width: 768px) {
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__hero-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}