/* style/index.css */

/* 智能颜色对比度保障 */
.page-index {
  color: #ffffff; /* Body nền tối, chữ sáng */
}

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

.page-index__section-heading {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff; /* Chữ sáng trên nền tối */
  line-height: 1.3;
}

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0; /* Chữ sáng nhẹ trên nền tối */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* shared đã cho body padding-top, chỉ dùng 10px */
  margin-top: 0;
  overflow: hidden;
}

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

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

.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: #000000; /* Nền tối */
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: 4 nhỏ, 2 lớn */
  gap: 20px;
}

.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; /* Tối đa 300px */
  border-radius: 0; /* Không bo góc */
  overflow: hidden;
  background: transparent;
  box-shadow: none; /* Không đổ bóng */
  transition: transform 0.3s ease;
  justify-self: center; /* Căn giữa trong grid cell */
}

.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; /* Tối đa 300px */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Giữ tỷ lệ gốc */
  display: block;
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 20px;
  background: #017439; /* Nền xanh thương hiệu */
  color: #ffffff;
}

.page-index__main-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 dùng clamp */
  font-weight: 800;
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.2;
  color: #FFFF00; /* Chữ vàng nổi bật */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__description {
  font-size: 19px;
  line-height: 1.7;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px;
  color: #f0f0f0;
}

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

.page-index__intro-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__intro-heading {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFFF00;
}

.page-index__intro-item p {
  font-size: 16px;
  line-height: 1.7;
  color: #e0e0e0;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 20px;
  background: #000000;
  color: #ffffff;
}

.page-index__button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: #C30808; /* Màu đỏ cho Đăng Ký/Đăng Nhập */
  color: #FFFF00; /* Chữ vàng */
}

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

.page-index__btn-secondary {
  background: #017439;
  color: #ffffff;
  border-color: #017439;
}

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

.page-index__btn-register {
  background: #C30808;
  color: #FFFF00;
}

.page-index__btn-login {
  background: #C30808;
  color: #FFFF00;
}

.page-index__backup-links {
  text-align: center;
  margin-top: 30px;
}

.page-index__backup-heading {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #FFFF00;
}

.page-index__backup-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.page-index__backup-links li {
  margin: 0;
}

.page-index__backup-link {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.page-index__backup-link:hover {
  color: #FFFF00;
  border-color: #FFFF00;
  background: rgba(255, 255, 255, 0.1);
}

/* Games & Services Section */
.page-index__games-services-section {
  padding: 80px 20px;
  background: #017439;
  color: #ffffff;
}

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

.page-index__game-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-index__game-card img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
}

.page-index__game-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FFFF00;
}

.page-index__game-description {
  font-size: 15px;
  line-height: 1.6;
  padding: 0 20px;
  margin-bottom: 20px;
  color: #e0e0e0;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 20px;
  background: #000000;
  color: #ffffff;
}

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

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
}

.page-index__promo-card img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
}

.page-index__promo-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #FFFF00;
}

.page-index__promo-description {
  font-size: 15px;
  line-height: 1.6;
  padding: 0 20px;
  margin-bottom: 20px;
  color: #e0e0e0;
}

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

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

.page-index__security-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-index__security-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFFF00;
}

.page-index__security-item p {
  font-size: 16px;
  line-height: 1.7;
  color: #e0e0e0;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 20px;
  background: #000000;
  color: #ffffff;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Nền nhẹ trên nền tối */
}

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: rgba(255, 255, 255, 0.1);
}

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

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

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 20px;
  background: rgba(0, 0, 0, 0.2); /* Nền tối hơn cho câu trả lời */
  border-radius: 0 0 8px 8px;
}

.page-index__faq-item .page-index__faq-answer p {
  font-size: 16px;
  line-height: 1.7;
  color: #e0e0e0;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 20px;
  background: #017439;
  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(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-index__blog-card img {
  width: 100%;
  height: auto;
  display: block;
}

.page-index__blog-title {
  font-size: 22px;
  font-weight: 700;
  margin: 15px 20px 10px;
  line-height: 1.4;
}

.page-index__blog-title a {
  color: #FFFF00;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
  color: #fff;
}

.page-index__blog-meta {
  font-size: 14px;
  color: #a0a0a0;
  margin: 0 20px 10px;
}

.page-index__blog-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #e0e0e0;
  margin: 0 20px 20px;
}

/* Common button styles for CTA */
.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

/* General image responsive styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids */
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__intro-content,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__security-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-index__section-heading {
    font-size: 32px;
  }
  .page-index__main-title {
    font-size: clamp(26px, 5vw, 40px);
  }
  .page-index__description {
    font-size: 17px;
  }
  .page-index__faq-qtext {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important;
    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% !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;
    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;
    gap: 15px;
    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: 300px !important;
    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;
    gap: 15px;
    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: 300px !important;
    width: 100% !important;
  }
  .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__intro-item,
  .page-index__game-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;
  }

  /* 按钮与按钮容器 */
  .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: 12px 20px !important;
    font-size: 16px !important;
  }
  .page-index__button-group,
  .page-index__cta-buttons,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }

  /* Other content modules */
  .page-index__section-heading {
    font-size: 28px;
  }
  .page-index__main-title {
    font-size: clamp(24px, 7vw, 36px);
    margin-bottom: 20px;
  }
  .page-index__description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-index__intro-section,
  .page-index__quick-access-section,
  .page-index__games-services-section,
  .page-index__promotions-section,
  .page-index__security-support-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }
  .page-index__intro-heading,
  .page-index__game-title,
  .page-index__promo-title,
  .page-index__security-title,
  .page-index__blog-title {
    font-size: 20px;
  }
  .page-index__intro-item p,
  .page-index__game-description,
  .page-index__promo-description,
  .page-index__security-item p,
  .page-index__blog-excerpt {
    font-size: 15px;
  }
  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px 18px;
  }
  .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 18px 15px;
  }
  .page-index__backup-links ul {
    flex-direction: column;
    gap: 10px;
  }
  .page-index__backup-link {
    width: 100%;
    box-sizing: border-box;
  }
}