/* 页面样式文件 (style/news.css) */

/* 全局变量和基础样式 - 确保与 body 背景色兼容 */
.page-news {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --deep-navy: #08162B; /* Body background from shared.css */
  color: var(--text-main); /* Default text color for the page content */
  background-color: var(--deep-navy); /* Ensure consistency if main has a background */
}

.page-news__dark-bg {
  background-color: var(--deep-navy);
  color: var(--text-main);
}

.page-news__dark-section {
  background-color: var(--deep-navy);
  color: var(--text-main);
  padding: 40px 0;
}

.page-news__light-bg {
  background-color: #f8f8f8; /* A very light grey for contrast with dark body */
  color: #333333; /* Dark text for light background */
  padding: 40px 0;
}

.page-news__text-block {
  color: var(--text-main);
}

.page-news__section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.page-news__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.page-news__section-title--dark {
  color: #333333;
}

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

/* Hero Section */
.page-news__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
  position: relative;
}

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

.page-news__hero-content {
  position: relative; /* Ensure content is above the dim image */
  text-align: center;
  padding: 30px 15px;
  max-width: 800px;
  margin-top: -150px; /* Overlap with image for visual effect */
  background: rgba(16, 35, 63, 0.85); /* Card BG with transparency */
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  z-index: 2;
  border: 1px solid var(--border-color);
}

.page-news__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.2;
  color: var(--text-main);
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.page-news__lead-text {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

/* Buttons */
.page-news__btn-primary {
  display: inline-block;
  padding: 14px 30px;
  background: var(--button-gradient);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.page-news__btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  color: var(--secondary-color);
  font-size: 16px;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--secondary-color);
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-news__btn-secondary:hover {
  background: var(--secondary-color);
  color: #ffffff;
}

/* Latest News Section */
.page-news__latest-news-section {
  padding-top: 40px;
}

.page-news__featured-article {
  display: flex;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

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

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

.page-news__featured-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-news__featured-title a:hover {
  color: var(--secondary-color);
}

.page-news__article-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-news__article-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Articles Grid Section */
.page-news__articles-grid-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

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

.page-news__article-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.page-news__card-image {
  width: 100%;
  height: 200px; /* 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: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
}

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

.page-news__card-title a:hover {
  color: var(--secondary-color);
}

/* Pagination */
.page-news__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.page-news__pagination-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-news__pagination-link:hover {
  background: var(--secondary-color);
  color: #ffffff;
  border-color: var(--secondary-color);
}

.page-news__pagination-link--active {
  background: var(--secondary-color);
  color: #ffffff;
  border-color: var(--secondary-color);
  font-weight: 700;
  pointer-events: none;
}

/* FAQ Section */
.page-news__faq-section {
  padding-bottom: 60px;
}

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
}

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;
}

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: rgba(var(--primary-color), 0.7);
}

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

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-news__faq-item .page-news__faq-answer {
  padding: 0 25px 20px;
  background: rgba(var(--primary-color), 0.5);
  border-radius: 0 0 10px 10px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

/* Responsive Styles */
@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; /* Ensure 10px top padding, not --header-offset */
    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;
  }
  /* Non-homepage specific for min-width 1024px */
  .page-news__hero-content {
    margin-top: -200px; /* Adjust overlap for larger screens */
    padding: 40px;
  }
  .page-news__featured-article {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  /* General content area padding for mobile */
  .page-news__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero Section */
  .page-news__hero-content {
    margin-top: -80px; /* Less overlap on mobile */
    padding: 20px 15px;
    border-radius: 10px;
  }
  .page-news__main-title {
    font-size: 24px;
  }
  .page-news__lead-text {
    font-size: 15px;
    margin-bottom: 20px;
  }

  /* Buttons mobile adaptation */
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-news a[class*="btn"] {
    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__btn-primary {
    padding: 12px 15px;
    font-size: 16px;
  }
  .page-news__btn-secondary {
    padding: 8px 15px;
    font-size: 14px;
  }
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column;
  }

  /* Latest News Section */
  .page-news__featured-article {
    flex-direction: column;
  }
  .page-news__featured-image,
  .page-news__featured-content {
    width: 100%;
  }
  .page-news__featured-content {
    padding: 20px;
  }
  .page-news__featured-title {
    font-size: 22px;
  }

  /* Articles Grid Section */
  .page-news__articles-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }
  .page-news__card-image {
    height: 180px;
  }
  .page-news__card-title {
    font-size: 18px;
  }

  /* FAQ Section */
  details.page-news__faq-item summary.page-news__faq-question {
    padding: 15px 18px;
  }
  .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 18px 15px;
    font-size: 15px;
  }

  /* All images mobile adaptation */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Fixed Winner Ticker (if present, for mobile) */
  .page-news__winner-ticker {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000;
    padding: 8px 0 !important;
    box-sizing: border-box;
  }
  body.page-news--has-ticker {
    padding-bottom: 40px; /* Adjust if ticker height is different */
  }
}

/* Common styles from shared.css for game trial - must be present */
.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;}
.page-news__reward-modal-close{position:absolute;top:15px;right:15px;font-size:24px;color:#fff;cursor:pointer;background:none;border:none;}
.page-news__reward-modal.is-hidden{display:none!important;}