/* style/news.css */

/* Body background is handled by shared.css var(--background-color), which is dark. 
   Therefore, text colors should be light for readability. */

.page-news {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default light text for dark background */
  background-color: var(--background, #08160F); /* Ensure consistent background */
}

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

.page-news__section-title {
  font-size: clamp(2em, 4vw, 2.8em);
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__section-description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* body handles top padding, only small decorative padding here */
  text-align: center;
  overflow: hidden;
  background: var(--background, #08160F);
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text contrast */
}

.page-news__hero-content {
  position: relative;
  z-index: 10;
  padding: 0 20px;
  max-width: 900px;
}

.page-news__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Use clamp for H1 */
  font-weight: 800;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-news__intro-text {
  font-size: 1.2em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  max-width: 100%;
}

.page-news__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
}

.page-news__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.page-news__btn-secondary {
  background: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border, #2E7A4E);
}

.page-news__btn-secondary:hover {
  background: rgba(46, 122, 78, 0.2);
  transform: translateY(-2px);
}

/* Article Grid */
.page-news__latest-articles,
.page-news__guides-tips,
.page-news__faq-section {
  padding: 60px 0;
  background-color: var(--light-bg, #ffffff); /* Using white for light background sections */
  color: var(--dark-text, #333333); /* Dark text for light background */
}

.page-news__latest-articles .page-news__section-title,
.page-news__latest-articles .page-news__section-description,
.page-news__guides-tips .page-news__section-title,
.page-news__guides-tips .page-news__section-description,
.page-news__faq-section .page-news__section-title,
.page-news__faq-section .page-news__section-description {
  color: var(--dark-text, #333333); /* Ensure dark text on light background */
}

.page-news__promotions-update,
.page-news__new-game-reviews,
.page-news__cta-section {
  padding: 60px 0;
  background-color: var(--background, #08160F); /* Dark background sections */
  color: var(--text-main, #F2FFF6); /* Light text for dark background */
}

.page-news__article-grid,
.page-news__promo-grid,
.page-news__guide-grid,
.page-news__review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-news__article-card,
.page-news__promo-card,
.page-news__guide-card,
.page-news__review-card {
  background: var(--card-bg, #11271B); /* Card background for dark sections */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-main, #F2FFF6);
}

.page-news__latest-articles .page-news__article-card,
.page-news__guides-tips .page-news__guide-card,
.page-news__faq-section .page-news__faq-item {
  background: var(--light-bg, #ffffff);
  color: var(--dark-text, #333333);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
}

.page-news__article-card:hover,
.page-news__promo-card:hover,
.page-news__guide-card:hover,
.page-news__review-card:hover {
  transform: translateY(-5px);
}

.page-news__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-news__card-image,
.page-news__promo-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-news__card-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 10px;
  color: inherit;
}

.page-news__card-excerpt {
  font-size: 0.95em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-news__latest-articles .page-news__card-excerpt,
.page-news__guides-tips .page-news__card-excerpt {
  color: var(--dark-text-secondary, #666666);
}

.page-news__read-more {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--primary-color, #11A84E);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-news__read-more time {
  font-size: 0.8em;
  color: var(--text-secondary, #A7D9B8);
  margin-left: auto; /* Push date to the right */
}

.page-news__latest-articles .page-news__read-more {
  color: var(--primary-color, #11A84E);
}

.page-news__latest-articles .page-news__read-more time {
  color: var(--dark-text-secondary, #666666);
}

.page-news__view-all-wrapper {
  text-align: center;
  margin-top: 50px;
}

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

.page-news__faq-item {
  background: var(--light-bg, #ffffff);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--dark-text, #333333);
}

.page-news__faq-item[open] {
  background: #f9f9f9;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: 600;
  cursor: pointer;
  color: var(--dark-text, #333333);
  position: relative;
  list-style: none;
}

.page-news__faq-question::-webkit-details-marker {
  display: none;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--primary-color, #11A84E);
  transition: transform 0.3s ease;
}

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

.page-news__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: var(--dark-text-secondary, #666666);
  line-height: 1.7;
}

.page-news__faq-answer p {
  margin-bottom: 0;
}

.page-news__faq-answer a {
  color: var(--primary-color, #11A84E);
  text-decoration: underline;
}

/* CTA Section */
.page-news__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-news__cta-section .page-news__section-title {
  color: var(--text-main, #F2FFF6);
}

.page-news__cta-section .page-news__section-description {
  color: var(--text-secondary, #A7D9B8);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-image-wrapper {
    max-height: 500px;
  }
}

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

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

  .page-news__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-news__hero-image-wrapper {
    max-height: 400px;
  }

  .page-news__main-title {
    font-size: clamp(2em, 8vw, 2.5em);
  }

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

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-news__latest-articles,
  .page-news__promotions-update,
  .page-news__guides-tips,
  .page-news__new-game-reviews,
  .page-news__faq-section,
  .page-news__cta-section {
    padding: 40px 0;
  }

  .page-news__section-title {
    font-size: clamp(1.8em, 6vw, 2.2em);
  }

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

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

  .page-news__article-card,
  .page-news__promo-card,
  .page-news__guide-card,
  .page-news__review-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Content area images CSS dimensions must not be less than 200px */
  .page-news__article-card .page-news__card-image,
  .page-news__promo-card .page-news__promo-image,
  .page-news__guide-card .page-news__card-image,
  .page-news__review-card .page-news__card-image {
    height: 200px; /* Ensure minimum height */
  }

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

  .page-news__faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  .page-news__hero-image-wrapper {
    max-height: 300px;
  }

  .page-news__main-title {
    font-size: clamp(1.8em, 7vw, 2.2em);
  }
}