/* style/index.css */

/* Global page-index styles for dark body background */
.page-index {
  color: #ffffff; /* Light text for dark body background */
  background-color: #000000; /* Ensure body background is dark as specified */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-index__content-area {
  padding: 60px 20px;
}

.page-index__heading {
  color: #FFD700;
  text-align: center;
  margin-bottom: 30px;
  font-size: 36px;
  font-weight: bold;
  line-height: 1.2;
}

.page-index__heading--dark {
  color: #333333; /* Darker heading for light background sections */
}

.page-index__paragraph {
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__paragraph--dark {
  color: #333333; /* Darker paragraph text for light background sections */
}

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

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.page-index__btn-primary {
  background: #FFD700; /* Gold */
  color: #000000; /* Black text for contrast */
  border-color: #FFD700;
}

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

.page-index__btn-secondary {
  background: transparent;
  color: #FFD700; /* Gold text */
  border-color: #FFD700;
}

.page-index__btn-secondary:hover {
  background: #FFD700;
  color: #000000; /* Black text on hover */
  transform: translateY(-2px);
}

.page-index__btn-primary--small {
  padding: 10px 20px;
  font-size: 16px;
}

/* HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Fixed navigation bar spacing */
  margin-top: 0;
}

.page-index__hero-container {
  position: relative;
  width: 100%;
  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;
}

/* Sản phẩm trưng bày hình ảnh khu vực */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #000000;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* 4 cái đầu tiên chiếm 4 cột, 2 cái sau chiếm 2 cột */
  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%;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark background */
  border: 3px solid #FFD700; /* Golden border */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.page-index__product-card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.page-index__product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Must use cover to fill the box */
  display: block;
}

/* Module 1: Introduction */
.page-index__introduction-section {
  background-color: #000000;
  color: #ffffff;
}

/* Module 2: Quick Links */
.page-index__quick-links-section {
  background-color: #f5f5f5; /* Light background */
  color: #333333; /* Dark text */
}

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

.page-index__link-card {
  display: block;
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

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

.page-index__link-card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #FFD700; /* Gold accent */
}

.page-index__link-card-desc {
  font-size: 16px;
  line-height: 1.5;
  color: #555555;
}

/* Module 3: Core Games/Services */
.page-index__games-section {
  background-color: #000000;
  color: #ffffff;
}

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

.page-index__game-category {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark background */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index__game-title {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-index__game-image {
  max-width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid #FFD700;
}

.page-index__game-description {
  font-size: 16px;
  margin-bottom: 25px;
  color: #f0f0f0;
}

/* Module 4: Promotions */
.page-index__promotions-section {
  background-color: #f5f5f5;
  color: #333333;
}

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

.page-index__promo-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 30px;
  border: 1px solid #e0e0e0;
}

.page-index__promo-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-index__promo-title {
  font-size: 22px;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 10px;
  padding: 0 20px;
}

.page-index__promo-desc {
  font-size: 16px;
  color: #555555;
  padding: 0 20px;
  margin-bottom: 25px;
}

/* Module 5: Security & Customer Service */
.page-index__security-section {
  background-color: #000000;
  color: #ffffff;
}

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-index__feature-title {
  font-size: 20px;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 10px;
}

.page-index__feature-desc {
  font-size: 16px;
  color: #f0f0f0;
}

/* Module 6: FAQ */
.page-index__faq-section {
  background-color: #f5f5f5;
  color: #333333;
}

.page-index__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none;
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.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 25px;
  opacity: 0;
  background: #f9f9f9;
  color: #555555;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid #eee;
}

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

/* Module 7: Latest Blog Content */
.page-index__blog-section {
  background-color: #000000;
  color: #ffffff;
}

.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: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

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

.page-index__blog-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

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

.page-index__blog-title {
  font-size: 20px;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 10px;
}

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

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

/* Responsive Design */
@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__heading {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 10px; /* Mobile fixed navigation bar spacing */
  }

  .page-index__content-area {
    padding: 40px 15px;
  }

  .page-index__heading {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .page-index__paragraph {
    font-size: 16px;
  }

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

  .page-index__btn-primary,
  .page-index__btn-secondary {
    width: 100%;
    font-size: 16px;
    padding: 12px 20px;
  }

  /* Products Section - Mobile Specific */
  .page-index__products-section {
    padding: 40px 15px;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr; /* Mobile: two grids stack vertically */
    gap: 15px;
  }
  
  /* 4 images - 2x2 grid, square */
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .page-index__products-grid--small .page-index__product-card {
    aspect-ratio: 1 / 1; /* Square */
  }
  
  .page-index__products-grid--small .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Square */
  }
  
  .page-index__products-grid--small .page-index__product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image fills the box */
  }
  
  /* 2 large images - each on its own row, square */
  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* Each card occupies a full row */
    gap: 15px;
  }
  
  .page-index__products-grid--large .page-index__product-card {
    aspect-ratio: 1 / 1; /* Square */
  }
  
  .page-index__products-grid--large .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Square */
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image fills the box */
  }

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

  .page-index__link-card,
  .page-index__promo-card,
  .page-index__feature-item,
  .page-index__blog-card {
    padding: 20px;
  }

  .page-index__link-card-title,
  .page-index__promo-title,
  .page-index__feature-title,
  .page-index__blog-title {
    font-size: 20px;
  }

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

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

  .page-index__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

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

  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }

  /* Ensure all images are responsive and prevent horizontal scroll */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__products-grid,
  .page-index__link-card,
  .page-index__game-category,
  .page-index__promo-card,
  .page-index__feature-item,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-index__heading {
    font-size: 24px;
  }

  .page-index__paragraph {
    font-size: 15px;
  }

  .page-index__link-card-title,
  .page-index__promo-title,
  .page-index__feature-title,
  .page-index__blog-title {
    font-size: 18px;
  }

  .page-index__link-card-desc,
  .page-index__promo-desc,
  .page-index__feature-desc,
  .page-index__game-description,
  .page-index__blog-excerpt {
    font-size: 15px;
  }

  .page-index__faq-question h3 {
    font-size: 15px;
  }

  .page-index__faq-toggle {
    font-size: 22px;
    width: 26px;
    height: 26px;
  }
}