.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #F5F7FA; /* Custom background color */
}

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

.page-index h2 {
  font-size: 32px;
  color: #E53935;
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-index h3 {
  font-size: 24px;
  color: #333333;
  margin-bottom: 15px;
}

.page-index p {
  margin-bottom: 15px;
  color: #333333;
}

.page-index a {
  color: #E53935;
  text-decoration: none;
}

.page-index a:hover {
  text-decoration: underline;
}

.page-index__cta-button {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border-radius: 5px;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
}

/* HERO主图区域 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Shared has body padding-top, so only small top margin here */
  margin-top: 0;
  background-color: #F5F7FA;
}

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

.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 hiển thị */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background-color: #F5F7FA;
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr;
  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; /* Max width per 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;
  overflow: hidden;
}

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

/* Giới thiệu trang chủ */
.page-index__intro-section {
  padding: 60px 20px;
  text-align: center;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

.page-index__intro-title {
  color: #E53935;
  margin-bottom: 20px;
}

.page-index__intro-description {
  font-size: 18px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  color: #333333;
}

/* Truy cập nhanh */
.page-index__quick-access-section {
  padding: 60px 20px;
  background-color: #F5F7FA;
  text-align: center;
}

.page-index__quick-access-title {
  color: #E53935;
  margin-bottom: 40px;
}

.page-index__quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  justify-content: center;
}

.page-index__quick-access-item {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-index__quick-access-item img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
  min-width: 200px;
  min-height: 200px;
}

.page-index__quick-access-item .page-index__cta-button {
  margin-top: auto;
  width: 100%;
}

.page-index__quick-access-note {
  margin-top: 30px;
  font-size: 15px;
  color: #666666;
}

/* Giới thiệu trò chơi */
.page-index__games-section {
  padding: 60px 20px;
  background-color: #ffffff;
  margin-bottom: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-index__games-title {
  color: #E53935;
  margin-bottom: 40px;
}

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

.page-index__game-category {
  background: #F5F7FA;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__game-category-title {
  color: #E53935;
  font-size: 22px;
  margin-top: 0;
}

.page-index__game-category p {
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Khuyến mãi */
.page-index__promotions-section {
  padding: 60px 20px;
  background-color: #F5F7FA;
  text-align: center;
}

.page-index__promotions-title {
  color: #E53935;
  margin-bottom: 40px;
}

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

.page-index__promotion-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-index__promotion-card-title {
  color: #E53935;
  font-size: 20px;
  margin-top: 0;
}

.page-index__promotion-card p {
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-index__promotion-card .page-index__cta-button {
  margin-top: auto;
  width: 100%;
}

/* An toàn và hỗ trợ */
.page-index__security-support-section {
  padding: 60px 20px;
  background-color: #ffffff;
  margin-bottom: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-index__security-support-title {
  color: #E53935;
  margin-bottom: 40px;
}

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

.page-index__security-support-item {
  background: #F5F7FA;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page-index__security-support-item-title {
  color: #E53935;
  font-size: 20px;
  margin-top: 0;
}

/* FAQ */
.page-index__faq-section {
  padding: 60px 20px;
  background-color: #F5F7FA;
  text-align: center;
}

.page-index__faq-title {
  color: #E53935;
  margin-bottom: 40px;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}

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: #f5f5f5;
}

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

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  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: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333;
}

/* Blog */
.page-index__blog-section {
  padding: 60px 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

.page-index__blog-title {
  color: #E53935;
  margin-bottom: 40px;
}

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

.page-index__blog-card {
  background: #F5F7FA;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

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

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

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

.page-index__blog-card-title {
  font-size: 20px;
  margin: 15px 15px 10px;
  line-height: 1.4;
  color: #E53935;
}

.page-index__blog-card-title a {
  color: #E53935;
  text-decoration: none;
}

.page-index__blog-card-title a:hover {
  text-decoration: underline;
}

.page-index__blog-card-excerpt {
  font-size: 15px;
  color: #333333;
  padding: 0 15px;
  flex-grow: 1;
}

.page-index__blog-card .page-index__btn-secondary {
  margin: 15px;
  width: calc(100% - 30px);
}

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

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

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids vertically */
  }

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

@media (max-width: 768px) {
  .page-index h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .page-index h3 {
    font-size: 20px;
  }

  .page-index__content-area {
    padding: 30px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* HERO主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important;
  }

  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Sản phẩm hiển thị */
  .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: 100%; /* Adjust for 2-column layout */
  }

  .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: 100%; /* Each takes full width */
  }

  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* General image styling for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Buttons for mobile */
  .page-index__cta-button,
  .page-index__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

  .page-index__game-categories,
  .page-index__promotion-grid,
  .page-index__security-support-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__intro-description,
  .page-index__quick-access-note {
    font-size: 16px;
  }

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

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

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