/* style/index.css */

/* Page-specific styles for the Home page */
.page-index {
  color: #FFFFFF; /* Default text color for dark body background */
  padding-top: var(--header-offset, 120px); /* Space for fixed header */
}

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

/* Hero Section */
.page-index__hero-section {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-index__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.6);
}

.page-index__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
  z-index: 2;
}

.page-index__hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 20px;
}

.page-index__main-title {
  font-size: 3.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #FFFFFF;
  line-height: 1.2;
}

.page-index__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #F0F0F0;
  line-height: 1.6;
}

.page-index__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-index__register-button,
.page-index__login-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.page-index__register-button {
  background-color: #FFFFFF;
  color: #000000;
  border: 2px solid #FFFFFF;
}

.page-index__register-button:hover {
  background-color: transparent;
  color: #FFFFFF;
  transform: translateY(-3px);
}

.page-index__login-button {
  background-color: #FCBC45;
  color: #000000;
  border: 2px solid #FCBC45;
}

.page-index__login-button:hover {
  background-color: transparent;
  color: #FCBC45;
  transform: translateY(-3px);
}

/* Section Titles and Intros */
.page-index__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #000000; /* Default for light backgrounds */
}

.page-index__section-intro {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: #333333; /* Default for light backgrounds */
  line-height: 1.6;
}

/* Features Section */
.page-index__features-section {
  background-color: #FFFFFF;
  padding: 80px 0;
  color: #000000; /* Ensure dark text on white background */
}

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

.page-index__feature-card,
.page-index__game-card,
.page-index__promo-card,
.page-index__blog-card {
  background-color: #F8F8F8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #000000; /* Ensure dark text on light card background */
}

.page-index__feature-card:hover,
.page-index__game-card:hover,
.page-index__promo-card:hover,
.page-index__blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.page-index__feature-image,
.page-index__game-image,
.page-index__promo-image,
.page-index__blog-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-index__card-title {
  font-size: 1.5em;
  font-weight: 600;
  margin: 20px 20px 10px;
  color: #000000;
}

.page-index__card-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-index__card-description {
  font-size: 0.95em;
  line-height: 1.6;
  padding: 0 20px 20px;
  flex-grow: 1;
  color: #333333;
}

.page-index__card-link,
.page-index__promo-button,
.page-index__read-more {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 20px 20px;
  background-color: #FCBC45;
  color: #000000;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-index__card-link:hover,
.page-index__promo-button:hover,
.page-index__read-more:hover {
  background-color: #e0a53b;
}

/* Games Showcase Section */
.page-index__games-showcase {
  background-color: #1a1a1a;
  padding: 80px 0;
  color: #FFFFFF;
}

.page-index__games-showcase .page-index__section-title,
.page-index__games-showcase .page-index__section-intro {
  color: #FFFFFF;
}

.page-index__game-card {
  background-color: #000000;
  color: #FFFFFF;
}

.page-index__game-card .page-index__card-title {
  color: #FFFFFF;
}

.page-index__game-card .page-index__card-description {
  color: #E0E0E0;
}

/* Promotions Section */
.page-index__promotions-section {
  background-color: #FFFFFF;
  padding: 80px 0;
  color: #000000;
}

.page-index__view-all-promos,
.page-index__view-all-blog,
.page-index__view-all-faq {
  text-align: center;
  margin-top: 50px;
}

.page-index__view-all-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: #000000;
  color: #FFFFFF;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-index__view-all-button:hover {
  background-color: #333333;
}

/* About Us Section */
.page-index__about-us-section {
  background-color: #1a1a1a;
  padding: 80px 0;
  color: #FFFFFF;
}

.page-index__about-us-section .page-index__section-title {
  color: #FFFFFF;
}

.page-index__about-text {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #E0E0E0;
  text-align: justify;
}

.page-index__about-link {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background-color: #FCBC45;
  color: #000000;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-index__about-link:hover {
  background-color: #e0a53b;
}

/* App Download Section */
.page-index__app-download-section {
  background-color: #FFFFFF;
  padding: 80px 0;
  text-align: center;
  color: #000000;
}

.page-index__app-description {
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #333333;
}

.page-index__app-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-index__download-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: #000000;
  color: #FFFFFF;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-index__download-button:hover {
  background-color: #333333;
}

/* Blog Preview Section */
.page-index__blog-preview {
  background-color: #1a1a1a;
  padding: 80px 0;
  color: #FFFFFF;
}

.page-index__blog-preview .page-index__section-title,
.page-index__blog-preview .page-index__section-intro {
  color: #FFFFFF;
}

.page-index__blog-card {
  background-color: #000000;
  color: #FFFFFF;
}

.page-index__blog-card .page-index__card-title {
  color: #FFFFFF;
}

.page-index__blog-card .page-index__card-description {
  color: #E0E0E0;
}

/* FAQ Section */
.page-index__faq-section {
  background-color: #FFFFFF;
  padding: 80px 0;
  color: #000000;
}

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

.page-index__faq-item {
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-index__faq-question {
  font-size: 1.2em;
  font-weight: 600;
  padding: 20px;
  cursor: pointer;
  background-color: #F8F8F8;
  color: #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-index__faq-question::after {
  content: '+';
  font-size: 1.5em;
  transition: transform 0.3s ease;
}

.page-index__faq-question.active::after {
  content: '-';
  transform: rotate(180deg);
}

.page-index__faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  color: #333333;
}

.page-index__faq-answer.open {
  max-height: 200px; /* Adjust as needed, will be dynamically set by JS */
  padding: 20px;
}

/* Contact Section */
.page-index__contact-section {
  background-color: #000000;
  padding: 80px 0;
  text-align: center;
  color: #FFFFFF;
}

.page-index__contact-section .page-index__section-title {
  color: #FFFFFF;
}

.page-index__contact-text {
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #E0E0E0;
}

.page-index__contact-button {
  display: inline-block;
  padding: 15px 35px;
  background-color: #FCBC45;
  color: #000000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-index__contact-button:hover {
  background-color: #e0a53b;
}

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

  .page-index__hero-description {
    font-size: 1.2em;
  }

  .page-index__section-title {
    font-size: 2em;
  }

  .page-index__section-intro {
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  .page-index__main-title {
    font-size: 2.5em;
  }

  .page-index__hero-description {
    font-size: 1em;
  }

  .page-index__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__register-button,
  .page-index__login-button,
  .page-index__download-button,
  .page-index__view-all-button,
  .page-index__contact-button {
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .page-index__hero-section {
    height: 70vh;
    min-height: 450px;
  }

  .page-index__features-section,
  .page-index__games-showcase,
  .page-index__promotions-section,
  .page-index__about-us-section,
  .page-index__app-download-section,
  .page-index__blog-preview,
  .page-index__faq-section,
  .page-index__contact-section {
    padding: 60px 0;
  }

  .page-index__features-grid,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
  }

  .page-index__feature-image,
  .page-index__game-image,
  .page-index__promo-image,
  .page-index__blog-image {
    height: 200px;
  }

  .page-index__app-buttons {
    flex-direction: column;
  }
  
  /* Ensure images do not overflow on mobile */
  .page-index img {
    max-width: 100%;
    height: auto;
  }

  .page-index__faq-answer.open {
    max-height: 400px; /* Adjust for more content on mobile */
  }
}

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

  .page-index__hero-description {
    font-size: 0.9em;
  }

  .page-index__section-title {
    font-size: 1.8em;
  }

  .page-index__hero-section {
    height: 60vh;
    min-height: 400px;
  }
}