/* style/news.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* General page styling */
.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for the page, assuming dark body background */
  background-color: transparent; /* Inherit from shared.css var(--dark-bg) */
}

.page-news__section {
  padding: 60px 0;
  background-color: var(--dark-bg); /* Inherit from shared.css */
  color: #ffffff; /* Default text color for sections */
}

.page-news__dark-section {
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff; /* Light text for brand color background */
}

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

.page-news__section-subtitle {
  font-size: 1.1em;
  color: #f0f0f0;
  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%;
  height: 70vh; /* Adjust as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  box-sizing: border-box;
}

.page-news__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.page-news__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 0;
}

.page-news__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  color: #ffffff;
}

.page-news__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-news__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

.page-news__btn-secondary {
  background-color: transparent;
  color: #26A9E0; /* Primary brand color for text */
  border: 2px solid #26A9E0;
  margin-left: 20px;
}

.page-news__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Article Grid */
.page-news__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-news__article-card {
  background-color: #ffffff; /* Light background for card */
  color: #333333; /* Dark text for light background */
  border-radius: 10px;
  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 {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block; /* Ensures image takes full width and no extra space below */
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-news__article-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.3;
}

.page-news__article-title a {
  color: #26A9E0; /* Brand color for linked title */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-news__article-title a:hover {
  color: #1a7fb3;
}

.page-news__article-excerpt {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 15px;
  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: #1a7fb3;
}

/* Content Wrappers for image/text side-by-side */
.page-news__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.page-news__content-wrapper--reversed {
  flex-direction: row-reverse;
}

.page-news__text-content {
  flex: 1;
  color: #ffffff; /* Default for dark sections */
}

.page-news__dark-section .page-news__text-content {
  color: #ffffff;
}

.page-news__section:not(.page-news__dark-section) .page-news__text-content {
  color: #333333; /* Dark text for light background sections */
}

.page-news__content-image {
  flex: 1;
  max-width: 50%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

/* Video Section */
.page-news__video-section {
  text-align: center;
  background-color: var(--dark-bg); /* Inherit from shared.css */
  color: #ffffff;
}

.page-news__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  max-width: 1000px; /* Limit video width */
  box-sizing: border-box; /* Crucial for responsive */
}

.page-news__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure video is responsive */
  height: auto; /* Ensure video is responsive */
  display: block;
}

.page-news__video-caption {
  margin-top: 10px;
  font-style: italic;
  color: #f0f0f0;
}

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

.page-news__faq-item {
  background-color: #ffffff; /* Light background for FAQ item */
  color: #333333; /* Dark text for light background */
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-news__faq-item[open] {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f8f8f8;
  border-bottom: 1px solid #eeeeee;
  color: #26A9E0; /* Brand color for question */
  list-style: none; /* Remove default marker */
}

.page-news__faq-question::-webkit-details-marker {
  display: none; /* Remove default marker for webkit browsers */
}

.page-news__faq-item[open] .page-news__faq-question {
  background-color: #eaf7ff;
}

.page-news__faq-qtext {
  flex-grow: 1;
}

.page-news__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
  transform: rotate(45deg); /* Change + to X or similar */
  content: '−'; /* Change to minus sign */
}

.page-news__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #555555;
  border-top: 1px solid #eeeeee;
}

/* Responsive design for images, videos, and buttons */
@media (max-width: 1024px) {
  .page-news__hero-title {
    font-size: 2.8em;
  }
  .page-news__hero-description {
    font-size: 1.1em;
  }
  .page-news__content-wrapper {
    flex-direction: column;
  }
  .page-news__content-wrapper--reversed {
    flex-direction: column; /* Keep column for reversed as well */
  }
  .page-news__content-image {
    max-width: 100%;
  }
  .page-news__btn-secondary {
    margin-left: 0;
    margin-top: 15px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  /* Global responsive styles for all images and videos */
  .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;
  }

  /* Containers holding images/videos/buttons */
  .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; /* Prevent horizontal scroll */
  }

  /* Specific padding for hero section to accommodate header offset */
  .page-news__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    height: auto;
    min-height: 50vh;
  }

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

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

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

  .page-news__section-subtitle {
    font-size: 0.9em;
  }

  .page-news__article-card {
    min-width: 200px;
  }
  .page-news__article-image {
    height: 200px;
  }
  .page-news__article-title {
    font-size: 1.3em;
  }

  /* Buttons on mobile */
  .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: 12px 15px; /* Adjust padding for smaller screens */
  }

  .page-news__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
  }

  .page-news__video-wrapper {
    margin: 20px auto;
  }

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

@media (max-width: 480px) {
  .page-news__hero-title {
    font-size: 1.8em;
  }
  .page-news__hero-description {
    font-size: 0.9em;
  }
  .page-news__section-title {
    font-size: 1.8em;
  }
  .page-news__article-image {
    height: 180px;
  }
  .page-news__article-title {
    font-size: 1.2em;
  }
}

/* Ensure content area images are not smaller than 200px */
.page-news__content-area img,
.page-news__article-card img,
.page-news__game-updates img,
.page-news__promotions img,
.page-news__game-guides img,
.page-news__industry-news img {
  min-width: 200px;
  min-height: 200px;
}

/* Ensure no filter on images */
.page-news img {
  filter: none !important;
}