/* Base Styles */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--page-bg-color, #F5F7FA); /* Ensure consistency with body background */
}

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

.page-news__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #E53935;
  text-align: center;
  margin-bottom: 40px;
  margin-top: 60px;
}

/* Hero Section */
.page-news__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
}

.page-news__hero-section .page-news__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-width: 800px;
  margin-top: 30px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.page-news__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-news__intro-text {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

/* Latest News Section */
.page-news__latest-news-section {
  padding: 40px 0;
  background-color: #F5F7FA;
}

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

.page-news__news-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px 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 {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__card-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  overflow: hidden;
}

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

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

.page-news__card-date {
  font-size: 14px;
  color: #666666;
  margin-bottom: 10px;
}

.page-news__card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.4;
  flex-grow: 1;
}

.page-news__card-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-news__card-excerpt {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
}

.page-news__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #E53935;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more-btn:hover {
  background-color: #FF5A4F;
}

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

.page-news__view-all-btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: #E53935;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.page-news__view-all-btn:hover {
  background-color: #FF5A4F;
}

/* CTA Section */
.page-news__cta-section {
  padding: 60px 0;
  background-color: #F5F7FA;
}

.page-news__cta-container {
  display: flex;
  align-items: center;
  gap: 40px;
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 40px;
}

.page-news__cta-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.page-news__cta-content {
  width: 50%;
  padding-left: 20px;
}

.page-news__cta-title {
  font-size: 36px;
  font-weight: 700;
  color: #E53935;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-news__cta-description {
  font-size: 17px;
  color: #555555;
  margin-bottom: 30px;
}

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

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

.page-news__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

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

/* FAQ Section */
.page-news__faq-section {
  padding: 60px 0;
  background-color: #F5F7FA;
}

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

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

details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #333333;
}

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

details.page-news__faq-item summary.page-news__faq-question:hover {
  background: #f0f0f0;
}

.page-news__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #E53935;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  line-height: 1;
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 20px;
  background: #fdfdfd;
  border-radius: 0 0 10px 10px;
  color: #555555;
}

/* Responsive Styles */

/* General responsive for images and containers */
.page-news img {
  max-width: 100%;
  height: auto;
  display: block;
}
.page-news__section,
.page-news__card,
.page-news__container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Media Query for larger tablets and small desktops */
@media (max-width: 1023px) {
  /* General rules for elements that might be affected by homepage layout rules */
  .page-news__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-news__hero-brand,
  .page-news__hero-jackpot {
    display: none !important;
  }
  .page-news__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-news__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-news__game-trial-topbar,
  .page-news__game-trial-bottombar {
    display: none !important;
  }
  .page-news__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-news__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-news__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-news__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
  /* News specific adjustments */
  .page-news__cta-container {
    flex-direction: column;
    padding: 30px;
  }
  .page-news__cta-image,
  .page-news__cta-content {
    width: 100%;
    padding-left: 0;
    text-align: center;
  }
  .page-news__cta-image {
    margin-bottom: 20px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    margin-right: 10px;
    margin-bottom: 10px;
  }
}

/* Media Query for desktops */
@media (min-width: 1024px) {
  /* Placeholder for homepage specific elements, ensuring structure is present */
  .page-news__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-news__hero-brand,
  .page-news__hero-jackpot,
  .page-news__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-news__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-news__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-news__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-news__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-news__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  /* General elements on news page */
  .page-news__hero-section .page-news__container {
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
  }
  .page-news__hero-content {
    max-width: 50%;
    margin: 0;
  }
  .page-news__hero-image-wrapper {
    margin-top: 0;
    max-width: 50%;
  }
  .page-news__cta-container {
    flex-direction: row;
    padding: 50px;
  }
  .page-news__cta-image {
    width: 40%;
    margin-bottom: 0;
  }
  .page-news__cta-content {
    width: 60%;
    text-align: left;
    padding-left: 40px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    margin-bottom: 0;
  }
}

/* Media Query for mobile devices */
@media (max-width: 768px) {
  .page-news {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-news__container {
    padding: 0 15px;
  }
  .page-news__section-title {
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 30px;
  }
  .page-news__main-title {
    font-size: 32px;
  }
  .page-news__intro-text {
    font-size: 16px;
  }
  .page-news__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-news__card-image-wrapper {
    height: 180px;
  }
  .page-news__card-title {
    font-size: 18px;
  }
  .page-news__card-excerpt {
    font-size: 14px;
  }
  .page-news__read-more-btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  .page-news__view-all-btn {
    padding: 10px 25px;
    font-size: 16px;
  }
  .page-news__cta-section {
    padding: 40px 0;
  }
  .page-news__cta-container {
    padding: 20px;
  }
  .page-news__cta-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-news__cta-description {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    width: 100% !important;
    margin-right: 0;
    margin-bottom: 15px;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-news__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .page-news__faq-section {
    padding: 40px 0;
  }
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px 20px;
  }
  .page-news__faq-qtext {
    font-size: 16px;
  }
  .page-news__faq-toggle {
    font-size: 24px;
    width: 24px;
  }
  details.page-news__faq-item .page-news__faq-answer {
    padding: 0 20px 15px;
  }
  /* Mobile specific image and container overrides */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !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;
  }
  /* Placeholder for homepage specific elements, ensuring structure is present */
  .page-news__promo-strip-track {
    grid-template-columns: repeat(4,1fr);
    overflow-x:hidden;
  }
  .page-news__hot-games-grid {
    grid-template-columns:repeat(2,1fr);
  }
  /* Ensure reward modal close button exists */
  .page-news__reward-modal-close {
    /* Mobile styles for close button */
  }
  /* Fixed winner ticker at bottom */
  .page-news__winner-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    /* Other styles for ticker */
  }
  /* Body/main padding for ticker */
  body {
    padding-bottom: 50px; /* Adjust based on ticker height */
  }
  .page-news__hero-brand,
  .page-news__hero-jackpot {
    display: none !important;
  }
}

/* Default styles for game trial overlay and modal (if any) */
.page-news__game-trial-overlay {
  z-index: 5;
  pointer-events: auto;
}
.page-news__game-trial-overlay.is-hidden {
  display: none !important;
  pointer-events: none !important;
}
.page-news__game-trial-start {
  z-index: 6;
  pointer-events: auto;
  touch-action: manipulation;
}
.page-news__game-trial-shell {
  border:1px solid rgba(212,175,55,.45);
  border-radius:10px;
  overflow:hidden;
}
.page-news__reward-modal {
  position:fixed;
  inset:0;
  z-index:10000;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
.page-news__reward-modal[hidden] {
  display: none;
}
.page-news__reward-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  position: relative;
}
.page-news__reward-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}
.page-news--reward-open {
  overflow: hidden; /* Prevent scrolling when modal is open */
}