/* style/news.css */

/* Variables and Base Styles */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --dark-text: #333333;
  --light-text: #FFFFFF;
  --background-light: #f8f8f8;
  --background-dark: #26A9E0;
  --border-color: #e0e0e0;
  --button-hover-dark: #1e87b7; /* A darker shade of primary for hover */
}

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

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

.page-news__section-title {
  font-size: 32px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  position: relative;
  padding-bottom: 15px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.page-news__text-center {
  text-align: center;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #4dc2f7 100%); /* Lighter blue gradient */
  color: var(--light-text);
  overflow: hidden; /* Prevent image overflow */
}

.page-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-news__hero-image img:hover {
  transform: scale(1.02);
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px;
}

.page-news__hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--light-text);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-news__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.page-news__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background: var(--dark-text);
  color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Article Grid Section */
.page-news__latest-articles {
  padding: 80px 0;
  background-color: var(--background-light);
}

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

.page-news__article-card {
  background: var(--secondary-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__article-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-news__article-card img {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  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: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

.page-news__card-date {
  font-size: 14px;
  color: #777;
  margin-bottom: 15px;
}

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

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

.page-news__read-more-link:hover {
  color: var(--button-hover-dark);
  text-decoration: underline;
}

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

/* Featured Article Section */
.page-news__featured-article {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--light-text);
}

.page-news__featured-article .page-news__section-title {
  color: var(--light-text);
}

.page-news__featured-article .page-news__section-title::after {
  background-color: var(--light-text);
}

.page-news__featured-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-news__featured-image {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.page-news__featured-text {
  flex: 1;
}

.page-news__featured-text .page-news__card-title {
  font-size: 32px;
  margin-bottom: 15px;
  line-height: 1.2;
}

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

.page-news__featured-text .page-news__card-title a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.page-news__featured-text .page-news__card-date {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.page-news__featured-text .page-news__card-excerpt {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  font-size: 17px;
}

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

.page-news__cta-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 17px;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Crucial for mobile responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

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

.page-news__btn-primary:hover {
  background: var(--button-hover-dark);
  border-color: var(--button-hover-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.page-news__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--light-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-news__faq-question:active {
  background: #eeeeee;
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--dark-text);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--button-hover-dark);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  background: #f9f9f9;
  border-top: none;
  border-radius: 0 0 8px 8px;
}