/* style/news.css */

/* --- General Styles for page-news scope --- */
.page-news {
  color: #ffffff; /* Light text for dark body background */
  background-color: #000000; /* Body background is black */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #FF0000; /* Primary color for titles */
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 15px;
}

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

.page-news__btn-primary {
  display: inline-block;
  background-color: #FF0000; /* Primary brand color */
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: 2px solid #FF0000;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow word break */
}

.page-news__btn-primary:hover {
  background-color: #e60000; /* Darker red on hover */
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #FF0000; /* Primary brand color for text */
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  border: 2px solid #FF0000;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow word break */
}

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

/* --- Hero Section --- */
.page-news__hero-section {
  position: relative;
  padding: 80px 0;
  background-color: #000000; /* Ensure dark background */
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Assuming shared.css does NOT set body padding-top */
}

.page-news__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-news__hero-title {
  font-size: 52px;
  color: #FF0000; /* Primary color for H1 */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 900;
  text-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 18px;
  color: #f0f0f0; /* Light text for dark background */
  margin-bottom: 40px;
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.page-news__article-card {
  background-color: #000000; /* Dark background for cards */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 0, 0, 0.2); /* Subtle border with brand color */
}

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

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

.page-news__article-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

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

.page-news__article-content {
  padding: 20px;
}

.page-news__article-title {
  font-size: 20px;
  font-weight: bold;
  color: #FF0000; /* Primary color for article titles */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-news__article-summary {
  font-size: 15px;
  color: #cccccc; /* Lighter grey for summary */
  margin-bottom: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-news__article-date {
  font-size: 13px;
  color: #888888; /* Grey for date */
  display: block;
}

.page-news__load-more {
  text-align: center;
  margin-top: 40px;
}

/* --- Call to Action Section --- */
.page-news__cta-section {
  padding: 80px 0;
  background-color: #000000; /* Dark background */
}

.page-news__cta-section .page-news__container {
  background-color: #FF0000; /* Primary color background */
  padding: 50px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.4);
}

.page-news__cta-title {
  font-size: 38px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-news__cta-description {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-news__newsletter-form {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-news__newsletter-input {
  padding: 12px 20px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px;
  flex-grow: 1;
  max-width: 350px;
  box-sizing: border-box;
}

.page-news__newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.page-news__cta-note {
  font-size: 16px;
  color: #ffffff;
  margin-bottom: 25px;
}

.page-news__cta-main-btn {
  font-size: 20px;
  padding: 15px 35px;
  background-color: #000000; /* Black button on red background */
  border-color: #000000;
}

.page-news__cta-main-btn:hover {
  background-color: #333333;
  border-color: #333333;
}

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

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000000; /* Dark background for FAQ item */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: #000000; /* Dark background */
  border: 1px solid rgba(255, 0, 0, 0.3);
  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: #0d0d0d; /* Slightly lighter dark on hover */
  border-color: #FF0000;
}

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

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FF0000; /* Primary color for toggle */
  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: 30px;
  height: 30px;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: #ffffff; /* White when active */
  transform: rotate(45deg); /* Rotate for minus sign 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-color: #0d0d0d; /* Slightly lighter dark for answer background */
  color: #cccccc; /* Light grey text */
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to show all content */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-news__faq-answer p {
  margin: 0;
  color: #cccccc; /* Ensure paragraph text is light */
}

/* --- Responsive Design --- */
/* Tablet: @media (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 44px;
  }
  .page-news__hero-description {
    font-size: 17px;
  }
  .page-news__section-title {
    font-size: 32px;
  }
  .page-news__articles-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns on tablet */
    gap: 25px;
  }
  .page-news__article-image {
    height: 200px;
  }
  .page-news__cta-title {
    font-size: 32px;
  }
}

/* Mobile: @media (max-width: 768px) */
@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-news__container {
    padding: 0 15px;
  }

  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-news__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
  }

  .page-news__hero-title {
    font-size: 36px;
  }

  .page-news__hero-description {
    font-size: 16px;
  }

  .page-news__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  
  .page-news__hero-actions .page-news__btn-primary,
  .page-news__hero-actions .page-news__btn-secondary {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-news__latest-articles {
    padding: 60px 0;
  }

  .page-news__articles-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

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

  .page-news__article-title {
    font-size: 18px;
  }

  .page-news__article-summary {
    font-size: 14px;
  }

  .page-news__load-more {
    margin-top: 30px;
  }

  .page-news__cta-section {
    padding: 60px 0;
  }

  .page-news__cta-section .page-news__container {
    padding: 30px 20px;
  }

  .page-news__cta-title {
    font-size: 28px;
  }

  .page-news__cta-description {
    font-size: 16px;
  }

  .page-news__newsletter-form {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__newsletter-input {
    max-width: 100%;
  }
  
  .page-news__newsletter-form .page-news__btn-primary {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-news__cta-main-btn {
    font-size: 18px;
    padding: 12px 25px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-news__faq-section {
    padding: 60px 0;
  }

  .page-news__faq-item {
    margin-bottom: 10px;
  }

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

  .page-news__faq-question h3 {
    font-size: 16px;
  }

  .page-news__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

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

  .page-news__faq-item.active .page-news__faq-answer {
    padding: 15px 20px !important;
  }

  /* Universal image responsive for content area */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* Ensure all content containers are responsive */
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__newsletter-form {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Button responsive styles */
  .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-left: 15px;
    padding-right: 15px;
  }

  .page-news__hero-actions,
  .page-news__newsletter-form {
    flex-wrap: wrap !important;
    gap: 15px;
    justify-content: center;
  }

  .page-news__hero-actions a,
  .page-news__newsletter-form button {
    width: 100%;
    max-width: 280px;
  }
}