/* style/news.css */
.page-news {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff; /* Explicitly set for content area if body is not */
  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 {
  background-color: #26A9E0; /* Brand primary color */
  color: #ffffff;
  padding: 80px 20px;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px; /* Ensure hero section has some height */
}

.page-news__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-news__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: 2.2em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

.page-news__section-description,
.page-news__section-text {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #555555;
}

.page-news__dark-bg .page-news__section-title,
.page-news__dark-bg .page-news__section-description,
.page-news__dark-bg .page-news__section-text {
  color: #ffffff;
}

.page-news__bottom-text {
  margin-top: 40px;
  padding-bottom: 40px;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Ensure padding doesn't affect total width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't overflow */
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  border: 2px solid transparent;
}

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

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

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

/* Article Grid */
.page-news__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.page-news__article-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-news__article-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  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.3em;
  margin-bottom: 10px;
  color: #26A9E0;
}

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

.page-news__article-title a:hover {
  color: #1e87b7;
}

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

.page-news__read-more {
  display: inline-block;
  color: #EA7C07;
  text-decoration: none;
  font-weight: bold;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  text-decoration: underline;
}

/* Featured Video Section */
.page-news__featured-video {
  background-color: #26A9E0; /* Brand primary color */
  padding: 60px 20px;
  text-align: center;
}

.page-news__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px; /* Max width for video */
  margin: 30px auto;
  background-color: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-news__video-link {
  display: block; /* Make the whole video clickable */
  position: relative;
}

.page-news__video {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.page-news__video-cta {
  margin-top: 30px;
}

/* FAQ Section */
.page-news__faq-section {
  background-color: #f5f5f5; /* Light grey background */
  padding: 60px 20px;
}

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

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

.page-news__faq-item summary {
  list-style: none; /* Remove default marker */
  cursor: pointer;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: #26A9E0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.page-news__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

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

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

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to form cross */
}

.page-news__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: #555555;
}

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

/* Call to Action Section */
.page-news__cta-section {
  padding: 60px 20px;
  text-align: center;
  background-color: #ffffff;
}

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


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

@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }
  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    margin: 0 auto;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
  }
  .page-news__section-title {
    font-size: 1.6em;
    padding-top: 30px;
  }
  .page-news__section-description,
  .page-news__section-text {
    font-size: 0.95em;
    margin-bottom: 20px;
    padding: 0 15px;
  }
  .page-news__articles-grid {
    padding: 20px 0;
    gap: 20px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 1.1em;
  }
  .page-news__article-excerpt {
    font-size: 0.9em;
  }
  .page-news__video-wrapper {
    margin: 20px auto;
  }
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 15px;
  }
  .page-news__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }
  .page-news__faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 0.95em;
  }

  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section, /* General section styling for mobile */
  .page-news__card, /* Card containers */
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Mobile video responsiveness */
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  /* Ensure content areas have padding on mobile and prevent overflow */
  .page-news__latest-articles .page-news__container,
  .page-news__guides-tips .page-news__container {
    padding-left: 0;
    padding-right: 0;
  }
  .page-news__articles-grid {
    padding-left: 15px;
    padding-right: 15px;
  }
}