/* Base Styles */
.page-index-popular-games {
  background-color: #08160F; /* Background color from custom palette */
  color: #F2FFF6; /* Main text color from custom palette */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-index-popular-games__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-index-popular-games__section {
  padding: 60px 0;
  text-align: center;
}

.page-index-popular-games__dark-section {
  background-color: #11271B; /* Card BG color from custom palette */
}

.page-index-popular-games__medium-bg {
  background-color: #0A4B2C; /* Deep Green for app download section */
  color: #F2FFF6; /* Main text color */
}

.page-index-popular-games__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #F2C14E; /* Gold color for main titles */
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index-popular-games__section-description {
  font-size: 18px;
  color: #A7D9B8; /* Secondary text color */
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Buttons */
.page-index-popular-games__btn-primary,
.page-index-popular-games__btn-secondary,
.page-index-popular-games__btn-link {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-popular-games__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #F2FFF6; /* Main text color */
  border: none;
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-index-popular-games__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-index-popular-games__btn-secondary {
  background-color: transparent;
  color: #57E38D; /* Glow color */
  border: 2px solid #57E38D;
}

.page-index-popular-games__btn-secondary:hover {
  background-color: rgba(87, 227, 141, 0.1);
  color: #F2FFF6;
}

.page-index-popular-games__btn-link {
  background-color: transparent;
  color: #57E38D; /* Glow color */
  border: 1px solid #57E38D;
  padding: 10px 20px;
  font-size: 14px;
}

.page-index-popular-games__btn-link:hover {
  background-color: #57E38D;
  color: #11271B;
}

/* Hero Section */
.page-index-popular-games__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.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;
  filter: brightness(0.6);
}

.page-index-popular-games__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  color: #F2FFF6;
  padding: 20px;
}

.page-index-popular-games__main-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem); /* Responsive font size for H1 */
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 25px;
  color: #F2C14E; /* Gold color for H1 */
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.page-index-popular-games__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  color: #A7D9B8;
}

.page-index-popular-games__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index-popular-games__cta-center {
  margin-top: 40px;
}

/* Why Choose Us Section */
.page-index-popular-games__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index-popular-games__feature-item {
  background-color: #11271B; /* Card BG color */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E; /* Border color */
}

.page-index-popular-games__feature-title {
  font-size: 24px;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 15px;
}

.page-index-popular-games__feature-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
}

/* Game Categories Section */
.page-index-popular-games__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.page-index-popular-games__category-card-link {
  text-decoration: none;
  display: block;
}

.page-index-popular-games__category-card {
  background-color: #0A4B2C; /* Deep Green */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  aspect-ratio: 1 / 1; /* Enforce square aspect ratio */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border: 1px solid #2E7A4E;
}

.page-index-popular-games__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-index-popular-games__category-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
  border: none; /* No border for gameshow images */
  box-shadow: none; /* No box-shadow for gameshow images */
}

.page-index-popular-games__category-card:hover .page-index-popular-games__category-image {
  transform: scale(1.05);
}

.page-index-popular-games__category-title {
  font-size: 20px;
  font-weight: bold;
  color: #F2C14E; /* Gold color */
  margin-top: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  padding: 0 10px;
}

/* Join Guide Section */
.page-index-popular-games__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index-popular-games__step-item {
  background-color: #11271B; /* Card BG color */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E; /* Border color */
  position: relative;
  padding-top: 60px;
}

.page-index-popular-games__step-number {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 36px;
  font-weight: bold;
  color: #F2C14E; /* Gold color */
  opacity: 0.7;
}

.page-index-popular-games__step-title {
  font-size: 22px;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 10px;
}

.page-index-popular-games__step-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
}

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

.page-index-popular-games__promotion-card {
  background-color: #0A4B2C; /* Deep Green */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  text-align: left;
  border: 1px solid #2E7A4E;
}

.page-index-popular-games__promotion-card:hover {
  transform: translateY(-5px);
}

.page-index-popular-games__promotion-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-index-popular-games__promotion-content {
  padding: 20px;
}

.page-index-popular-games__promotion-title {
  font-size: 22px;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 10px;
}

.page-index-popular-games__promotion-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 20px;
}

/* Support Section */
.page-index-popular-games__support-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index-popular-games__channel-item {
  background-color: #11271B; /* Card BG color */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E;
}

.page-index-popular-games__channel-title {
  font-size: 24px;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 15px;
}

.page-index-popular-games__channel-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 20px;
}

/* App Download Section */
.page-index-popular-games__app-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  text-align: left;
}

.page-index-popular-games__app-text {
  flex: 1;
}

.page-index-popular-games__app-image-wrapper {
  flex: 0 0 auto;
  width: 400px;
  height: 300px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border: 2px solid #2E7A4E;
}

.page-index-popular-games__app-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index-popular-games__app-buttons {
  margin-top: 30px;
  justify-content: flex-start;
}

/* Security Section */
.page-index-popular-games__security-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 50px;
}

.page-index-popular-games__security-item {
  background-color: #11271B; /* Card BG color */
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E;
}

.page-index-popular-games__security-title {
  font-size: 24px;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 15px;
}

.page-index-popular-games__security-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
}

.page-index-popular-games__security-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-top: 40px;
  border: 2px solid #2E7A4E;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index-popular-games__section-title {
    font-size: 32px;
  }
  .page-index-popular-games__main-title {
    font-size: clamp(2rem, 4.5vw, 4rem);
  }
  .page-index-popular-games__hero-description {
    font-size: 18px;
  }
  .page-index-popular-games__app-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .page-index-popular-games__app-text {
    order: 2;
  }
  .page-index-popular-games__app-image-wrapper {
    order: 1;
    margin-bottom: 30px;
    width: 100%;
    max-width: 400px;
    height: auto;
  }
  .page-index-popular-games__app-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-index-popular-games__section {
    padding: 40px 0;
  }
  .page-index-popular-games__container {
    padding: 0 15px;
  }
  .page-index-popular-games__section-title {
    font-size: 28px;
  }
  .page-index-popular-games__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-index-popular-games__main-title {
    font-size: clamp(1.8rem, 7vw, 3rem);
  }
  .page-index-popular-games__hero-description {
    font-size: 16px;
  }
  
  /* Buttons - Mobile */
  .page-index-popular-games__btn-primary,
  .page-index-popular-games__btn-secondary,
  .page-index-popular-games__btn-link,
  .page-index-popular-games a[class*="button"],
  .page-index-popular-games a[class*="btn"] {
    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;
  }
  .page-index-popular-games__cta-buttons,
  .page-index-popular-games__button-group,
  .page-index-popular-games__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Force vertical stacking */
    gap: 15px !important;
  }
  .page-index-popular-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* Hero Section - Mobile */
  .page-index-popular-games__hero-section {
    padding-top: 10px; /* Consistent small top padding */
    padding-bottom: 40px;
    min-height: 400px;
  }
  .page-index-popular-games__hero-image {
    object-fit: contain; /* Banner 849px object-fit:contain */
  }

  /* Game Categories - Mobile */
  .page-index-popular-games__category-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns for mobile */
    gap: 15px;
  }
  .page-index-popular-games__category-card {
    padding: 10px;
    aspect-ratio: 1/1; /* Enforce square aspect ratio */
    border: none; /* No border for gameshow images */
    box-shadow: none; /* No box-shadow for gameshow images */
  }
  .page-index-popular-games__category-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none; /* No border for gameshow images */
    box-shadow: none; /* No box-shadow for gameshow images */
  }
  .page-index-popular-games__category-title {
    font-size: 16px;
    position: static; /* Remove absolute positioning for title */
    margin-top: 10px;
    padding: 0;
    text-align: center;
  }

  /* Images - Mobile */
  .page-index-popular-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index-popular-games__section,
  .page-index-popular-games__card,
  .page-index-popular-games__container,
  .page-index-popular-games__app-image-wrapper,
  .page-index-popular-games__promotion-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Features Grid - Mobile */
  .page-index-popular-games__features-grid,
  .page-index-popular-games__steps-grid,
  .page-index-popular-games__promotions-grid,
  .page-index-popular-games__support-channels,
  .page-index-popular-games__security-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index-popular-games__feature-item,
  .page-index-popular-games__step-item,
  .page-index-popular-games__promotion-card,
  .page-index-popular-games__channel-item,
  .page-index-popular-games__security-item {
    padding: 20px;
  }
  .page-index-popular-games__feature-title,
  .page-index-popular-games__step-title,
  .page-index-popular-games__promotion-title,
  .page-index-popular-games__channel-title,
  .page-index-popular-games__security-title {
    font-size: 20px;
  }
  .page-index-popular-games__step-number {
    font-size: 30px;
  }
  .page-index-popular-games__app-image-wrapper {
    width: 100%;
    height: auto;
  }
  .page-index-popular-games__security-image {
    max-width: 100%;
  }
}