/* style/news.css */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-login-color: #EA7C07;
}

.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--secondary-color); /* Default body background is light */
}

.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;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-news__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-light);
  /* H1 font-size constraint: use clamp or rely on other properties */
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.page-news__description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: var(--text-light);
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
  background-color: var(--button-login-color); /* Use specific login color */
  color: var(--text-light);
  border: 2px solid var(--button-login-color);
}

.page-news__btn-primary:hover {
  background-color: darken(var(--button-login-color), 10%); /* Example for darker hover */
  border-color: darken(var(--button-login-color), 10%);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.page-news__btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--primary-color);
}

/* Section Titles and Descriptions */
.page-news__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.page-news__section-description {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-dark);
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-news__latest-news-section .page-news__section-title,
.page-news__latest-news-section .page-news__section-description {
  color: var(--text-dark);
}

.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: var(--text-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

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

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

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

.page-news__card-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-news__card-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__card-title a:hover {
  color: darken(var(--primary-color), 10%);
}

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

.page-news__card-excerpt {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
}

.page-news__card-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__card-link:hover {
  color: darken(var(--primary-color), 10%);
}

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

/* Featured News Section */
.page-news__featured-news-section {
  padding: 60px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__featured-news-section .page-news__section-title,
.page-news__featured-news-section .page-news__section-description {
  color: var(--text-light);
}

.page-news__featured-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
}

.page-news__featured-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
}

.page-news__featured-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  object-fit: cover;
}

.page-news__item-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-news__item-date {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
}

.page-news__item-text {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
}

/* About Section */
.page-news__about-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-news__about-section .page-news__section-title,
.page-news__about-section .page-news__section-description {
  color: var(--text-dark);
}

.page-news__about-list {
  list-style: none;
  padding: 0;
  margin: 30px auto;
  max-width: 800px;
  text-align: left;
}

.page-news__about-list li {
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--text-dark);
  display: flex;
  align-items: flex-start;
}

.page-news__list-icon {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.3rem;
  margin-right: 10px;
  line-height: 1;
}

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

/* CTA Section */
.page-news__cta-section {
  padding: 60px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
  color: var(--text-light);
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--secondary-color);
}

.page-news__faq-section .page-news__section-title {
  color: var(--text-dark);
}

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-question:hover {
  background-color: #f0f0f0;
}

.page-news__faq-item[open] .page-news__faq-question {
  border-bottom-color: transparent;
}

.page-news__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg);
}

.page-news__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #555;
}

.page-news__faq-item:not([open]) .page-news__faq-answer {
  display: none; /* Hide answer when not open for <details> */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .page-news__container {
    padding: 0 15px; /* Adjust padding for mobile */
  }

  .page-news__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-news__main-title {
    font-size: clamp(2rem, 8vw, 2.8rem); /* Adjust H1 font size for mobile */
  }

  .page-news__description {
    font-size: 1rem;
  }

  .page-news__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px; /* Add padding to buttons container */
  }

  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
  }

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

  .page-news__section-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

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

  .page-news__card-image {
    height: 180px;
  }

  .page-news__card-title {
    font-size: 1.2rem;
  }

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

  .page-news__featured-items {
    gap: 30px;
  }

  .page-news__item-title {
    font-size: 1.5rem;
  }

  .page-news__item-text {
    font-size: 0.95rem;
  }

  .page-news__about-list li {
    font-size: 1rem;
  }

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

  /* Images and Videos responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__hero-image-wrapper,
  .page-news__latest-news-section,
  .page-news__featured-news-section,
  .page-news__about-section,
  .page-news__cta-section,
  .page-news__faq-section,
  .page-news__news-card,
  .page-news__featured-item,
  .page-news__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  /* Specific padding for sections to avoid content touching edges */
  .page-news__latest-news-section .page-news__container,
  .page-news__featured-news-section .page-news__container,
  .page-news__about-section .page-news__container,
  .page-news__cta-section .page-news__container,
  .page-news__faq-section .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-image {
    max-height: 400px; /* Adjust hero image height for mobile */
  }
}