/* style/news.css */

/* CSS Variables for consistent styling */
:root {
  --primary-color: #0A2342;
  --secondary-color: #E0B400;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212; /* Inherited from shared.css body background */
  --card-bg-dark: rgba(255, 255, 255, 0.08);
  --border-color-dark: rgba(255, 255, 255, 0.15);
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark);
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-news__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
  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: var(--secondary-color);
  border-radius: 2px;
}

.page-news__description {
  font-size: 18px;
  color: var(--text-light);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px;
}

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

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  padding: 80px 0;
  overflow: hidden;
  color: var(--text-light);
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3;
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.page-news__main-title {
  font-size: 52px;
  font-weight: 900;
  color: var(--secondary-color);
  margin-bottom: 25px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.page-news__hero-content .page-news__description {
  font-size: 20px;
  margin-bottom: 40px;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

/* Categories Section */
.page-news__categories-section {
  padding: 80px 0;
  background-color: var(--primary-color);
}

.page-news__categories-section .page-news__section-title {
  color: var(--secondary-color);
}

.page-news__categories-section .page-news__description {
  color: rgba(255, 255, 255, 0.8);
}

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

.page-news__category-card {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-color-dark);
}

.page-news__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.page-news__category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-news__category-card .page-news__category-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary-color);
  padding: 15px 20px 10px;
  margin: 0;
}

.page-news__category-card .page-news__category-excerpt {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 20px 20px;
  flex-grow: 1;
}

/* Latest Articles Section */
.page-news__latest-articles-section {
  padding: 80px 0;
  background-color: var(--bg-dark);
}

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

.page-news__article-card {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color-dark);
}

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

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

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

.page-news__article-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-news__article-title a:hover {
  color: var(--text-light);
}

.page-news__article-excerpt {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.page-news__article-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 20px;
}

.page-news__read-more-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__read-more-button:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

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

.page-news__pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background-color: var(--card-bg-dark);
  color: var(--text-light);
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--border-color-dark);
}

.page-news__pagination-link:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.page-news__pagination-link--active {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  pointer-events: none;
}

/* Benefits Section */
.page-news__benefits-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

.page-news__benefits-section .page-news__section-title {
    color: var(--secondary-color);
}

.page-news__benefits-section .page-news__description {
    color: rgba(255, 255, 255, 0.8);
}

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

.page-news__benefit-item {
    background-color: var(--card-bg-dark);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--border-color-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.page-news__benefit-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.page-news__benefit-item p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

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

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

.page-news__faq-section .page-news__description {
  color: rgba(255, 255, 255, 0.8);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--card-bg-dark);
  border: 1px solid var(--border-color-dark);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

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

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevents 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 {
  transform: rotate(45deg);
  color: var(--text-light);
}

.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;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to accommodate content */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(0, 0, 0, 0.2); /* Slightly darker background for open answer */
  border-radius: 0 0 10px 10px;
}

.page-news__faq-answer p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.page-news__faq-answer a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: var(--text-light);
}

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

.page-news__cta-bottom-content {
  max-width: 900px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__main-title {
    font-size: 44px;
  }

  .page-news__section-title {
    font-size: 32px;
  }

  .page-news__description {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-news {
    padding-top: var(--header-offset, 120px) !important;
    font-size: 16px;
  }

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

  .page-news__hero-section,
  .page-news__categories-section,
  .page-news__latest-articles-section,
  .page-news__benefits-section,
  .page-news__faq-section,
  .page-news__cta-bottom-section {
    padding: 50px 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-news__main-title {
    font-size: 36px;
    margin-bottom: 15px;
  }

  .page-news__hero-content .page-news__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-news__section-title {
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 10px;
  }

  .page-news__description {
    font-size: 15px;
    margin-bottom: 40px;
  }

  .page-news__cta-button {
    font-size: 18px;
    padding: 12px 30px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-news__category-grid,
  .page-news__article-grid,
  .page-news__benefits-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-news__category-card img,
  .page-news__article-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain; /* Adjust to contain for better mobile viewing */
  }

  .page-news__category-card,
  .page-news__article-card,
  .page-news__benefit-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-news__read-more-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center;
  }

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

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

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

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

  .page-news__pagination {
    margin-top: 40px;
  }
}

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

  .page-news__section-title {
    font-size: 24px;
  }

  .page-news__hero-content .page-news__description {
    font-size: 15px;
  }

  .page-news__cta-button {
    font-size: 16px;
    padding: 10px 25px;
  }

  .page-news__category-card .page-news__category-title,
  .page-news__benefit-title {
    font-size: 20px;
  }

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

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

/* General image and video responsiveness */
.page-news img, .page-news video {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-news__category-card img, .page-news__article-card img {
    object-fit: cover;
}

.page-news__video-section, .page-news__video-container, .page-news__video-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-news img, .page-news video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__category-card img, .page-news__article-card img {
        object-fit: contain; /* Ensure images fit within cards on mobile */
    }

    .page-news__section, .page-news__card, .page-news__container, .page-news__hero-section, .page-news__categories-section, .page-news__latest-articles-section, .page-news__benefits-section, .page-news__faq-section, .page-news__cta-bottom-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .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;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-news__cta-button, .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;
    }
}