.page-index-popular-games {
  color: #333333; /* Dark text for light body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-index-popular-games__hero-section {
  background-color: #000000; /* Black background for hero */
  color: #FFFFFF; /* White text for black background */
  padding: 80px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.page-index-popular-games__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.page-index-popular-games__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.page-index-popular-games__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.page-index-popular-games__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FCBC45; /* Gold accent for title */
}

.page-index-popular-games__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index-popular-games__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-index-popular-games__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.page-index-popular-games__cta-button--register {
  background-color: #FFFFFF; /* White for Register */
  color: #000000;
}

.page-index-popular-games__cta-button--register:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.page-index-popular-games__cta-button--login {
  background-color: #FCBC45; /* Gold for Login */
  color: #000000;
}

.page-index-popular-games__cta-button--login:hover {
  background-color: #e0a53b;
  transform: translateY(-2px);
}

.page-index-popular-games__content-area,
.page-index-popular-games__games-overview-section,
.page-index-popular-games__featured-games-section,
.page-index-popular-games__why-choose-section,
.page-index-popular-games__responsible-gaming-section,
.page-index-popular-games__download-app-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  background-color: #FFFFFF;
}

.page-index-popular-games__section-title {
  font-size: 2.8em;
  color: #000000;
  text-align: center;
  margin-bottom: 25px;
}

.page-index-popular-games__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
}

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

.page-index-popular-games__category-card {
  background-color: #f8f8f8;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index-popular-games__category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-index-popular-games__category-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.page-index-popular-games__category-title {
  font-size: 1.8em;
  color: #000000;
  margin: 25px 15px 15px 15px;
}

.page-index-popular-games__category-text {
  font-size: 1em;
  color: #666666;
  padding: 0 25px;
  flex-grow: 1;
  margin-bottom: 25px;
}

.page-index-popular-games__category-button {
  display: inline-block;
  background-color: #FCBC45;
  color: #000000;
  padding: 12px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 25px;
  transition: background-color 0.3s ease;
}

.page-index-popular-games__category-button:hover {
  background-color: #e0a53b;
}

.page-index-popular-games__featured-games-section {
  background-color: #f0f0f0;
}

.page-index-popular-games__game-detail-card {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 70px;
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  padding: 30px;
}

.page-index-popular-games__game-detail-card--reversed {
  flex-direction: row-reverse;
}

.page-index-popular-games__game-detail-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.page-index-popular-games__game-detail-content {
  width: 50%;
}

.page-index-popular-games__game-detail-title {
  font-size: 2.2em;
  color: #000000;
  margin-bottom: 15px;
}

.page-index-popular-games__game-detail-text {
  font-size: 1.05em;
  color: #555555;
  margin-bottom: 25px;
}

.page-index-popular-games__game-detail-button {
  display: inline-block;
  background-color: #FCBC45;
  color: #000000;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index-popular-games__game-detail-button:hover {
  background-color: #e0a53b;
}

.page-index-popular-games__why-choose-section {
  background-color: #FFFFFF;
}

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

.page-index-popular-games__feature-item {
  text-align: center;
  padding: 25px;
  background-color: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.page-index-popular-games__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index-popular-games__feature-title {
  font-size: 1.6em;
  color: #000000;
  margin-bottom: 10px;
}

.page-index-popular-games__feature-text {
  font-size: 0.95em;
  color: #666666;
}

.page-index-popular-games__cta-bottom {
  text-align: center;
  margin-top: 60px;
}

.page-index-popular-games__cta-button--join {
  background-color: #000000;
  color: #FFFFFF;
}

.page-index-popular-games__cta-button--join:hover {
  background-color: #333333;
}

.page-index-popular-games__responsible-gaming-section {
  background-color: #f0f0f0;
  text-align: center;
}

.page-index-popular-games__responsible-gaming-link {
  display: inline-block;
  margin-top: 30px;
  color: #000000;
  text-decoration: underline;
  font-weight: bold;
  font-size: 1.1em;
}

.page-index-popular-games__responsible-gaming-link:hover {
  color: #FCBC45;
}

.page-index-popular-games__download-app-section {
  background-color: #000000; /* Black background for download section */
  color: #FFFFFF; /* White text for black background */
  text-align: center;
}

.page-index-popular-games__download-app-section .page-index-popular-games__section-title {
  color: #FCBC45; /* Gold title */
}

.page-index-popular-games__download-app-section .page-index-popular-games__section-description {
  color: #e0e0e0;
}

.page-index-popular-games__download-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.page-index-popular-games__cta-button--download-android,
.page-index-popular-games__cta-button--download-ios {
  background-color: #FFFFFF;
  color: #000000;
}

.page-index-popular-games__cta-button--download-android:hover,
.page-index-popular-games__cta-button--download-ios:hover {
  background-color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-index-popular-games__hero-title {
    font-size: 2.8em;
  }

  .page-index-popular-games__hero-description {
    font-size: 1.1em;
  }

  .page-index-popular-games__section-title {
    font-size: 2.2em;
  }

  .page-index-popular-games__game-detail-card {
    flex-direction: column;
    text-align: center;
  }

  .page-index-popular-games__game-detail-card--reversed {
    flex-direction: column;
  }

  .page-index-popular-games__game-detail-image,
  .page-index-popular-games__game-detail-content {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-index-popular-games__hero-section {
    padding: 60px 15px;
  }

  .page-index-popular-games__hero-title {
    font-size: 2.2em;
  }

  .page-index-popular-games__hero-description {
    font-size: 1em;
  }

  .page-index-popular-games__hero-actions {
    flex-direction: column;
    gap: 15px;
  }

  .page-index-popular-games__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100%;
    max-width: 300px;
  }

  .page-index-popular-games__content-area,
  .page-index-popular-games__games-overview-section,
  .page-index-popular-games__featured-games-section,
  .page-index-popular-games__why-choose-section,
  .page-index-popular-games__responsible-gaming-section,
  .page-index-popular-games__download-app-section {
    padding: 40px 15px;
  }

  .page-index-popular-games__section-title {
    font-size: 1.8em;
  }

  .page-index-popular-games__section-description {
    font-size: 0.95em;
  }

  .page-index-popular-games__game-categories {
    grid-template-columns: 1fr;
  }

  .page-index-popular-games__category-image {
    height: 200px;
  }

  .page-index-popular-games__game-detail-title {
    font-size: 1.8em;
  }

  .page-index-popular-games__game-detail-text {
    font-size: 0.9em;
  }

  .page-index-popular-games__feature-icon {
    width: 80px;
    height: 80px;
  }

  .page-index-popular-games__download-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* Critical: Prevent horizontal scroll on mobile for images */
  .page-index-popular-games img {
    max-width: 100%;
    height: auto;
    display: block; /* Ensure block-level behavior for max-width */
  }

  /* Specific overrides for content images to ensure min-size >= 200px and no small icons */
  .page-index-popular-games__category-image {
    min-width: 200px;
    min-height: 200px;
    width: 100%; /* Overriding explicit width for responsiveness */
    height: auto; /* Overriding explicit height for responsiveness */
  }

  .page-index-popular-games__game-detail-image {
    min-width: 200px;
    min-height: 200px;
    width: 100%; /* Overriding explicit width for responsiveness */
    height: auto; /* Overriding explicit height for responsiveness */
  }

  .page-index-popular-games__feature-icon {
    min-width: 200px; /* Enforce min-size for feature icons */
    min-height: 200px;
    width: 100%; /* Allow scaling up if needed */
    height: auto;
  }

}