/* style/terms-conditions.css */

/* General styles for the page */
.page-terms-conditions {
  font-family: Arial, sans-serif;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
  line-height: 1.6;
}

.page-terms-conditions__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Hero Section */
.page-terms-conditions__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding as shared.css handles body padding */
  padding-bottom: 40px;
  text-align: center;
  overflow: hidden;
}

.page-terms-conditions__hero-image-wrapper {
  width: 100%;
  max-height: 400px; /* Adjust as needed */
  overflow: hidden;
  margin-bottom: 20px;
}

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

.page-terms-conditions__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-terms-conditions__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Using clamp for H1 font size */
  color: #F2C14E; /* Primary color for title */
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.page-terms-conditions__description {
  font-size: 1.1rem;
  color: #FFF6D6;
  margin-bottom: 30px;
}

.page-terms-conditions__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Dark text for light button */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-terms-conditions__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

/* Content Area */
.page-terms-conditions__content-area {
  padding: 40px 0;
  background-color: #0A0A0A; /* Background */
}

.page-terms-conditions__section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #F2C14E; /* Primary color */
  margin-top: 40px;
  margin-bottom: 25px;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.page-terms-conditions__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 80px;
  height: 3px;
  background-color: #FFD36B; /* Glow color */
  border-radius: 2px;
}

.page-terms-conditions__sub-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #FFD36B; /* Auxiliary color */
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-terms-conditions p {
  margin-bottom: 15px;
  color: #FFF6D6; /* Text Main */
}

.page-terms-conditions a {
  color: #FFD36B; /* Links in content */
  text-decoration: underline;
}

.page-terms-conditions a:hover {
  color: #F2C14E; /* Primary color on hover */
}

.page-terms-conditions__image-content {
  width: 100%;
  height: auto;
  max-width: 800px;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-terms-conditions__cta-wrapper {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 30px;
}

.page-terms-conditions__cta-button--large {
  padding: 18px 40px;
  font-size: 1.2rem;
}

/* FAQ Section */
.page-terms-conditions__faq-section {
  padding: 40px 0;
  background-color: #111111; /* Card BG */
}

.page-terms-conditions__faq-list {
  margin-top: 30px;
}

.page-terms-conditions__faq-item {
  background-color: #0A0A0A; /* Background */
  border: 1px solid #3A2A12; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #FFF6D6;
}

.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  color: #F2C14E; /* Primary color for questions */
  list-style: none; /* Remove default marker */
}

/* Hide default details marker */
.page-terms-conditions__faq-item summary::-webkit-details-marker {
  display: none;
}
.page-terms-conditions__faq-item summary::marker {
  display: none;
}

.page-terms-conditions__faq-qtext {
  flex-grow: 1;
}

.page-terms-conditions__faq-toggle {
  font-size: 1.5rem;
  margin-left: 15px;
  color: #FFD36B;
  transition: transform 0.3s ease;
}

.page-terms-conditions__faq-item[open] .page-terms-conditions__faq-toggle {
  transform: rotate(45deg); /* Change + to X or similar */
}

.page-terms-conditions__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #FFF6D6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-terms-conditions__faq-item[open] .page-terms-conditions__faq-answer {
  max-height: 500px; /* Sufficient height for content */
  padding-top: 10px;
}

/* --- Responsive styles for mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-terms-conditions__container {
    padding: 15px;
  }

  /* HERO 主图区域 */
  .page-terms-conditions__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    padding-bottom: 20px;
  }

  .page-terms-conditions__hero-image-wrapper {
    max-height: 250px; /* Smaller hero image on mobile */
  }

  .page-terms-conditions__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem); /* Smaller H1 for mobile */
    margin-bottom: 10px;
  }

  .page-terms-conditions__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-terms-conditions__cta-button {
    padding: 12px 25px;
    font-size: 1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important; /* Ensure no horizontal overflow */
    margin-right: 0 !important; /* Ensure no horizontal overflow */
  }

  /* 通用图片与容器 */
  .page-terms-conditions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-terms-conditions__section,
  .page-terms-conditions__card,
  .page-terms-conditions__container,
  .page-terms-conditions__content-area,
  .page-terms-conditions__hero-content,
  .page-terms-conditions__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-terms-conditions__section-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
    margin-top: 30px;
    margin-bottom: 20px;
  }

  .page-terms-conditions__sub-title {
    font-size: clamp(1.2rem, 6vw, 1.5rem);
    margin-top: 25px;
    margin-bottom: 10px;
  }

  /* 按钮与按钮容器 */
  .page-terms-conditions__cta-wrapper {
    margin-top: 30px;
  }

  .page-terms-conditions__cta-button--large {
    padding: 15px 30px;
    font-size: 1.1rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  /* FAQ Section */
  .page-terms-conditions__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-terms-conditions__faq-answer {
    padding: 0 20px 15px;
  }

  /* Placeholder styles for homepage modules (as per "必写清单" requirement) */

  /* 长文金框区 - placeholder */
  .page-terms-conditions__home-content {
    height: auto; /* Allow content to expand */
    overflow-y: visible;
    padding: 15px;
  }

  /* 游戏轮播 - placeholder */
  .page-terms-conditions__row-games {
    padding: 20px 0;
  }
  .page-terms-conditions__slider-track {
    display: flex; /* Ensure flex for horizontal scroll */
    flex-wrap: nowrap;
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
  }
  .page-terms-conditions__slider-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari */
  }
  .page-terms-conditions__game-slide {
    flex: 0 0 160px; /* Smaller fixed width for mobile */
    max-width: 160px;
  }

  /* 合作品牌六宫格 - placeholder */
  .page-terms-conditions__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns on mobile */
    gap: 10px;
  }
  .page-terms-conditions__banner-item img {
     /* Smaller max width for logos on mobile */
    
  }

  /* 博客卡片区 - placeholder */
  .page-terms-conditions__blog-masonry {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
  .page-terms-conditions__blog-slider-track {
    display: flex; /* Ensure flex for horizontal scroll */
    flex-wrap: nowrap;
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .page-terms-conditions__blog-slider-track::-webkit-scrollbar {
    display: none;
  }
  .page-terms-conditions__blog-slide {
    flex: 0 0 calc(100% - 30px); /* Adjust width for single slide with padding */
    max-width: calc(100% - 30px);
    margin: 0 15px; /* Add some side margin */
  }
}

/* Placeholder for 1024px media query if needed (not explicitly requested for this page, but often good practice) */
@media (max-width: 1024px) {
  .page-terms-conditions__container {
    max-width: 960px;
  }
  .page-terms-conditions__hero-image-wrapper {
    max-height: 350px;
  }
  .page-terms-conditions__main-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
  }
  .page-terms-conditions__section-title {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  }
  .page-terms-conditions__sub-title {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
  }
}

/* Contrast Fixes (as per requirements) */
.page-terms-conditions__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

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

/* Ensure button and button container responsiveness for safety */
.page-terms-conditions__cta-button,
.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary,
.page-terms-conditions a[class*="button"],
.page-terms-conditions a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-terms-conditions__cta-buttons,
.page-terms-conditions__button-group,
.page-terms-conditions__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-terms-conditions__cta-button,
  .page-terms-conditions__btn-primary,
  .page-terms-conditions__btn-secondary,
  .page-terms-conditions a[class*="button"],
  .page-terms-conditions 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-terms-conditions__cta-buttons,
  .page-terms-conditions__button-group,
  .page-terms-conditions__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; /* Ensure flex for wrapping */
    flex-direction: column; /* Stack buttons vertically on mobile */
  }
}