/* style/index.css */

/* 🚨 Cần thiết để đảm bảo nội dung không bị che bởi header cố định */
.page-index__fixed-header-padding {
  padding-top: 120px; /* Giá trị mặc định cho desktop */
}

@media (max-width: 768px) {
  .page-index__fixed-header-padding {
    padding-top: 100px; /* Giá trị cho mobile */
  }
}

.page-index {
  font-family: 'Arial', sans-serif;
  color: #f0f0f0; /* Màu chữ mặc định cho nền tối */
  background: var(--dark-bg-1);
  line-height: 1.6;
}

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

.page-index__main-heading {
  font-size: 3.2em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.page-index__main-heading a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__sub-heading {
  font-size: 2.5em;
  color: #FFD700;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 40px;
  font-weight: 600;
  line-height: 1.3;
}

.page-index__sub-heading a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0;
  text-align: justify;
}

.page-index__paragraph a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__highlight {
  color: #FFD700;
  font-weight: bold;
}

.page-index__list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-index__list-item {
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  color: #f0f0f0;
  border-left: 5px solid #FFD700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-index__list-item strong {
  color: #FFD700;
  margin-right: 10px;
}

.page-index__list-item a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-small {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.page-index__btn-primary {
  background: #FFD700;
  color: #1A202C;
  border: 2px solid #FFD700;
  margin-right: 15px;
}

.page-index__btn-primary:hover {
  background: #e6c200;
  border-color: #e6c200;
  color: #1A202C;
}

.page-index__btn-secondary {
  background: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-index__btn-secondary:hover {
  background: #FFD700;
  color: #1A202C;
}

.page-index__btn-small {
  padding: 8px 15px;
  font-size: 0.9em;
  background: #FFD700;
  color: #1A202C;
  border: 1px solid #FFD700;
}

.page-index__btn-small:hover {
  background: #e6c200;
  border-color: #e6c200;
  color: #1A202C;
}

/* 🚨 HERO主图区域样式 */
.page-index__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.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 khu vực */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: var(--dark-bg-2); /* Nền tối hơn */
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: 4 cards then 2 cards */
  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: #1A202C;
  border: 3px solid #ffd700; /* Vàng kim */
  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(-8px);
  box-shadow: 0 8px 20px 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;
  display: block;
}

/* Giới thiệu trang chủ */
.page-index__intro-section {
  padding: 80px 0;
  background: var(--dark-bg-1);
}

.page-index__intro-section .page-index__paragraph,
.page-index__intro-section .page-index__list-item {
  text-align: left;
}

/* Truy cập nhanh */
.page-index__quick-access-section {
  padding: 80px 0;
  background: var(--dark-bg-2);
}

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

.page-index__quick-link-card {
  background: #1A202C;
  border: 2px solid #FFD700;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: #f0f0f0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-index__quick-link-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  background: #2a3447;
  border-color: #e6c200;
}

.page-index__quick-link-title {
  font-size: 1.6em;
  color: #FFD700;
  margin-bottom: 10px;
  font-weight: 700;
}

.page-index__quick-link-title a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__quick-link-title a:hover {
  text-decoration: underline;
}

.page-index__quick-link-desc {
  font-size: 0.95em;
  color: #ccc;
}

.page-index__quick-link-desc a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__quick-link-desc a:hover {
  text-decoration: underline;
}

/* Giới thiệu game */
.page-index__games-section {
  padding: 80px 0;
  background: var(--dark-bg-1);
}

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

.page-index__game-category-card {
  background: #1A202C;
  border: 2px solid #FFD700;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-index__game-category-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-index__game-category-title a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__game-category-title a:hover {
  text-decoration: underline;
}

.page-index__game-category-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__game-category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ưu đãi */
.page-index__promo-section {
  padding: 80px 0;
  background: var(--dark-bg-2);
}

.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: #1A202C;
  border: 2px solid #FFD700;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-index__promo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-index__promo-title {
  font-size: 1.5em;
  color: #FFD700;
  padding: 20px 20px 10px;
  font-weight: 700;
}

.page-index__promo-title a {
  color: #FFD700;
  text-decoration: none;
}

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

.page-index__promo-card .page-index__paragraph {
  padding: 0 20px 20px;
  color: #ccc;
  flex-grow: 1;
  text-align: left;
}

.page-index__promo-card .page-index__btn-small {
  margin: 0 20px 20px;
  align-self: flex-start;
}

/* An toàn & CSKH */
.page-index__security-cs-section {
  padding: 80px 0;
  background: var(--dark-bg-1);
}

.page-index__security-cs-content {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-index__security-cs-text {
  flex: 2;
}

.page-index__security-cs-image {
  flex: 1;
  min-width: 300px;
  height: 400px;
  overflow: hidden;
  border-radius: 12px;
  border: 3px solid #FFD700;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.page-index__security-cs-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-index__feature-title {
  font-size: 1.6em;
  color: #FFD700;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

/* 🚨 FAQ khu vực */
.page-index__faq-section {
  padding: 80px 0;
  background: var(--dark-bg-2);
}

.page-index__faq-list {
  margin-top: 40px;
}

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #1A202C;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #2a3447; /* Nền đậm hơn cho câu hỏi */
  border: 1px solid #FFD700;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #3c4860;
  border-color: #e6c200;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: #f0f0f0;
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
}

.page-index__faq-question h3 a {
  color: #f0f0f0;
  text-decoration: none;
}

.page-index__faq-question h3 a:hover {
  text-decoration: underline;
}

.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: 20px;
  pointer-events: none; /* Ngăn icon chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #e6c200;
  transform: rotate(45deg); /* Hoặc sử dụng '−' */
}

.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: #1A202C;
  color: #ccc;
  border-radius: 0 0 8px 8px;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Đảm bảo đủ cao để hiển thị mọi nội dung */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-index__faq-answer p {
  margin: 0;
  padding: 0;
}

.page-index__faq-answer p a {
  color: #FFD700;
  text-decoration: none;
}

.page-index__faq-answer p a:hover {
  text-decoration: underline;
}

/* Blog */
.page-index__blog-section {
  padding: 80px 0;
  background: var(--dark-bg-1);
}

.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: #1A202C;
  border: 2px solid #FFD700;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-index__blog-title {
  font-size: 1.5em;
  color: #FFD700;
  padding: 20px 20px 10px;
  font-weight: 700;
}

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

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

.page-index__blog-card .page-index__paragraph {
  padding: 0 20px 20px;
  color: #ccc;
  flex-grow: 1;
  text-align: left;
}

.page-index__blog-card .page-index__btn-small {
  margin: 0 20px 20px;
  align-self: flex-start;
}

/* 🚨 Responsive Design */
@media (max-width: 1024px) {
  .page-index__main-heading {
    font-size: 2.8em;
  }

  .page-index__sub-heading {
    font-size: 2.2em;
  }

  .page-index__products-container {
    grid-template-columns: 1fr; /* Mobile: Two grids vertically */
  }

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

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

  .page-index__security-cs-content {
    flex-direction: column;
  }

  .page-index__security-cs-image {
    width: 100%;
    max-width: 600px;
    height: 350px;
  }
}

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

  .page-index__main-heading {
    font-size: 2.2em;
    margin-bottom: 20px;
  }

  .page-index__sub-heading {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 30px;
  }

  .page-index__paragraph {
    font-size: 1em;
    text-align: left;
  }

  .page-index__list-item {
    padding: 12px 15px;
    font-size: 0.95em;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    padding: 10px 20px;
    font-size: 0.9em;
    margin-right: 10px;
  }

  .page-index__products-section {
    padding: 40px 15px;
  }

  .page-index__products-container {
    grid-template-columns: 1fr; /* Mobile: Two grids vertically */
    gap: 15px;
  }

  /* 🚨 4 ô vuông (2x2) */
  .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; /* Tỷ lệ khung hình vuông */
  }
  
  .page-index__products-grid--small .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Tỷ lệ khung hình vuông */
  }

  /* 🚨 2 ô lớn, mỗi ô một hàng, hình vuông */
  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* Mỗi thẻ sản phẩm chiếm một hàng */
    gap: 15px;
  }

  .page-index__products-grid--large .page-index__product-card {
    aspect-ratio: 1 / 1; /* Tỷ lệ khung hình vuông */
  }
  
  .page-index__products-grid--large .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Tỷ lệ khung hình vuông */
  }

  .page-index__quick-access-section,
  .page-index__games-section,
  .page-index__promo-section,
  .page-index__security-cs-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 0;
  }

  .page-index__link-grid,
  .page-index__game-categories,
  .page-index__promo-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__security-cs-image {
    height: 250px;
  }

  .page-index__feature-title {
    font-size: 1.4em;
  }

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

  .page-index__faq-question h3 {
    font-size: 1.1em;
  }

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

  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }
  
  /* 🚨 Mobile image adaptation */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__promo-card,
  .page-index__blog-card,
  .page-index__quick-link-card,
  .page-index__game-category-card,
  .page-index__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-index__main-heading {
    font-size: 1.8em;
  }

  .page-index__sub-heading {
    font-size: 1.6em;
  }

  .page-index__intro-section .page-index__btn-primary,
  .page-index__intro-section .page-index__btn-secondary {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .page-index__products-grid--small {
    grid-template-columns: 1fr; /* Single column for very small screens */
  }
}