.page-index-popular-games {
  font-family: 'Arial', sans-serif;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Matches shared.css body background */
}

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

.page-index-popular-games__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-index-popular-games__section-description {
  font-size: 1.1em;
  color: #f0f0f0;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index-popular-games__btn-primary {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-index-popular-games__btn-primary:hover {
  background-color: #1a8cc4;
  border-color: #1a8cc4;
}

.page-index-popular-games__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-index-popular-games__btn-secondary:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
}

/* Hero Section */
.page-index-popular-games__hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Account for fixed header */
  overflow: hidden;
}

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

.page-index-popular-games__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

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

.page-index-popular-games__hero-title {
  font-size: 3.5em;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-index-popular-games__hero-description {
  font-size: 1.3em;
  color: #f0f0f0;
  margin-bottom: 40px;
  line-height: 1.5;
}

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

/* Introduction Section */
.page-index-popular-games__introduction {
  padding: 80px 0;
  background-color: #1a1a1a;
}

.page-index-popular-games__intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-index-popular-games__intro-text p {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-index-popular-games__intro-image-wrapper {
  text-align: center;
}

.page-index-popular-games__intro-image {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  width: 100%;
  height: auto;
  min-width: 200px;
  min-height: 200px;
}

/* Games Grid Section */
.page-index-popular-games__cockfighting-games,
.page-index-popular-games__other-games {
  padding: 80px 0;
  background-color: #121212;
}

.page-index-popular-games__games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index-popular-games__game-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index-popular-games__dark-bg {
  background-color: rgba(38, 169, 224, 0.15); /* Primary color tint */
  color: #ffffff;
}

.page-index-popular-games__light-bg {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.page-index-popular-games__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-index-popular-games__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index-popular-games__card-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index-popular-games__card-title a {
  color: #26A9E0;
  text-decoration: none;
}

.page-index-popular-games__card-title a:hover {
  text-decoration: underline;
}

.page-index-popular-games__card-text {
  font-size: 1em;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index-popular-games__game-card .page-index-popular-games__btn-primary {
  margin-top: auto;
  align-self: flex-start;
}

/* Betting Guide Section */
.page-index-popular-games__betting-guide {
  padding: 80px 0;
  background-color: #1a1a1a;
}

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

.page-index-popular-games__guide-item {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index-popular-games__guide-heading {
  font-size: 1.4em;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-index-popular-games__guide-text {
  font-size: 1em;
  line-height: 1.6;
  color: #e0e0e0;
}

.page-index-popular-games__guide-cta {
  text-align: center;
  margin-top: 50px;
}

/* Promotions Section */
.page-index-popular-games__promotions {
  padding: 80px 0;
  background-color: #121212;
}

.page-index-popular-games__promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-index-popular-games__promo-image-wrapper {
  text-align: center;
}

.page-index-popular-games__promo-image {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  width: 100%;
  height: auto;
  min-width: 200px;
  min-height: 200px;
}

.page-index-popular-games__promo-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-index-popular-games__promo-item {
  background-color: rgba(38, 169, 224, 0.1);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-index-popular-games__promo-heading {
  font-size: 1.4em;
  color: #26A9E0;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index-popular-games__promo-text {
  font-size: 1em;
  line-height: 1.6;
  color: #e0e0e0;
}

/* FAQ Section */
.page-index-popular-games__faq-section {
  padding: 80px 0;
  background-color: #1a1a1a; /* Darker background for contrast */
  color: #ffffff;
}

.page-index-popular-games__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-index-popular-games__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-index-popular-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  list-style: none; /* For details tag */
  -webkit-touch-callout: none; /* Disable text selection on iOS */
  -webkit-user-select: none; /* Disable text selection on Safari */
  -khtml-user-select: none; /* Disable text selection on Konqueror HTML */
  -moz-user-select: none; /* Disable text selection on Firefox */
  -ms-user-select: none; /* Disable text selection on Internet Explorer/Edge */
  user-select: none; /* Disable text selection */
}

.page-index-popular-games__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for details tag */
}

.page-index-popular-games__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #FFFFFF;
}

.page-index-popular-games__faq-item[open] .page-index-popular-games__faq-toggle {
  content: '−';
}

.page-index-popular-games__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  line-height: 1.6;
  color: #e0e0e0;
}

.page-index-popular-games__faq-answer p {
  margin-bottom: 10px;
}

.page-index-popular-games__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}

.page-index-popular-games__faq-cta {
  text-align: center;
  margin-top: 50px;
}

/* Final Call to Action Section */
.page-index-popular-games__cta-final {
  padding: 80px 0;
  background-color: #121212;
}

.page-index-popular-games__cta-final .page-index-popular-games__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-index-popular-games__cta-content {
  text-align: left;
}

.page-index-popular-games__cta-content .page-index-popular-games__section-title,
.page-index-popular-games__cta-content .page-index-popular-games__section-description {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.page-index-popular-games__cta-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-index-popular-games__cta-image-wrapper {
  text-align: center;
}

.page-index-popular-games__cta-image {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  width: 100%;
  height: auto;
  min-width: 200px;
  min-height: 200px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .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: 2em;
  }
  .page-index-popular-games__intro-grid,
  .page-index-popular-games__promo-grid,
  .page-index-popular-games__cta-final .page-index-popular-games__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .page-index-popular-games__intro-text,
  .page-index-popular-games__promo-content,
  .page-index-popular-games__cta-content {
    order: 2;
  }
  .page-index-popular-games__intro-image-wrapper,
  .page-index-popular-games__promo-image-wrapper,
  .page-index-popular-games__cta-image-wrapper {
    order: 1;
    margin-bottom: 30px;
  }
  .page-index-popular-games__cta-content .page-index-popular-games__section-title,
  .page-index-popular-games__cta-content .page-index-popular-games__section-description {
    text-align: center;
  }
  .page-index-popular-games__cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-index-popular-games__hero-section {
    height: auto;
    min-height: 600px;
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-index-popular-games__hero-title {
    font-size: 2.2em;
  }
  .page-index-popular-games__hero-description {
    font-size: 1em;
  }
  .page-index-popular-games__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-index-popular-games__btn-primary,
  .page-index-popular-games__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
  }
  .page-index-popular-games__introduction,
  .page-index-popular-games__cockfighting-games,
  .page-index-popular-games__other-games,
  .page-index-popular-games__betting-guide,
  .page-index-popular-games__promotions,
  .page-index-popular-games__faq-section,
  .page-index-popular-games__cta-final {
    padding: 50px 0;
  }
  .page-index-popular-games__section-title {
    font-size: 1.8em;
  }
  .page-index-popular-games__section-description {
    font-size: 0.95em;
  }
  .page-index-popular-games__container {
    padding: 0 15px;
  }
  .page-index-popular-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-index-popular-games__section,
  .page-index-popular-games__card,
  .page-index-popular-games__container,
  .page-index-popular-games__hero-section,
  .page-index-popular-games__introduction,
  .page-index-popular-games__cockfighting-games,
  .page-index-popular-games__other-games,
  .page-index-popular-games__betting-guide,
  .page-index-popular-games__promotions,
  .page-index-popular-games__faq-section,
  .page-index-popular-games__cta-final {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .page-index-popular-games__games-grid,
  .page-index-popular-games__guide-grid {
    gap: 20px;
  }
  .page-index-popular-games__game-card .page-index-popular-games__btn-primary {
    align-self: stretch;
  }
  .page-index-popular-games__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-index-popular-games__faq-answer {
    padding: 0 20px 15px;
  }
  .page-index-popular-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .page-index-popular-games__hero-title {
    font-size: 1.8em;
  }
  .page-index-popular-games__section-title {
    font-size: 1.5em;
  }
  .page-index-popular-games__hero-description {
    font-size: 0.9em;
  }
  .page-index-popular-games__card-title {
    font-size: 1.3em;
  }
  .page-index-popular-games__guide-heading,
  .page-index-popular-games__promo-heading {
    font-size: 1.2em;
  }
  .page-index-popular-games__faq-question {
    font-size: 1em;
  }
}