/* style/index.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #EA7C07; /* Màu cam cho nút đăng nhập/CTA */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #ffffff;
  --background-dark: #26A9E0;
  --border-color: #e0e0e0;
}

/* General page content styling */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--background-light);
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  padding-top: 20px;
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__cta-button:hover {
  background: #1e87b7;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.page-index__cta-center {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

/* 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); /* Ensure header offset */
  background: linear-gradient(135deg, var(--primary-color) 0%, #4cbfe0 100%);
  color: var(--text-light);
  overflow: hidden;
}

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

.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: 12px;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3); /* Semi-transparent overlay for text readability */
  border-radius: 12px;
}

.page-index__hero-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 15px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-index__hero-description {
  font-size: 22px;
  margin-bottom: 30px;
  color: var(--text-light);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 0;
  background: var(--background-light);
}

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

.page-index__intro-item {
  text-align: center;
  background: #f9f9f9;
  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__intro-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-index__intro-item img {
  width: 100%;
  height: auto;
  max-width: 250px;
  margin: 0 auto 20px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-index__intro-subtitle {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__intro-item p {
  font-size: 16px;
  color: #555555;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 0;
  background: var(--background-dark);
  color: var(--text-light);
}

.page-index__quick-access-section .page-index__section-title {
  color: var(--text-light);
}

.page-index__quick-access-section .page-index__section-description {
  color: #f0f0f0;
}

.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: var(--secondary-color); /* Orange for login/register */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-primary:hover {
  background: #c76506;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background: var(--background-light);
  color: var(--primary-color);
  text-decoration: none;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-index__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Games Section */
.page-index__games-section {
  padding: 80px 0;
  background: var(--background-light);
}

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

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

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

.page-index__game-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__game-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 15px 10px;
}

.page-index__game-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-title a:hover {
  color: #1e87b7;
}

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

.page-index__game-link {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  padding-bottom: 20px;
  transition: color 0.3s ease;
}

.page-index__game-link:hover {
  color: #c76506;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  background: var(--background-dark);
  color: var(--text-light);
}

.page-index__promotions-section .page-index__section-title {
  color: var(--text-light);
}

.page-index__promotions-section .page-index__section-description {
  color: #f0f0f0;
}

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

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

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

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

.page-index__promo-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 15px 10px;
}

.page-index__promo-title a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__promo-title a:hover {
  color: #f0f0f0;
}

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

/* Security and Support Section */
.page-index__security-support-section {
  padding: 80px 0;
  background: var(--background-light);
}

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

.page-index__info-block {
  text-align: center;
  background: #f9f9f9;
  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__info-block:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-index__info-block img {
  width: 100%;
  height: auto;
  
  margin: 0 auto 20px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-index__info-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__info-block p {
  font-size: 15px;
  color: #555555;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  background: var(--background-dark);
  color: var(--text-light);
}

.page-index__faq-section .page-index__section-title {
  color: var(--text-light);
}

.page-index__faq-section .page-index__section-description {
  color: #f0f0f0;
}

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

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.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;
  padding: 0 15px;
  opacity: 0;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important và giá trị lớn */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  color: var(--text-dark);
  border-radius: 0 0 5px 5px;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

.page-index__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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: 28px;
  height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #333;
  transform: rotate(180deg);
}

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

.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: #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(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

.page-index__blog-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 15px 10px;
}

.page-index__blog-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
  color: #1e87b7;
}

.page-index__blog-excerpt {
  font-size: 15px;
  color: #555555;
  padding: 0 15px;
  margin-bottom: 15px;
}

.page-index__blog-date {
  display: block;
  font-size: 14px;
  color: #999999;
  padding: 0 15px 20px;
}

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

  .page-index__container {
    padding: 20px 15px;
  }

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

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

  /* Hero Section Mobile */
  .page-index__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    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-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Intro Section Mobile */
  .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: 40px 0;
  }

  .page-index__intro-grid, .page-index__games-grid, .page-index__promotions-grid, .page-index__security-support-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__intro-item, .page-index__game-card, .page-index__promo-card, .page-index__info-block, .page-index__blog-card {
    padding: 20px;
  }

  .page-index__intro-item img, .page-index__info-block img {
    
  }

  .page-index__intro-subtitle, .page-index__game-title, .page-index__promo-title, .page-index__info-title, .page-index__blog-title {
    font-size: 20px;
  }

  /* Quick Access Buttons Mobile */
  .page-index__button-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__btn-primary,
  .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;
    padding-right: 15px;
  }

  /* Image Responsiveness for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__game-card,
  .page-index__promo-card,
  .page-index__info-block,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* FAQ Mobile */
  .page-index__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-index__faq-question h3 {
    font-size: 15px;
    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;
  }
}