/* style/index.css */

/* Base Styles & Typography */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background handled by shared.css */
}

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

.page-index__main-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
}

.page-index__section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  text-align: center;
  margin-bottom: 15px;
}

.page-index__section-description {
  font-size: 18px;
  color: #f0f0f0;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index h3 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-index p {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 15px;
}

/* Buttons */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: none;
  border-radius: 5px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  background-color: #a30606;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background-color: #017439; /* Main brand color */
  color: #FFFFFF; /* Auxiliary color */
  border: 2px solid #017439;
  border-radius: 5px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-secondary:hover {
  background-color: #005f2e;
  transform: translateY(-2px);
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css sets body padding-top */
  margin-top: 0;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
}

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

/* Products Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background on dark body */
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: First 4 cards take 4fr, last 2 take 2fr */
  gap: 20px;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
}

.page-index__products-grid--small {
  grid-template-columns: repeat(4, 1fr); /* Desktop: 4 columns */
}

.page-index__products-grid--large {
  grid-template-columns: repeat(2, 1fr); /* Desktop: 2 columns */
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each card */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px; /* Max width for the image container */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain original aspect ratio */
  display: block;
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 0;
  background-color: #017439; /* Brand main color for dark background */
  color: #ffffff;
}

.page-index__intro-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-index__intro-text {
  flex: 1;
}

.page-index__intro-image {
  flex: 1;
  min-width: 200px;
}

.page-index__intro-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-index__intro-text .page-index__btn-primary {
  margin-top: 20px;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background on dark body */
}

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

.page-index__access-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-index__access-card:hover {
  transform: translateY(-5px);
}

.page-index__access-card h3 {
  color: #FFFF00; /* Custom font color for register/login */
  margin-bottom: 10px;
}

.page-index__access-card p {
  color: #f0f0f0;
  font-size: 15px;
  margin-bottom: 20px;
}

.page-index__quick-access-image {
  text-align: center;
}

.page-index__quick-access-image img {
  max-width: 800px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* Games Section */
.page-index__games-section {
  padding: 80px 0;
  background-color: #0a0a0a; /* Body background color for consistency */
  color: #ffffff;
}

.page-index__game-category {
  margin-bottom: 60px;
}

.page-index__game-category:last-child {
  margin-bottom: 0;
}

.page-index__game-category-title {
  font-size: clamp(22px, 3.2vw, 32px);
  color: #FFFF00; /* Custom font color for register/login */
  text-align: center;
  margin-bottom: 30px;
}

.page-index__game-content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-index__game-content-wrapper--reverse {
  flex-direction: row-reverse;
}

.page-index__game-text {
  flex: 1;
}

.page-index__game-image {
  flex: 1;
  min-width: 200px;
}

.page-index__game-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-index__game-text .page-index__btn-secondary {
  margin-top: 20px;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background on dark body */
}

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

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
}

.page-index__promo-card h3 {
  color: #FFFF00; /* Custom font color for register/login */
  margin-bottom: 10px;
}

.page-index__promo-card p {
  color: #f0f0f0;
  font-size: 15px;
  margin-bottom: 20px;
}

.page-index__promotions-banner {
  text-align: center;
}

.page-index__promotions-banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 80px 0;
  background-color: #017439; /* Brand main color for dark background */
  color: #ffffff;
}

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

.page-index__security-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 8px;
  text-align: center;
}

.page-index__security-item h3 {
  color: #FFFF00; /* Custom font color for register/login */
  margin-bottom: 10px;
}

.page-index__security-item p {
  font-size: 15px;
  color: #f0f0f0;
}

.page-index__security-image {
  text-align: center;
  margin-bottom: 40px;
}

.page-index__security-image img {
  max-width: 800px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.page-index__contact-buttons {
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background on dark body */
  color: #ffffff;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

details.page-index__faq-item summary.page-index__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-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFFF00; /* Custom font color for register/login */
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}

.page-index__faq-answer p {
  margin-bottom: 0;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 0;
  background-color: #0a0a0a; /* Body background color for consistency */
  color: #ffffff;
}

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

.page-index__blog-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-index__blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.page-index__blog-content {
  padding: 20px;
}

.page-index__blog-title {
  font-size: 20px;
  font-weight: 600;
  color: #FFFF00; /* Custom font color for register/login */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__blog-excerpt {
  font-size: 15px;
  color: #f0f0f0;
  margin-bottom: 15px;
}

.page-index__blog-date {
  font-size: 14px;
  color: #cccccc;
}

.page-index__view-all-posts {
  text-align: center;
  margin-top: 40px;
}

/* Copyright Section */
.page-index__copyright-section {
  padding: 30px 0;
  background-color: #017439; /* Main brand color */
  text-align: center;
  color: #ffffff;
  font-size: 14px;
}

.page-index__copyright-text {
  margin: 0;
  color: #ffffff;
}

/* Universal Image & Container Responsive Styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-index__section,
.page-index__card,
.page-index__container,
.page-index__access-card,
.page-index__promo-card,
.page-index__security-item,
.page-index__blog-card {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Media Queries */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-index__container {
    padding: 0 15px;
  }

  .page-index__main-title {
    font-size: clamp(26px, 4.5vw, 38px);
  }

  .page-index__section-title {
    font-size: clamp(22px, 4vw, 32px);
  }

  .page-index__intro-content {
    flex-direction: column;
    text-align: center;
  }

  .page-index__intro-text {
    order: 2;
  }

  .page-index__intro-image {
    order: 1;
    margin-bottom: 30px;
  }

  .page-index__game-content-wrapper {
    flex-direction: column;
  }

  .page-index__game-content-wrapper--reverse {
    flex-direction: column;
  }

  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids vertically */
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for smaller screens */
  }

  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for larger screens */
  }

  .page-index__contact-buttons {
    flex-direction: column;
    gap: 15px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* HERO主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
  }
  
  .page-index__hero-image img {
    width: 100% !important;
    height: auto !important;
  }

  /* 产品展示图区域 */
  .page-index__products-section {
    padding: 40px 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr) !important; /* 2x2 grid for mobile */
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 100% !important;
  }
  
  .page-index__products-grid--small .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__products-grid--large {
    grid-template-columns: 1fr !important; /* Each large card takes full width */
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 100% !important;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* General Images & Containers */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__access-card,
  .page-index__promo-card,
  .page-index__security-item,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons & Button Containers */
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index 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-index__contact-buttons,
  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__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;
    flex-direction: column !important; /* Force vertical stacking for multiple buttons */
  }

  /* Other Content Modules */
  .page-index__main-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 15px;
  }

  .page-index__section-title {
    font-size: clamp(20px, 5vw, 30px);
    margin-bottom: 10px;
  }

  .page-index__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index h3 {
    font-size: clamp(18px, 4.5vw, 24px);
  }

  .page-index p {
    font-size: 15px;
  }

  .page-index__intro-section, .page-index__quick-access-section, .page-index__games-section, .page-index__promotions-section, .page-index__security-support-section, .page-index__faq-section, .page-index__blog-section {
    padding: 40px 0;
  }

  .page-index__intro-content {
    gap: 20px;
  }

  .page-index__access-links-grid, .page-index__promotions-grid, .page-index__security-grid, .page-index__blog-grid {
    grid-template-columns: 1fr !important; /* Single column for all grids */
    gap: 20px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px !important;
  }
  .page-index__faq-qtext {
    font-size: 15px !important;
  }
  .page-index__faq-toggle {
    font-size: 20px !important;
    width: 24px !important;
    height: 24px !important;
    margin-left: 10px !important;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px !important;
  }

  .page-index__blog-image {
    height: 180px;
  }

  .page-index__blog-title {
    font-size: 18px;
  }
}