/* style/news.css */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
}

.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: #26A9E0;
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}

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

/* Hero Section */
.page-news__hero-section {
  position: relative;
  padding: 100px 0 60px; /* Adjusted for header offset */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #ffffff;
  background-color: #26A9E0; /* Brand color for hero */
  padding-top: var(--header-offset, 120px); /* Ensure header offset */
}

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

.page-news__hero-section .page-news__container {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.page-news__hero-title {
  font-size: 3.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-news__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #ffffff;
}

.page-news__cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  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;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-news__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

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

.page-news__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87c0;
  border-color: #1e87c0;
}

.page-news__btn-center {
  display: block;
  margin: 0 auto;
  width: fit-content;
}

/* Featured Articles Section */
.page-news__featured-articles,
.page-news__promotions-events,
.page-news__responsible-gambling,
.page-news__faq-section {
  padding: 80px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-news__game-guides,
.page-news__industry-trends,
.page-news__video-section,
.page-news__cta-bottom {
  padding: 80px 0;
  background-color: #26A9E0; /* Brand color for dark sections */
  color: #ffffff;
}

.page-news__dark-bg .page-news__section-title,
.page-news__dark-bg .page-news__section-intro,
.page-news__dark-bg .page-news__article-title a,
.page-news__dark-bg .page-news__guide-title,
.page-news__dark-bg .page-news__promo-title a,
.page-news__dark-bg .page-news__trend-title,
.page-news__dark-bg .page-news__read-more {
  color: #ffffff;
}

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

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

.page-news__article-card:hover,
.page-news__guide-item:hover,
.page-news__promo-card:hover,
.page-news__trend-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image,
.page-news__guide-image,
.page-news__promo-image,
.page-news__trend-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-news__article-content,
.page-news__promo-content,
.page-news__trend-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-news__guide-item a {
  text-decoration: none;
  color: inherit;
}

.page-news__article-title,
.page-news__guide-title,
.page-news__promo-title,
.page-news__trend-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-news__article-title a,
.page-news__promo-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover,
.page-news__promo-title a:hover {
  color: #1e87c0;
}

.page-news__article-summary,
.page-news__promo-summary,
.page-news__guide-summary,
.page-news__trend-summary {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-news__read-more:hover {
  color: #1e87c0;
  text-decoration: underline;
}

/* Video Section */
.page-news__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000000;
  border-radius: 12px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.page-news__video-link-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}

/* FAQ Section */
.page-news__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-news__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

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

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: #333333;
}

.page-news__faq-question h3 {
  margin: 0;
  font-size: 1.1em;
  color: inherit;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #26A9E0;
  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: #555555;
}

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

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

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

  .page-news__hero-section {
    padding: 80px 0 40px;
  }

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

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

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

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

  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
  }

  .page-news__articles-grid,
  .page-news__guides-grid,
  .page-news__promos-grid,
  .page-news__trend-cards {
    grid-template-columns: 1fr;
  }

  .page-news__article-image,
  .page-news__guide-image,
  .page-news__promo-image,
  .page-news__trend-image {
    height: 200px;
  }

  /* Image and Video responsiveness */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-news video,
  .page-news__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__video-section,
  .page-news__video-container,
  .page-news__video-wrapper,
  .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: hidden !important;
  }

  /* Adjust padding for sections on mobile */
  .page-news__hero-section,
  .page-news__featured-articles,
  .page-news__game-guides,
  .page-news__promotions-events,
  .page-news__industry-trends,
  .page-news__responsible-gambling,
  .page-news__video-section,
  .page-news__faq-section,
  .page-news__cta-bottom {
    padding: 40px 0;
  }

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

  .page-news__faq-question,
  .page-news__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }

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

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }

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

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