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

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

.page-index__section-title {
  font-size: 36px;
  color: #CC0000; /* Brand primary color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  margin: 10px;
  cursor: pointer;
}

.page-index__btn-primary {
  background: #CC0000;
  color: #ffffff; /* White text for primary button */
  border: 2px solid transparent;
}

.page-index__btn-primary:hover {
  background: #a30000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__btn-secondary {
  background: #000000;
  color: #ffffff; /* White text for secondary button */
  border: 2px solid transparent;
}

.page-index__btn-secondary:hover {
  background: #333333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #CC0000, #000000); /* Brand colors */
  color: #ffffff; /* White text for dark background */
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-index__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-index__hero-description {
  font-size: 22px;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 20px;
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 0;
  background-color: #f9f9f9;
  color: #333333;
}

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

.page-index__feature-item {
  text-align: center;
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__feature-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__feature-item h3 {
  font-size: 24px;
  color: #CC0000;
  margin-bottom: 15px;
}

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

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

.page-index__quick-access-section .page-index__section-title,
.page-index__quick-access-section .page-index__section-description {
  color: #ffffff;
}

.page-index__access-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 50px;
}

.page-index__access-button {
  display: inline-block;
  padding: 15px 30px;
  background: #CC0000;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-index__access-button:hover {
  background: #a30000;
  border-color: #ffffff;
}

/* Games Section */
.page-index__games-section {
  padding: 80px 0;
  background-color: #f4f4f4;
  color: #333333;
}

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__game-card h3 {
  font-size: 22px;
  color: #000000;
  padding: 15px 20px 5px;
}

.page-index__game-card h3 a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-card h3 a:hover {
  color: #CC0000;
}

.page-index__game-card p {
  font-size: 15px;
  color: #666666;
  padding: 0 20px 15px;
}

.page-index__card-button {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 20px;
  padding: 10px 0;
  background: #CC0000;
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__card-button:hover {
  background: #a30000;
}

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

.page-index__promotions-section .page-index__section-title,
.page-index__promotions-section .page-index__section-description {
  color: #ffffff;
}

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

.page-index__promo-card {
  background: #1a1a1a;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__promo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__promo-card h3 {
  font-size: 22px;
  color: #CC0000;
  padding: 15px 20px 5px;
}

.page-index__promo-card h3 a {
  color: #CC0000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__promo-card h3 a:hover {
  color: #ff3333;
}

.page-index__promo-card p {
  font-size: 15px;
  color: #cccccc;
  padding: 0 20px 15px;
}

.page-index__view-all-promos {
  text-align: center;
  margin-top: 60px;
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 80px 0;
  background-color: #f9f9f9;
  color: #333333;
}

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

.page-index__security-item {
  text-align: center;
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__security-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__security-item h3 {
  font-size: 24px;
  color: #000000;
  margin-bottom: 15px;
}

.page-index__security-item p {
  font-size: 16px;
  color: #666666;
}

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

.page-index__faq-section .page-index__section-title,
.page-index__faq-section .page-index__section-description {
  color: #ffffff;
}

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

/* FAQ容器样式 */
.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ默认状态 - 答案隐藏 */
.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 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa bất kỳ nội dung nào */
  padding: 20px 15px !important;
  opacity: 1;
  background: #1a1a1a;
  color: #cccccc;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề phong cách */
.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #333333;
  color: #ffffff;
  border: 1px solid #444444;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #444444;
  border-color: #555555;
}

.page-index__faq-question:active {
  background: #555555;
}

/* Vấn đề tiêu đề phong cách */
.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
}

/* Chuyển đổi biểu tượng */
.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #CC0000;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #ff3333;
  transform: rotate(45deg); /* Change to X on active */
}

.page-index__faq-answer p a {
  color: #CC0000;
  text-decoration: underline;
}

.page-index__faq-answer p a:hover {
  color: #ff3333;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 0;
  background-color: #f4f4f4;
  color: #333333;
}

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

.page-index__blog-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__blog-card h3 {
  font-size: 20px;
  color: #000000;
  padding: 15px 20px 5px;
}

.page-index__blog-card h3 a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-card h3 a:hover {
  color: #CC0000;
}

.page-index__blog-card p {
  font-size: 15px;
  color: #666666;
  padding: 0 20px 15px;
}

.page-index__view-all-news {
  text-align: center;
  margin-top: 60px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 42px;
  }

  .page-index__hero-description {
    font-size: 20px;
  }

  .page-index__section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__hero-title {
    font-size: 32px;
  }

  .page-index__hero-description {
    font-size: 18px;
  }

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

  .page-index__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 5px 0;
  }
  
  .page-index__access-links {
    flex-direction: column;
    gap: 10px;
  }

  .page-index__access-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 5px 0;
  }

  .page-index__section-title {
    font-size: 28px;
  }

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

  .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: 50px 0;
  }

  .page-index__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-index__feature-item,
  .page-index__game-card,
  .page-index__promo-card,
  .page-index__security-item,
  .page-index__blog-card {
    margin-bottom: 20px;
  }

  .page-index__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-index__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-index__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-index__faq-answer {
    padding: 0 15px;
  }
  
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px !important;
  }
}