/* style/news.css */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --button-register-color: #C30808;
  --button-login-color: #C30808;
  --button-text-color: #FFFF00;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #ffffff;
}

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-light);
}

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

.page-news__hero-section {
  position: relative;
  width: 100%;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px);
  text-align: center;
  background-color: var(--primary-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-news__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  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, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-news__btn-primary {
  background-color: var(--button-register-color);
  color: var(--button-text-color);
  border: 2px solid var(--button-register-color);
}

.page-news__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-news__btn-secondary {
  background-color: transparent;
  color: var(--button-text-color);
  border: 2px solid var(--button-login-color);
}

.page-news__btn-secondary:hover {
  background-color: var(--button-login-color);
  color: var(--secondary-color);
}

.page-news__btn-large {
  padding: 18px 35px;
  font-size: 1.3em;
}

.page-news__latest-news-section,
.page-news__featured-articles-section,
.page-news__promotions-updates-section,
.page-news__game-updates-section,
.page-news__cta-section,
.page-news__faq-section {
  padding: 60px 0;
}

.page-news__latest-news-section,
.page-news__promotions-updates-section {
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-news__featured-articles-section,
.page-news__game-updates-section,
.page-news__faq-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-news__cta-section {
  background-color: var(--background-light);
  color: var(--text-dark);
  text-align: center;
}

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

.page-news__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: inherit;
}

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

.page-news__news-card,
.page-news__promotion-card,
.page-news__game-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: var(--text-dark);
}

.page-news__news-card:hover,
.page-news__promotion-card:hover,
.page-news__game-card:hover {
  transform: translateY(-5px);
}

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

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

.page-news__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-news__card-title a:hover {
  color: #005a2d;
}

.page-news__card-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-news__card-text {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
}

.page-news__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-news__read-more:hover {
  color: #005a2d;
  text-decoration: underline;
}

.page-news__article-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.page-news__article-item {
  display: flex;
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
}

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

.page-news__article-content {
  width: 50%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-news__article-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__article-title a:hover {
  color: #005a2d;
}

.page-news__article-text {
  font-size: 1.1em;
  color: #555;
  margin-bottom: 20px;
}

.page-news__faq-list {
  margin-top: 40px;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f9f9f9;
  color: var(--primary-color);
  border-bottom: 1px solid #eee;
}

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

.page-news__faq-question h3 {
  margin: 0;
  color: inherit;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

.page-news__faq-answer {
  max-height: 0 !important;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background-color: var(--secondary-color);
  color: #555;
}

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

/* --- Responsive Styles --- */

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-news__hero-section {
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px) !important;
  }

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

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

  .page-news__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }

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

  .page-news__section-description {
    font-size: 0.95em;
  }

  .page-news__news-grid,
  .page-news__promotions-grid,
  .page-news__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-news__card-title {
    font-size: 1.2em;
  }

  .page-news__article-item {
    flex-direction: column;
  }

  .page-news__article-image,
  .page-news__article-content {
    width: 100%;
  }

  .page-news__article-title {
    font-size: 1.5em;
  }

  .page-news__article-text {
    font-size: 1em;
  }

  .page-news__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

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

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

  /* Ensure all images are responsive and do not overflow */
  .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__hero-section,
  .page-news__latest-news-section,
  .page-news__featured-articles-section,
  .page-news__promotions-updates-section,
  .page-news__game-updates-section,
  .page-news__cta-section,
  .page-news__faq-section,
  .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;
    overflow-x: hidden !important; /* Ensure no horizontal scroll */
  }

  /* Specific adjustments for button groups to wrap */
  .page-news__hero-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .page-news__hero-cta-buttons .page-news__btn-primary,
  .page-news__hero-cta-buttons .page-news__btn-secondary {
    width: calc(100% - 30px) !important; /* Account for container padding */
  }
}

/* Tablet (max-width: 1024px and min-width: 769px) - Optional, but good practice */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }

  .page-news__news-grid,
  .page-news__promotions-grid,
  .page-news__game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-news__article-item {
    flex-direction: column;
  }

  .page-news__article-image,
  .page-news__article-content {
    width: 100%;
  }
}