/* Homepage trial layout CSS - Verbatim as required */
@media (max-width: 1023px) {
  .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;
  }
}

@media (min-width: 1024px) {
  .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;
  }
}
/* End of verbatim homepage trial layout CSS */

/* General page styles */
.page-news {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light body background */
  background: var(--secondary-color, #FFFFFF); /* Assuming shared.css sets secondary-color as white */
  padding-bottom: 40px;
}

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

.page-news__hero-section {
  display: flex;
  flex-direction: column; /* Default to column for mobile first approach */
  align-items: center;
  gap: 30px;
  padding: 10px 20px 40px; /* Small top padding as body has header offset */
  background-color: #f9f9f9;
}

.page-news__hero-content {
  text-align: center;
  max-width: 800px;
}

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

.page-news__hero-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #555555;
}

.page-news__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 400px; /* Limit button group width */
  margin: 0 auto;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons adapt to container */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
}

.page-news__btn-primary {
  background-color: #C30808; /* Register/Login button color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: #C30808; /* Register/Login button color */
  border: 2px solid #C30808;
}

.page-news__btn-secondary:hover {
  background-color: #C30808;
  color: #FFFF00;
}

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

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

.page-news__section-title {
  font-size: clamp(24px, 3.5vw, 40px);
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

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

.page-news__article-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-news__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.page-news__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-news__article-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

.page-news__article-meta {
  font-size: 14px;
  color: #777777;
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 16px;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid #017439;
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more:hover {
  color: #005f2e;
  border-color: #005f2e;
}

.page-news__view-all-button {
  text-align: center;
  margin-top: 40px;
}

.page-news__more-articles {
  background-color: #017439; /* Dark section */
  color: #ffffff;
  border-radius: 10px;
  margin-top: 40px;
}

.page-news__more-articles .page-news__section-title {
  color: #ffffff;
}

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

.page-news__list-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.page-news__list-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.page-news__list-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.page-news__list-title a {
  color: #FFFF00; /* Yellow for better contrast on dark green */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__list-title a:hover {
  color: #ffe066;
}

.page-news__list-meta {
  font-size: 14px;
  color: #f0f0f0;
  margin-bottom: 10px;
}

.page-news__list-excerpt {
  font-size: 16px;
  color: #e0e0e0;
  line-height: 1.6;
}

/* FAQ styles */
details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
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: #f5f5f5;
}
.page-news__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Ensure contrast */
}


/* Responsive styles */
@media (min-width: 769px) {
  .page-news__hero-section {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .page-news__hero-content {
    flex: 1;
    text-align: left;
    padding-right: 30px;
  }
  .page-news__cta-buttons {
    justify-content: flex-start;
    margin: 0;
  }
  .page-news__hero-image-wrapper {
    flex: 1;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .page-news__section {
    padding: 30px 15px;
  }
  .page-news__hero-section {
    padding: 10px 15px 30px;
  }
  .page-news__main-title {
    font-size: 28px;
  }
  .page-news__hero-description {
    font-size: 16px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    padding: 0 15px; /* Add padding to button container */
  }
  .page-news__btn-primary,
  .page-news__btn-secondary {
    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;
  }
  .page-news__hero-image-wrapper {
    margin-top: 20px;
  }
  .page-news__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 18px;
  }
  .page-news__article-excerpt {
    font-size: 15px;
  }
  .page-news__list-title {
    font-size: 18px;
  }
  .page-news__list-excerpt {
    font-size: 15px;
  }
  .page-news img { /* Global image responsive for content area */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-news__section,
  .page-news__card,
  .page-news__container,
  .page-news__article-card,
  .page-news__list-item { /* All containers that might have images */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__section { /* Override general section padding for mobile */
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  details.page-news__faq-item summary.page-news__faq-question { padding: 15px; }
  .page-news__faq-qtext { font-size: 15px; }

  /* Additional required CSS for homepage elements (even if not used on this page, as per instruction) */
  .page-news__promo-strip-track {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__promo-card-image {
    max-width: 100% !important;
    height: auto !important;
  }
  .page-news__promo-card-content {
    padding: 10px !important;
    font-size: 14px !important;
  }
  .page-news__promo-card-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-news__hot-games-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-news__hot-games-card-image {
    max-width: 100% !important;
    height: auto !important;
  }
  .page-news__hot-games-name,
  .page-news__hot-games-rtp,
  .page-news__hot-games-desc {
    display: none !important;
  }
  .page-news__brand-intro-section {
    padding: 20px 15px !important;
  }
  .page-news__brand-intro-text {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  .page-news__winner-ticker {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 999 !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
  }
  body.page-news {
    padding-bottom: 50px !important;
  }
}

/* Contrast fix if needed - these are general classes that could be applied if contrast issues are detected */
.page-news__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-news__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}

.page-news__dark-section {
  background: #017439;
  color: #ffffff; /* Forced white text */
}

/* Reward modal close button - for the homepage JS, but included in CSS as it's a general component */
.page-news__reward-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #C30808;
  color: #FFFF00;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
}
.page-news__reward-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-news__reward-modal[hidden] {
    display: none;
}
.page-news__reward-modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 90%;
}