/* style/news.css */

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

/* Section padding for consistency */
.page-news__section-padding {
  padding: 60px 20px;
}

/* Container for content width */
.page-news__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Added horizontal padding for desktop */
  box-sizing: border-box;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding as body handles header offset */
  background-color: #FFFFFF;
}

.page-news__hero-image-wrapper {
  width: 100%;
  overflow: hidden;
}

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

.page-news__hero-content {
  padding: 40px 15px;
  max-width: 800px;
  margin-top: -80px; /* Overlap slightly for visual effect */
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.page-news__hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem); /* Responsive font size for H1 */
  font-weight: 700;
  line-height: 1.2;
  color: #26A9E0;
  margin-bottom: 20px;
}

.page-news__hero-description {
  font-size: 1.1rem;
  color: #555555;
  margin-bottom: 30px;
}

/* Section Titles */
.page-news__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem); /* Responsive font size for H2 */
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

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

/* Text Blocks */
.page-news__text-block {
  font-size: 1rem;
  color: #333333;
  text-align: justify;
  margin-bottom: 20px;
}

.page-news__text-block--light {
  color: #f0f0f0;
}

/* CTA Buttons */
.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin: 10px;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
}

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

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

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

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

.page-news__button-container {
  text-align: center;
  margin-top: 40px;
  display: flex; /* For multiple buttons */
  flex-wrap: wrap; /* Allow wrapping */
  justify-content: center;
  gap: 15px;
}

/* Featured News Grid */
.page-news__featured-news-section {
  background-color: #26A9E0; /* Brand color as background */
  color: #FFFFFF;
}

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

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

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

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

.page-news__news-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__news-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__news-card-date {
  font-size: 0.9rem;
  color: #777777;
  margin-bottom: 15px;
}

.page-news__news-card-excerpt {
  font-size: 1rem;
  color: #555555;
  line-height: 1.5;
}

/* Promotions Section */
.page-news__promotions-section {
  background-color: #FFFFFF;
}

/* Guides & Tips Section */
.page-news__guides-tips-section {
  background-color: #f8f8f8;
}

/* FAQ Section */
.page-news__faq-section {
  background-color: #FFFFFF;
}

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

.page-news__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-news__faq-item summary {
  list-style: none; /* Hide default marker */
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  background-color: #eaf6fc; /* Lighter blue for question background */
  border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-item[open] .page-news__faq-question {
  border-bottom: 1px solid #d0d0d0;
}

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

.page-news__faq-toggle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-left: 15px;
  color: #26A9E0;
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: #555555;
  line-height: 1.6;
}

/* Final CTA Section */
.page-news__cta-final-section {
  background-color: #26A9E0;
  color: #FFFFFF;
  text-align: center;
}

.page-news__cta-final-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-news__cta-final-content .page-news__cta-button {
  margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-content {
    margin-top: -60px;
    padding: 30px 15px;
  }

  .page-news__hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
  }

  .page-news__section-title {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  }
}

@media (max-width: 768px) {
  /* General mobile adjustments */
  .page-news__section-padding {
    padding: 40px 15px;
  }

  .page-news__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero section adjustments */
  .page-news__hero-image {
    max-height: 300px;
  }

  .page-news__hero-content {
    margin-top: -40px;
    padding: 25px 15px;
  }

  .page-news__hero-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-news__hero-description {
    font-size: 1rem;
  }

  /* News grid adjustments */
  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-news__news-card-image {
    height: 180px;
  }

  .page-news__news-card-title {
    font-size: 1.1rem;
  }

  /* CTA buttons adjustments */
  .page-news__cta-button {
    width: 100% !important; /* Force full width on mobile */
    padding: 12px 20px;
    font-size: 1rem;
    margin: 8px 0 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-news__button-container {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Images in content areas */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All image containers must be responsive */
  .page-news__hero-image-wrapper,
  .page-news__news-card,
  .page-news__news-card-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* FAQ adjustments */
  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-news__faq-answer {
    padding: 15px 20px;
  }
}