/* style/news.css */

/* Base Styles for the News Page */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: #121212; /* Inherited from shared.css, explicitly setting here for clarity */
}

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

.page-news__section-title {
  font-size: 32px;
  font-weight: bold;
  color: #FFD700; /* Gold color for section titles */
  text-align: center;
  margin-bottom: 40px;
  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: #CC0000; /* Red underline */
  border-radius: 2px;
}

/* Hero Banner Section */
.page-news__hero-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #CC0000, #FFD700); /* Brand colors gradient */
  color: #ffffff;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Adjust for fixed header if shared doesn't do it for body */
}

.page-news__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin-bottom: 40px;
}

.page-news__main-title {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__intro-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-news__cta-button {
  display: inline-block;
  background-color: #FFD700; /* Gold button */
  color: #333333; /* Dark text for gold button */
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
  background-color: #e6c200;
  transform: translateY(-3px);
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.15; /* Subtle background image */
}

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

/* Latest Articles Section */
.page-news__latest-articles {
  padding: 60px 0;
  background-color: #1a1a1a; /* Slightly lighter dark background */
}

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

.page-news__article-card {
  background-color: #2a2a2a; /* Darker card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-news__article-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.page-news__article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-news__article-title {
  font-size: 20px;
  font-weight: bold;
  color: #FFD700; /* Gold title */
  padding: 15px 20px 0;
  margin: 0;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-news__article-excerpt {
  font-size: 15px;
  color: #cccccc;
  padding: 0 20px;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-news__article-date {
  display: block;
  font-size: 13px;
  color: #999999;
  padding: 0 20px 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 15px;
}

.page-news__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 10px;
}

.page-news__pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #3a3a3a;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-item:hover {
  background-color: #CC0000; /* Red on hover */
  color: #ffffff;
}

.page-news__pagination-item.active {
  background-color: #CC0000; /* Active red */
  color: #ffffff;
}

/* Featured News Section */
.page-news__featured-news {
  padding: 60px 0;
  background-color: #121212; /* Main body background */
}

.page-news__featured-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column for featured */
  gap: 30px;
}

.page-news__featured-card {
  display: flex;
  background-color: #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__featured-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.page-news__featured-thumbnail {
  width: 40%;
  flex-shrink: 0;
  height: 250px;
  overflow: hidden;
}

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

.page-news__featured-content {
  padding: 20px;
  flex-grow: 1;
}

.page-news__featured-title {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-news__featured-excerpt {
  font-size: 16px;
  color: #cccccc;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Limit to 4 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-news__featured-date {
  display: block;
  font-size: 14px;
  color: #999999;
}

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #1a1a1a;
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

/* FAQ default state - answer hidden */
.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 20px;
  opacity: 0;
  background-color: #2a2a2a; /* Dark background for answer */
  color: #cccccc;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important, large value to accommodate content */
  padding: 20px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: #333333; /* Darker background for question */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #ffffff; /* White text for question */
}

.page-news__faq-question:hover {
  background-color: #444444;
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* Question title style */
.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: #FFD700; /* Gold color for FAQ questions */
}

/* Toggle icon */
.page-news__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Gold color for toggle icon */
  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; /* Larger hit area */
  height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #CC0000; /* Red when active */
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 20px;
  background: linear-gradient(90deg, #CC0000, #FFD700); /* Gradient background */
  text-align: center;
  color: #ffffff;
}

.page-news__cta-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

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

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  min-width: 180px; /* Ensure buttons have a minimum width */
  text-align: center;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
  background-color: #FFD700; /* Gold */
  color: #333333; /* Dark text */
  border: 2px solid #FFD700;
}

.page-news__btn-primary:hover {
  background-color: #e6c200;
  border-color: #e6c200;
  transform: translateY(-3px);
}

.page-news__btn-secondary {
  background-color: transparent;
  color: #ffffff; /* White text */
  border: 2px solid #ffffff;
}

.page-news__btn-secondary:hover {
  background-color: #ffffff;
  color: #CC0000; /* Red text */
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 40px;
  }
  .page-news__intro-description {
    font-size: 16px;
  }
  .page-news__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .page-news__featured-thumbnail {
    height: 200px;
  }
  .page-news__featured-title {
    font-size: 22px;
  }
  .page-news__featured-excerpt {
    font-size: 15px;
  }
  .page-news__cta-title {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__hero-banner {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px); /* Ensure mobile header offset */
  }
  .page-news__hero-content {
    margin-bottom: 30px;
  }
  .page-news__main-title {
    font-size: 32px;
  }
  .page-news__intro-description {
    font-size: 15px;
  }
  .page-news__cta-button {
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-news__latest-articles,
  .page-news__featured-news,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 0;
  }
  .page-news__article-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .page-news__article-thumbnail {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 18px;
    min-height: auto;
  }
  .page-news__article-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 4;
  }
  .page-news__article-date {
    font-size: 12px;
  }
  .page-news__pagination {
    margin-top: 30px;
    gap: 8px;
  }
  .page-news__pagination-item {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .page-news__featured-card {
    flex-direction: column; /* Stack featured card content */
  }
  .page-news__featured-link {
    flex-direction: column;
  }
  .page-news__featured-thumbnail {
    width: 100%;
    height: 220px;
  }
  .page-news__featured-title {
    font-size: 20px;
  }
  .page-news__featured-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 5;
  }
  .page-news__faq-list {
    padding: 0 15px;
  }
  .page-news__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-news__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px); /* Account for toggle icon */
  }
  .page-news__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  .page-news__faq-answer {
    padding: 0 15px;
  }
  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px !important;
  }
  .page-news__cta-title {
    font-size: 26px;
  }
  .page-news__cta-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-news__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important; /* Ensure buttons take full width */
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Mobile image adaptation */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__cta-buttons,
  .page-news__button-group,
  .page-news__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Exclude logo-item as per instructions */
  .page-news__logo-item {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 480px) {
  .page-news__main-title {
    font-size: 28px;
  }
  .page-news__cta-title {
    font-size: 24px;
  }
}