/* style/index.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-color: #C30808;
  --login-button-color: #C30808;
  --text-color-dark-bg: #FFFF00; /* For register/login text on dark background */
  --text-color-light-bg: #333333;
  --background-color-page: #FFFFFF;
  --border-color: #e0e0e0;
}

.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-light-bg);
  background-color: var(--background-color-page);
}

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

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

.page-index__section-description {
  font-size: 18px;
  color: var(--text-color-light-bg);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__light-bg {
  background-color: var(--background-color-page);
  color: var(--text-color-light-bg);
  padding: 60px 0;
}

.page-index__dark-bg {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 60px 0;
}

.page-index__dark-bg .page-index__section-title {
  color: var(--secondary-color);
}

.page-index__dark-bg .page-index__section-description {
  color: var(--secondary-color);
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Assuming shared.css handles body padding-top: var(--header-offset) */
  margin-top: 0;
  width: 100%;
  overflow: hidden;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
}

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

/* Product Showcase Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background-color: var(--background-color-page);
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Front 4 occupy 4 parts, back 2 occupy 2 parts */
  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; /* Max width for each product card */
  border-radius: 0; /* No border-radius */
  overflow: hidden;
  background: transparent;
  box-shadow: none; /* No box-shadow */
  transition: transform 0.3s ease;
  display: flex; /* To center image if smaller */
  justify-content: center;
  align-items: center;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px; /* Max width for image container */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  display: block;
}

/* Intro Section */
.page-index__intro-section {
  padding: 80px 0;
}

.page-index__intro-description {
  margin-bottom: 50px;
}

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

.page-index__feature-item {
  background-color: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.page-index__feature-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-index__feature-text {
  font-size: 16px;
  color: var(--text-color-light-bg);
}

/* Quick Links Section */
.page-index__quick-links-section {
  padding: 80px 0;
}

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

.page-index__quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 150px;
}

.page-index__quick-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary--register {
  background-color: var(--register-button-color);
  color: var(--text-color-dark-bg);
  box-shadow: 0 4px 15px rgba(195, 8, 8, 0.4);
}

.page-index__btn-primary--login {
  background-color: var(--login-button-color);
  color: var(--text-color-dark-bg);
  box-shadow: 0 4px 15px rgba(195, 8, 8, 0.4);
}

.page-index__btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-index__quick-link-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-index__quick-link-card.page-index__btn-primary--register .page-index__quick-link-title,
.page-index__quick-link-card.page-index__btn-primary--login .page-index__quick-link-title {
  color: var(--text-color-dark-bg);
}

.page-index__quick-link-card.page-index__btn-secondary .page-index__quick-link-title {
  color: var(--primary-color);
}

.page-index__quick-link-text {
  font-size: 16px;
  line-height: 1.5;
}

.page-index__quick-link-card.page-index__btn-primary--register .page-index__quick-link-text,
.page-index__quick-link-card.page-index__btn-primary--login .page-index__quick-link-text {
  color: var(--secondary-color);
}

.page-index__quick-link-card.page-index__btn-secondary .page-index__quick-link-text {
  color: var(--text-color-light-bg);
}

/* Core Games Section */
.page-index__core-games-section {
  padding: 80px 0;
}

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

.page-index__game-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

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

.page-index__game-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

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

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

.page-index__game-description {
  font-size: 16px;
  color: var(--text-color-light-bg);
  padding: 0 20px 20px;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
}

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

.page-index__promo-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

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

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

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

.page-index__promo-title a {
  color: var(--primary-color);
  text-decoration: none;
}

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

.page-index__promo-text {
  font-size: 16px;
  color: var(--text-color-light-bg);
  padding: 0 20px 20px;
}

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

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

/* Reusing .page-index__feature-item styles */

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
}

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

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

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 5px 5px;
  color: var(--text-color-light-bg);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  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;
}

.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;
  color: var(--text-color-light-bg);
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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;
}