/* style/news.css */

/* Variables */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --dark-bg-color: #0a0a0a; /* Body background from shared.css */
  --light-text-color: #ffffff;
  --dark-text-color: #333333;
  --login-button-color: #EA7C07;
}

.page-news {
  color: var(--light-text-color); /* Default text color for dark body background */
  background-color: var(--dark-bg-color);
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-news__section-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  line-height: 1.2;
}

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

.page-news__btn-primary {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--light-text-color);
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
  border: none;
  cursor: pointer;
}

.page-news__btn-primary:hover {
  background-color: #1e87b8;
  transform: translateY(-2px);
}

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

.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-section .page-news__container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-news__hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--primary-color);
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.4rem;
  max-width: 900px;
  margin-bottom: 40px;
  line-height: 1.5;
  color: var(--light-text-color);
}

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

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

.page-news__news-card {
  background-color: rgba(255, 255, 255, 0.08);
  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;
  display: flex;
  flex-direction: column;
  color: var(--light-text-color);
}

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

.page-news__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-news__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__card-title {
  font-size: 1.5rem;
  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: var(--secondary-color);
}

.page-news__card-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.page-news__card-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  color: rgba(255, 255, 255, 0.9);
}

.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: var(--secondary-color);
  text-decoration: underline;
}

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

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

.page-news__featured-articles-section .page-news__section-description {
  color: rgba(255, 255, 255, 0.9);
}

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

.page-news__featured-card {
  background-color: rgba(0, 0, 0, 0.2);
  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;
  display: flex;
  flex-direction: column;
}

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

.page-news__featured-card .page-news__card-image {
  height: 300px;
}

.page-news__featured-card .page-news__card-title a {
  color: var(--light-text-color);
}

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

.page-news__featured-card .page-news__card-text {
  color: rgba(255, 255, 255, 0.9);
}

.page-news__featured-card .page-news__card-link {
  color: var(--secondary-color);
}

.page-news__featured-card .page-news__card-link:hover {
  color: var(--primary-color);
}

/* News Categories Section */
.page-news__news-categories-section {
  padding: 80px 0;
  background-color: var(--dark-bg-color);
}

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

.page-news__category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
  transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
  text-align: center;
  min-height: 100px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__category-card:hover {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Call to Action Section */
.page-news__cta-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  padding: 60px 0;
  overflow: hidden;
  color: var(--light-text-color);
  text-align: center;
  background-color: var(--dark-bg-color);
}

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

.page-news__cta-section .page-news__container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

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

.page-news__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: var(--light-text-color);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.page-news__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

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

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3rem;
  }
  .page-news__hero-description {
    font-size: 1.2rem;
  }
  .page-news__section-title {
    font-size: 2rem;
  }
  .page-news__news-card .page-news__card-title {
    font-size: 1.3rem;
  }
  .page-news__featured-card .page-news__card-title {
    font-size: 1.4rem;
  }
  .page-news__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__hero-section {
    min-height: 450px;
    padding: 60px 0;
  }
  .page-news__hero-title {
    font-size: 2.2rem;
  }
  .page-news__hero-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  .page-news__btn-primary {
    padding: 12px 25px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__section-title {
    font-size: 1.8rem;
  }
  .page-news__section-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  .page-news__news-grid,
  .page-news__featured-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__news-card,
  .page-news__featured-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
  }
  .page-news__card-image {
    height: 180px;
  }
  .page-news__featured-card .page-news__card-image {
    height: 250px;
  }
  .page-news__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .page-news__category-card {
    font-size: 1rem;
    padding: 15px;
    min-height: 80px;
  }
  .page-news__cta-section {
    min-height: 350px;
  }
  .page-news__faq-question {
    font-size: 1rem;
    padding: 18px 20px;
  }
  .page-news__faq-answer {
    padding: 10px 20px;
  }
  /* Mobile image responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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-buttons {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8rem;
  }
  .page-news__hero-description {
    font-size: 0.9rem;
  }
  .page-news__section-title {
    font-size: 1.6rem;
  }
  .page-news__news-card .page-news__card-title {
    font-size: 1.2rem;
  }
  .page-news__featured-card .page-news__card-title {
    font-size: 1.2rem;
  }
  .page-news__categories-grid {
    grid-template-columns: 1fr;
  }
}