/* style/index.css */

/* Base styles for the page content, considering dark body background */
.page-index {
  color: #f0f0f0; /* Light text for dark body background */
  background-color: transparent; /* Body background from shared.css */
  padding-top: 0; /* HERO section is at the very top */
}

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

.page-index__heading {
  font-size: 38px;
  font-weight: 700;
  color: #ffc107; /* Gold for headings */
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.3;
}

.page-index__text {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #e0e0e0; /* Slightly lighter than pure white for readability */
  text-align: center;
}

.page-index__text:last-of-type {
  margin-bottom: 40px;
}

/* Buttons */
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  margin: 10px auto;
}

.page-index__btn-primary {
  background: linear-gradient(90deg, #ffc107, #ffd700);
  color: #000000; /* Dark text on gold button */
  border-color: #ffd700;
}

.page-index__btn-primary:hover {
  background: linear-gradient(90deg, #ffd700, #ffeb3b);
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: transparent;
  color: #ffc107; /* Gold text on dark background */
  border-color: #ffc107;
}

.page-index__btn-secondary:hover {
  background: #ffc107;
  color: #000000;
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
  transform: translateY(-2px);
}

.page-index__btn-large {
  padding: 16px 40px;
  font-size: 18px;
  display: block;
  max-width: 300px;
}

/* Sections */
.page-index__intro-section {
  padding: 80px 0;
  text-align: center;
}

.page-index__dark-section {
  background-color: #0a0a0a; /* Slightly lighter than body for contrast */
  color: #f0f0f0;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
}

.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;
}

/* Products Showcase Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #000000; /* Match body background */
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: 4 small, 2 large */
  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: #1a1a1a; /* Dark background for product cards */
  border: 3px solid #ffd700; /* Golden border */
  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(-5px);
  box-shadow: 0 4px 12px rgba(255, 215, 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;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 0;
  background-color: #000000; /* Match body background */
  text-align: center;
}

.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 {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #1a1a1a; /* Dark background for cards */
  border: 1px solid #333;
  border-radius: 10px;
  padding: 30px 20px;
  text-decoration: none;
  color: #f0f0f0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__quick-link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
}

.page-index__quick-link-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index__quick-link-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
  text-align: center;
}

.page-index__quick-link-desc {
  font-size: 15px;
  color: #ccc;
  text-align: center;
}

/* Core Games Section */
.page-index__games-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-index__game-card {
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
}

.page-index__game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

.page-index__game-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-index__game-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 15px;
  padding: 0 15px;
}

.page-index__game-card-desc {
  font-size: 15px;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 0 15px;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  background-color: #000000; /* Match body background */
  text-align: center;
}

.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: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
}

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

.page-index__promo-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-index__promo-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-index__promo-card-desc {
  font-size: 15px;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 0 15px;
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 80px 0;
  text-align: center;
}

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

.page-index__info-card {
  background: #1a1a1a;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-index__info-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index__info-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
}

.page-index__info-desc {
  font-size: 15px;
  color: #ccc;
  line-height: 1.6;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  background-color: #000000; /* Match body background */
  text-align: center;
}

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

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

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #2a2a2a;
  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: #3a3a3a;
  border-color: #ffc107;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #f0f0f0;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffc107;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect, or just change text */
  color: #ffffff;
}

.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: #1a1a1a;
  color: #ccc;
  font-size: 16px;
  line-height: 1.7;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Sufficiently large max-height */
  padding: 20px 25px !important;
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

.page-index__faq-answer p {
  margin: 0;
  text-align: left;
}

/* Blog Section */
.page-index__blog-section {
  padding: 80px 0;
  text-align: center;
}

.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: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
}

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

.page-index__blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-index__blog-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-index__blog-link {
  color: #ffc107;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-link:hover {
  color: #ffd700;
  text-decoration: underline;
}

.page-index__blog-card-excerpt {
  font-size: 15px;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 0 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__heading {
    font-size: 32px;
  }
  .page-index__text {
    font-size: 16px;
  }
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack products sections */
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__quick-link-card {
    padding: 25px 15px;
  }
  .page-index__quick-link-title {
    font-size: 20px;
  }
  .page-index__game-card-title,
  .page-index__promo-card-title,
  .page-index__info-title,
  .page-index__blog-card-title {
    font-size: 20px;
  }
  .page-index__faq-question h3 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-index__container {
    padding: 30px 15px;
  }
  .page-index__heading {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .page-index__text {
    font-size: 15px;
    line-height: 1.5;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary {
    padding: 12px 25px;
    font-size: 15px;
  }
  .page-index__btn-large {
    padding: 14px 30px;
    font-size: 16px;
    max-width: 250px;
  }
  .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;
  }
  
  /* Mobile specific image styles */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* HERO */
  .page-index__hero-section {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .page-index__hero-image img {
    width: 100%;
    height: auto;
  }

  /* Products Grid Mobile */
  .page-index__products-section {
    padding: 40px 15px;
  }
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack two grids vertically */
    gap: 15px;
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr); /* 4 cards in 2x2 grid */
    gap: 15px;
  }
  .page-index__products-grid--small .page-index__product-card {
    aspect-ratio: 1 / 1; /* Square */
  }
  .page-index__products-grid--small .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Square */
  }
  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* 2 cards, each full width */
    gap: 15px;
  }
  .page-index__products-grid--large .page-index__product-card {
    aspect-ratio: 1 / 1; /* Square */
  }
  .page-index__products-grid--large .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Square */
  }

  /* Quick Links Mobile */
  .page-index__link-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__quick-link-icon {
    width: 80px;
    height: 80px;
  }

  /* Games Mobile */
  .page-index__game-category-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__game-card-img {
    height: 180px;
  }

  /* Promotions Mobile */
  .page-index__promo-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__promo-card-img {
    height: 160px;
  }

  /* Security & Support Mobile */
  .page-index__info-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__info-icon {
    width: 70px;
    height: 70px;
  }

  /* FAQ Mobile */
  .page-index__faq-question {
    padding: 15px 20px;
  }
  .page-index__faq-question h3 {
    font-size: 15px;
  }
  .page-index__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }

  /* Blog Mobile */
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-index__blog-card-img {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .page-index__heading {
    font-size: 24px;
  }
  .page-index__text {
    font-size: 14px;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
  }
  .page-index__quick-link-title {
    font-size: 18px;
  }
  .page-index__game-card-title,
  .page-index__promo-card-title,
  .page-index__info-title,
  .page-index__blog-card-title {
    font-size: 18px;
  }
  .page-index__faq-question h3 {
    font-size: 14px;
  }
}