/* style/index.css */

.page-index {
  color: #ffffff; /* Body background is dark, so text is light */
}

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

.page-index__section-title {
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: clamp(24px, 4vw, 42px);
}

.page-index__section-description {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #f0f0f0;
}

.page-index__dark-bg {
  background: #000000;
  color: #ffffff;
}

.page-index__dark-bg .page-index__section-title {
  color: #ffffff;
}

.page-index__dark-bg .page-index__section-description {
  color: #f0f0f0;
}

.page-index__light-bg {
  background: #ffffff;
  color: #333333;
}

.page-index__light-bg .page-index__section-title {
  color: #333333;
}

.page-index__light-bg .page-index__section-description {
  color: #555555;
}

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

.page-index__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid transparent;
}

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

.page-index__btn-secondary {
  background: #EA7C07; /* Login color */
  color: #ffffff;
  border: 2px solid transparent;
}

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

/* HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css handles body padding-top */
  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;
}

/* Khu vực hiển thị sản phẩm */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #000000; /* Dark background from body */
}

.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;
  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;
  display: block;
}

/* Module 1: Giới thiệu Trang chủ */
.page-index__intro-section {
  padding: 80px 20px;
  text-align: center;
}

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

/* Module 2: Liên kết truy cập nhanh */
.page-index__quick-access-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-index__quick-link-card {
  background: #f0f0f0;
  color: #333333;
  padding: 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-index__quick-link-card:hover {
  background: #e0e0e0;
  transform: translateY(-3px);
}

.page-index__quick-link-text {
  font-size: 18px;
}

/* Module 3: Giới thiệu trò chơi/dịch vụ cốt lõi */
.page-index__games-section {
  padding: 80px 20px;
}

.page-index__game-tabs {
  margin-top: 40px;
}

.page-index__game-tab-header {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 2px solid #26A9E0;
  margin-bottom: 30px;
}

.page-index__tab-button {
  background: transparent;
  border: none;
  padding: 15px 25px;
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.page-index__tab-button:hover {
  color: #ffffff;
  background-color: rgba(38, 169, 224, 0.1);
}

.page-index__tab-button--active {
  color: #ffffff;
  background-color: #26A9E0;
  border-radius: 8px 8px 0 0;
}

.page-index__tab-pane {
  display: none;
  padding: 30px 0;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.page-index__tab-pane--active {
  display: block;
}

.page-index__tab-pane-title {
  font-size: clamp(20px, 3vw, 32px);
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__tab-pane-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-index__tab-pane p {
  font-size: 16px;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

.page-index__tab-pane .page-index__btn-primary {
  margin-top: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Module 4: Ưu đãi & Khuyến mãi */
.page-index__promotions-section {
  padding: 80px 20px;
}

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

.page-index__promotion-card {
  background: #f0f0f0;
  color: #333333;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

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

.page-index__promotion-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-index__promotion-text {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 25px;
  color: #555555;
}

/* Module 5: An toàn & Hỗ trợ khách hàng */
.page-index__security-support-section {
  padding: 80px 20px;
}

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

.page-index__security-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.page-index__security-icon {
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-index__security-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-index__security-text {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f0f0;
}

.page-index__contact-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
}

/* Module 6: Khu vực Câu hỏi thường gặp (FAQ) */
.page-index__faq-section {
  padding: 80px 20px;
}

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

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;
}
.page-index__faq-answer p {
  color: #555555;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

/* Module 7: Nội dung blog mới nhất */
.page-index__blog-section {
  padding: 80px 20px;
}

.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.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

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

.page-index__blog-card-image {
  width: 100%;
  height: 200px; /* Fixed height for visual consistency */
  object-fit: cover;
  display: block;
}

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

.page-index__blog-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #ffffff;
}

.page-index__blog-card-meta {
  font-size: 13px;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-index__blog-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f0f0;
}

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

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

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

@media (max-width: 1024px) {
  .page-index__container {
    padding: 30px 15px;
  }

  .page-index__section-title {
    font-size: clamp(22px, 3.5vw, 38px);
  }

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

  /* Products Section */
  .page-index__products-container {
    grid-template-columns: 1fr;
  }

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

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

  /* Quick Access Section */
  .page-index__link-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  /* Game Tabs */
  .page-index__game-tab-header {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }

  .page-index__tab-button {
    padding: 12px 20px;
    font-size: 16px;
  }

  /* Promotions */
  .page-index__promotion-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  /* Security */
  .page-index__security-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Blog */
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* General mobile styles */
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-index__section-title {
    font-size: clamp(20px, 5vw, 30px);
    margin-bottom: 15px;
  }

  .page-index__section-description {
    font-size: 14px;
    margin-bottom: 25px;
  }

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

  /* Khu vực hiển thị sản phẩm */
  .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 to fit 2 columns */
    width: 100%;
  }
  
  .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%;
    width: 100%;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Buttons and button containers */
  .page-index__cta-button,
  .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;
  }
  
  .page-index__cta-buttons,
  .page-index__button-group,
  .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;
    gap: 10px;
  }

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

  /* Quick Access Section */
  .page-index__link-grid {
    grid-template-columns: 1fr;
  }

  .page-index__quick-link-card {
    font-size: 16px;
    padding: 20px;
  }

  /* Game Tabs */
  .page-index__game-tab-header {
    justify-content: flex-start;
    border-bottom: none;
    margin-bottom: 15px;
  }

  .page-index__tab-button {
    flex-grow: 1;
    font-size: 15px;
    padding: 10px 15px;
  }

  .page-index__tab-pane-title {
    font-size: clamp(18px, 4vw, 26px);
  }

  .page-index__tab-pane p {
    font-size: 14px;
  }

  /* Promotions */
  .page-index__promotion-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__promotion-card {
    padding: 25px;
  }

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

  .page-index__promotion-text {
    font-size: 14px;
  }

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

  .page-index__security-icon {
    max-width: 120px;
  }

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

  .page-index__security-text {
    font-size: 14px;
  }

  .page-index__contact-cta {
    flex-direction: column;
    gap: 15px;
  }

  /* FAQ */
  details.page-index__faq-item summary.page-index__faq-question { padding: 15px; }
  .page-index__faq-qtext { font-size: 15px; }
  .page-index__faq-answer { padding: 0 15px 15px; }
  .page-index__faq-answer p { font-size: 14px; }

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

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

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

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