/* style/news.css */

/* Base Styles & Typography */
.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: var(--background-color, #ffffff);
}

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

.page-news__section-title {
  font-size: 2.5em;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 100px 0 60px 0; /* Adjusted for header offset, assuming shared.css handles body padding */
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.2; /* To ensure text readability */
}

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 1;
  padding-top: 0; /* Avoid double padding if body already has header offset */
}

.page-news__hero-title {
  font-size: 3.5em;
  color: #017439;
  margin-bottom: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.3em;
  color: #333333;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-news__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

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

/* Card Grid Layouts */
.page-news__news-grid,
.page-news__promo-grid,
.page-news__guide-grid,
.page-news__stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__news-card,
.page-news__promo-card,
.page-news__guide-card,
.page-news__story-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-card:hover,
.page-news__promo-card:hover,
.page-news__guide-card:hover,
.page-news__story-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-news__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-news__news-card h3,
.page-news__promo-card h3,
.page-news__guide-card h3,
.page-news__story-card h3 {
  font-size: 1.4em;
  margin: 20px 20px 10px 20px;
  color: #017439;
  font-weight: bold;
}

.page-news__news-card h3 a,
.page-news__guide-card h3 a,
.page-news__story-card h3 a {
  text-decoration: none;
  color: #017439;
  transition: color 0.3s ease;
}

.page-news__news-card h3 a:hover,
.page-news__guide-card h3 a:hover,
.page-news__story-card h3 a:hover {
  color: #005a2d;
}

.page-news__news-card p,
.page-news__promo-card p,
.page-news__guide-card p,
.page-news__story-card p {
  font-size: 1em;
  color: #555555;
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more-link {
  display: inline-block;
  color: #C30808;
  text-decoration: none;
  font-weight: bold;
  padding: 0 20px 20px 20px;
  transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
  color: #a30606;
  text-decoration: underline;
}

/* Section Styling */
.page-news__latest-news,
.page-news__game-guides,
.page-news__faq-section {
  padding: 80px 0;
}

.page-news__promotions-events,
.page-news__player-stories,
.page-news__cta-section {
  padding: 80px 0;
  background-color: #017439;
  color: #ffffff;
}

.page-news__promotions-events .page-news__section-title,
.page-news__player-stories .page-news__section-title,
.page-news__cta-section .page-news__section-title {
  color: #ffffff;
}

.page-news__promotions-events .page-news__section-description,
.page-news__player-stories .page-news__section-description,
.page-news__cta-section .page-news__section-description {
  color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-list {
  margin-top: 40px;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
  transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
  background-color: #f0f0f0;
}

.page-news__faq-title {
  font-size: 1.2em;
  color: #017439;
  margin: 0;
  font-weight: bold;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #017439;
  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 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large */
  padding: 20px;
}

.page-news__faq-answer p {
  margin: 0;
  color: #555555;
}

/* CTA Section */
.page-news__cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

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

.page-news__cta-section .page-news__container {
  position: relative;
  z-index: 1;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 3em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
}

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

  .page-news__hero-section {
    padding: 80px 0 40px 0;
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
  }

  .page-news__hero-title {
    font-size: 2.5em;
  }

  .page-news__hero-description {
    font-size: 1.1em;
  }

  .page-news__section-title {
    font-size: 1.8em;
  }

  .page-news__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-news__latest-news,
  .page-news__promotions-events,
  .page-news__game-guides,
  .page-news__player-stories,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 60px 0;
  }

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

  .page-news__news-grid,
  .page-news__promo-grid,
  .page-news__guide-grid,
  .page-news__stories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-news__news-card h3,
  .page-news__promo-card h3,
  .page-news__guide-card h3,
  .page-news__story-card h3 {
    font-size: 1.2em;
    margin: 15px 15px 8px 15px;
  }

  .page-news__news-card p,
  .page-news__promo-card p,
  .page-news__guide-card p,
  .page-news__story-card p {
    padding: 0 15px;
    margin-bottom: 15px;
  }

  .page-news__read-more-link {
    padding: 0 15px 15px 15px;
  }

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

  .page-news__faq-title {
    font-size: 1.1em;
  }

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

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

  .page-news__cta-buttons-group {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

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

  /* Ensure all images are responsive */
  .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,
  .page-news__cta-buttons-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  .page-news__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure video section has correct padding on mobile */
  }
}

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 2em;
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 1.5em;
  }
}

/* Color Contrast Fixes (if needed) */
.page-news__dark-bg {
  color: #ffffff;
  background: #017439;
}

.page-news__light-bg {
  color: #333333;
  background: #ffffff;
}