/* style/index.css */

/* Base Styles */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main */
  background-color: #B71C1C; /* Background */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #FFD86A; /* Gold gradient start */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__main-title {
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #FFD86A; /* Gold gradient start */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-size: clamp(28px, 4vw, 48px); /* Using clamp for H1 font-size */
}

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

.page-index__light-bg {
  background-color: #D32F2F; /* Card BG */
  color: #FFF5E1;
}

.page-index__dark-section {
  background-color: #7A0E0E; /* Deep Red */
  color: #FFF5E1;
}

/* Buttons */
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button */
  color: #7A0E0E; /* Deep Red for contrast */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-index__btn-secondary {
  background: #D32F2F; /* Card BG */
  color: #FFD86A; /* Gold for contrast */
  border: 1px solid #F2B544; /* Border */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-index__btn-secondary:hover {
  transform: translateY(-2px);
  background: #B71C1C; /* Background */
  border-color: #FFCC66; /* Glow */
}

/* Images */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Adjust if shared.css body padding-top is not set */
  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: #B71C1C; /* Background */
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Front 4 occupy 4 columns, latter 2 occupy 2 columns */
  gap: 20px;
  justify-content: center;
}

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

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

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

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

.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 product card images */
  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__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__feature-item {
  background: #7A0E0E; /* Deep Red */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease;
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
}

.page-index__feature-title {
  font-size: 22px;
  color: #FFD86A; /* Gold */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index__feature-item p {
  font-size: 16px;
  color: #FFF5E1;
}

/* Quick Links Section */
.page-index__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-index__backup-note {
  text-align: center;
  margin-top: 30px;
  font-size: 15px;
  color: #FFCC66; /* Glow */
}

/* Core Games Section */
.page-index__game-category {
  margin-bottom: 60px;
}

.page-index__game-title {
  font-size: 30px;
  color: #FFD86A; /* Gold */
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.page-index__game-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #F4D34D; /* Gold */
  margin: 10px auto 0;
}

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

.page-index__game-content:nth-child(odd) {
  flex-direction: row-reverse;
}

.page-index__game-image {
  flex: 1;
  min-width: 300px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.page-index__game-content p {
  flex: 2;
  font-size: 17px;
  color: #FFF5E1;
  margin-bottom: 20px;
}

.page-index__game-content .page-index__btn-secondary {
  margin-top: 15px;
}

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

.page-index__promo-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease;
}

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

.page-index__promo-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 3px solid #F2B544; /* Border */
}

.page-index__promo-title {
  font-size: 20px;
  color: #FFD86A; /* Gold */
  margin: 20px 15px 10px;
  font-weight: 600;
}

.page-index__promo-description {
  font-size: 15px;
  color: #FFF5E1;
  padding: 0 15px 20px;
}

/* Security & Support Section */
.page-index__security-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__contact-cta {
  text-align: center;
  margin-top: 50px;
}

/* FAQ Section */
.page-index__faq-list {
  margin-top: 40px;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #F2B544; /* Border */
  overflow: hidden;
  background: #D32F2F; /* Card BG */
}

details.page-index__faq-item summary.page-index__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-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: #B71C1C; /* Background */
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFD86A; /* Gold */
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #F4D34D; /* Gold */
  flex-shrink: 0;
  margin-left: 20px;
  width: 32px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 25px;
  background: #7A0E0E; /* Deep Red */
  border-radius: 0 0 10px 10px;
  color: #FFF5E1;
  font-size: 16px;
}

/* Latest Blog Section */
.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__blog-card {
  background: #7A0E0E; /* Deep Red */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

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

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

.page-index__blog-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 3px solid #F2B544; /* Border */
}

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

.page-index__blog-title {
  font-size: 20px;
  color: #FFD86A; /* Gold */
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.3;
}

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

.page-index__blog-date {
  font-size: 14px;
  color: #FFCC66; /* Glow */
  display: block;
}

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

/* --- Responsive Styles --- */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-index__section-title {
    font-size: 32px;
  }

  .page-index__intro-text,
  .page-index__section-description {
    font-size: 16px;
  }

  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids vertically */
  }

  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .page-index__button-group {
    gap: 15px;
  }

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

  .page-index__game-content:nth-child(odd) {
    flex-direction: column;
  }

  .page-index__game-image {
    min-width: unset;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
  }

  .page-index__game-content p {
    text-align: left;
  }

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

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

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important; /* shared 已给 body 留白：约 10px 级，禁止 var(--header-offset) */
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
  }
  
  .page-index__hero-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  /* 产品展示图区域 */
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 300px;
    width: 100%; /* Ensure cards fill available space within their grid column */
  }
  
  .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;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 300px;
    width: 100%;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 通用图片与容器 */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__container,
  .page-index__section,
  .page-index__card,
  .page-index__feature-item,
  .page-index__promo-card,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .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;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .page-index__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important;
    gap: 10px;
  }

  /* 其他内容模块 */
  .page-index__section-title {
    font-size: 28px;
  }

  .page-index__main-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  .page-index__intro-text,
  .page-index__section-description {
    font-size: 15px;
  }

  .page-index__feature-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__feature-title {
    font-size: 20px;
  }

  .page-index__game-title {
    font-size: 26px;
  }

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

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

  .page-index__promotions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__promo-image {
    height: 160px;
  }

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

  .page-index__security-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px 20px;
  }

  .page-index__faq-qtext {
    font-size: 16px;
  }

  .page-index__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
    width: 28px;
  }

  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 20px 20px;
  }

  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-index__blog-excerpt {
    font-size: 14px;
  }
}