/* style/index.css */

/* Variables from shared.css: --primary-color: #0A2240; --secondary-color: #FFD700; --header-offset */

/* Base styles for page content */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background #f4f4f4 */
  background-color: #f4f4f4; /* Ensure consistency with body background */
}

/* --- HERO Section --- */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  /* Fixed Header Spacing: Apply to HERO section */
  padding-top: var(--header-offset, 120px);
  background: linear-gradient(135deg, var(--primary-color), #0A2240); /* Consistent dark background for hero */
  color: #ffffff; /* Light text for dark background */
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px; /* Constrain content width */
}

.page-index__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--secondary-color); /* Gold color for title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Enhance readability */
}

.page-index__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0; /* Slightly off-white for body text */
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color); /* Gold background */
  color: var(--primary-color); /* Dark text for gold button */
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Mobile button adaptation */
  box-sizing: border-box; /* Mobile button adaptation */
  white-space: normal; /* Mobile button adaptation */
  word-wrap: break-word; /* Mobile button adaptation */
}

.page-index__cta-button:hover {
  background: #e6c200; /* Slightly darker gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* --- General Section Styles --- */
.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box; /* Mobile content overflow */
  width: 100%; /* Mobile content overflow */
}

.page-index__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__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-index__section-title--light {
  color: #ffffff;
}

.page-index__section-title--light::after {
  background: #ffffff;
}

/* --- Module 1: Introduction Section --- */
.page-index__introduction-section {
  padding: 80px 0;
}

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

.page-index__intro-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__intro-subtitle {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
}

.page-index__intro-item p {
  color: #555555;
  font-size: 1em;
}

/* --- Module 2: Quick Access Section --- */
.page-index__quick-access-section {
  padding: 80px 0;
  background: var(--primary-color);
}

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

.page-index__access-card {
  display: block;
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-index__access-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.page-index__access-title {
  font-size: 1.4em;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-index__access-card p {
  font-size: 0.95em;
  color: #f0f0f0;
}

/* --- Module 3: Core Games/Services Section --- */
.page-index__games-section {
  padding: 80px 0;
}

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 450px; /* Ensure cards have similar height */
}

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

.page-index__game-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-index__game-card .page-index__game-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin: 20px 15px 10px;
}

.page-index__game-card p {
  color: #555555;
  padding: 0 15px 20px;
  flex-grow: 1; /* Allow paragraph to take available space */
}

.page-index__game-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  margin: 0 15px 20px;
  transition: background-color 0.3s ease;
  max-width: calc(100% - 30px); /* Mobile button adaptation */
  box-sizing: border-box; /* Mobile button adaptation */
  white-space: normal; /* Mobile button adaptation */
  word-wrap: break-word; /* Mobile button adaptation */
}

.page-index__game-button:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* --- Module 4: Promotions Section --- */
.page-index__promotions-section {
  padding: 80px 0;
  background: var(--primary-color);
}

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

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__promo-card img {
  width: 100%;
   /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

.page-index__promo-title {
  font-size: 1.3em;
  color: var(--secondary-color);
  margin: 20px 15px 10px;
}

.page-index__promo-card p {
  font-size: 0.95em;
  color: #f0f0f0;
  padding: 0 15px 20px;
  flex-grow: 1;
}

.page-index__promo-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  margin: 0 15px 20px;
  transition: background-color 0.3s ease;
  max-width: calc(100% - 30px); /* Mobile button adaptation */
  box-sizing: border-box; /* Mobile button adaptation */
  white-space: normal; /* Mobile button adaptation */
  word-wrap: break-word; /* Mobile button adaptation */
}

.page-index__promo-button:hover {
  background: #e6c200;
}

/* --- Module 5: Security & Customer Service Section --- */
.page-index__security-cs-section {
  padding: 80px 0;
}

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

.page-index__security-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__security-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
}

.page-index__security-item p {
  color: #555555;
  font-size: 1em;
  margin-bottom: 15px;
}

.page-index__text-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__text-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* --- Module 6: FAQ Section --- */
.page-index__faq-section {
  padding: 80px 0;
  background: var(--primary-color);
}

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

/* FAQ容器样式 */
.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* FAQ默认状态 - 答案隐藏 */
.page-index__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: #333333; /* Dark text for answer content */
  background: #f9f9f9; /* Light background for answer */
}

/* FAQ展开状态 - */
.page-index__faq-item.active .page-index__faq-answer {
  max-height: 200px; /* Adjust based on content */
  padding: 15px; /* Add padding when active */
  opacity: 1;
}

.page-index__faq-question {
  background: #ffffff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1.2em;
  color: var(--primary-color);
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__faq-question:hover {
  background-color: #f0f0f0;
}

.page-index__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--secondary-color);
  transition: transform 0.3s ease;
}

.page-index__faq-item.active .page-index__faq-toggle {
  transform: rotate(45deg);
}

/* --- Module 7: Latest Blog Content Section --- */
.page-index__blog-section {
  padding: 80px 0;
}

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

.page-index__blog-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce min image size */
  min-height: 200px; /* Enforce min image size */
}

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

.page-index__blog-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-index__blog-summary {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-date {
  font-size: 0.85em;
  color: #888888;
  text-align: right;
}

.page-index__view-all-button-container {
  text-align: center;
  margin-top: 50px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
  .page-index__hero-title {
    font-size: 2.8em;
  }

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

  .page-index__intro-grid,
  .page-index__access-grid,
  .page-index__game-showcase,
  .page-index__promo-grid,
  .page-index__security-cs-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: var(--header-offset, 100px);
  }

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

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

  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 1em;
  }

  .page-index__container {
    padding: 30px 15px;
  }

  .page-index__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-index__intro-grid,
  .page-index__access-grid,
  .page-index__game-showcase,
  .page-index__promo-grid,
  .page-index__security-cs-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
  }

  .page-index__intro-item,
  .page-index__access-card,
  .page-index__game-card,
  .page-index__promo-card,
  .page-index__security-item,
  .page-index__blog-card {
    margin-bottom: 20px;
  }

  .page-index__game-card img,
  .page-index__promo-card img,
  .page-index__blog-card img {
    
  }

  .page-index__faq-question {
    font-size: 1.1em;
    padding: 15px;
  }

  .page-index__faq-answer p {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 1.8em;
  }

  .page-index__section-title {
    font-size: 1.5em;
  }

  .page-index__cta-button {
    width: 100%;
    padding: 10px 20px;
  }

  .page-index__game-button,
  .page-index__promo-button {
    width: calc(100% - 30px);
  }
}