.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Assuming body background is light */
}

/* LOGO Carousel Section */
.page-index__logo-carousel-section {
  width: 100%;
  padding: 10px 20px 30px; /* Small top padding, not var(--header-offset) */
  background: #017439; /* Brand primary color for carousel background */
  box-sizing: border-box;
}

.page-index__logo-carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.page-index__logo-carousel {
  display: flex;
  gap: 15px;
  overflow: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 8px 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.page-index__logo-carousel::-webkit-scrollbar {
  display: none;
}

.page-index__logo-item {
  flex-shrink: 0;
  width: 80px; /* Fixed size */
  height: 80px; /* Fixed size */
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto;
}

.page-index__logo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.page-index__logo-item a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  pointer-events: auto;
}

.page-index__logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* HERO Main Image Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* No top padding, relies on body padding-top */
  margin-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-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;
}

/* Games Display Section */
.page-index__games-section {
  width: 100%;
  padding: 60px 20px;
  background: #f5f5f5; /* Light grey background for contrast */
  box-sizing: border-box;
}

.page-index__games-container {
  max-width: 1400px;
  margin: 0 auto;
}

.page-index__games-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  align-items: start;
}

.page-index__featured-game-area {
  width: 100%;
}

.page-index__featured-game-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 20px 0;
  color: #ffd700; /* Yellow text for Jackpot */
  text-align: left;
}

.page-index__featured-game {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__featured-game:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.page-index__featured-game-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__featured-game-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.page-index__featured-game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__games-grid-area {
  width: 100%;
}

.page-index__games-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.page-index__games-tab {
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #999999;
  transition: color 0.3s ease;
  text-decoration: none;
  position: relative;
}

.page-index__games-tab:hover {
  color: #017439; /* Brand primary color on hover */
}

.page-index__games-tab.active {
  color: #C30808; /* Custom red color for active tab */
  text-decoration: underline;
}

.page-index__games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  display: none;
}

.page-index__games-grid.active {
  display: grid;
}

.page-index__game-card {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-index__game-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__game-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.page-index__game-card-title {
  font-size: 14px;
  font-weight: 500;
  margin: 10px 0 15px 0; /* Increased bottom margin */
  padding: 0 5px;
  color: #333333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
}

/* General Content Sections */
.page-index__intro-section,
.page-index__quick-access-section,
.page-index__core-games-section,
.page-index__promotions-section,
.page-index__security-support-section,
.page-index__faq-section,
.page-index__blog-section {
  padding: 80px 20px;
  width: 100%;
  box-sizing: border-box;
}

.page-index__intro-container,
.page-index__quick-access-container,
.page-index__core-games-container,
.page-index__promotions-container,
.page-index__security-support-container,
.page-index__faq-container,
.page-index__blog-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-index__intro-title,
.page-index__quick-access-title,
.page-index__core-games-title,
.page-index__promotions-title,
.page-index__security-support-title,
.page-index__faq-title,
.page-index__blog-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-index__intro-text,
.page-index__quick-access-description,
.page-index__core-games-description,
.page-index__promotions-description,
.page-index__security-support-description,
.page-index__blog-description {
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Dark background sections */
.page-index__dark-section {
  background: #017439;
  color: #ffffff;
}

.page-index__dark-section h2,
.page-index__dark-section h3,
.page-index__dark-section p {
  color: #ffffff;
}

/* Light background sections */
.page-index__light-bg {
  background: #ffffff;
  color: #333333;
}

/* CTA Buttons */
.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: #C30808; /* Custom red for register/login */
  color: #FFFF00; /* Custom yellow for register/login font */
  border: 2px solid #C30808;
}

.page-index__btn-primary:hover {
  background: #a30606;
  border-color: #a30606;
}

.page-index__btn-secondary {
  background: transparent;
  color: #ffffff; /* White text on dark section */
  border: 2px solid #ffffff;
}

.page-index__btn-secondary:hover {
  background: #ffffff;
  color: #017439;
}

/* Quick Access Section */
.page-index__access-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.page-index__access-link {
  display: block;
  padding: 20px;
  background: #f0f0f0;
  border-radius: 8px;
  text-decoration: none;
  color: #333333;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.page-index__access-link:hover {
  background: #e0e0e0;
  color: #017439;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Core Games Section */
.page-index__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__game-category-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
  padding-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.page-index__game-category-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 15px;
}

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

.page-index__game-category-name {
  font-size: 22px;
  font-weight: bold;
  margin: 0 20px 10px;
  color: #017439;
}

.page-index__game-category-text {
  font-size: 15px;
  color: #666666;
  margin: 0 20px 20px;
}

.page-index__btn-small {
  display: inline-block;
  padding: 10px 20px;
  background: #017439;
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  margin-left: 20px;
}

.page-index__btn-small:hover {
  background: #005f2e;
}

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

.page-index__promo-card {
  background: #f0f0f0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.page-index__promo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.page-index__promo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page-index__promo-name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #017439;
}

.page-index__promo-text {
  font-size: 15px;
  color: #666666;
}

.page-index__cta-promotions {
  margin-top: 50px;
}

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.page-index__feature-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.page-index__feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.page-index__feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page-index__feature-name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-index__feature-text {
  font-size: 15px;
  color: #f0f0f0;
}

.page-index__cta-support {
  margin-top: 50px;
}

/* FAQ Section */
.page-index__faq-list {
  margin-top: 40px;
  text-align: left;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}

details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: #f5f5f5;
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

details.page-index__faq-item .page-index__faq-answer p {
  color: #555555;
  font-size: 15px;
  line-height: 1.6;
}

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

.page-index__blog-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.page-index__blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__blog-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.page-index__blog-card-content {
  padding: 20px;
}

.page-index__blog-card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #017439;
}

.page-index__blog-card-excerpt {
  font-size: 15px;
  color: #666666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.page-index__blog-card-date {
  font-size: 13px;
  color: #999999;
  display: block;
}

.page-index__blog-cta {
  margin-top: 50px;
}

/* --- General Image and Button Responsiveness --- */
.page-index img:not(.page-index__logo-item img) {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index a[class*="button"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-buttons,
.page-index__button-group,
.page-index__btn-container,
.page-index__intro-container,
.page-index__quick-access-container,
.page-index__core-games-container,
.page-index__promotions-container,
.page-index__security-support-container,
.page-index__faq-container,
.page-index__blog-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Responsive Styles (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .page-index__games-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for tablet */
  }

  .page-index__featured-game-image {
    height: 400px;
  }

  .page-index__games-tab {
    font-size: 17px;
  }

  .page-index__intro-title,
  .page-index__quick-access-title,
  .page-index__core-games-title,
  .page-index__promotions-title,
  .page-index__security-support-title,
  .page-index__faq-title,
  .page-index__blog-title {
    font-size: 28px;
  }

  .page-index__intro-text,
  .page-index__quick-access-description,
  .page-index__core-games-description,
  .page-index__promotions-description,
  .page-index__security-support-description,
  .page-index__blog-description {
    font-size: 17px;
  }

  .page-index__game-category-name,
  .page-index__promo-name,
  .page-index__feature-name {
    font-size: 19px;
  }

  .page-index__blog-card-title {
    font-size: 18px;
  }

  .page-index__blog-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* --- Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  /* LOGO Carousel Section Mobile */
  .page-index__logo-carousel-section {
    padding: 10px 15px 20px; /* Small top padding, not var(--header-offset) */
  }

  .page-index__logo-carousel {
    gap: 12px;
  }

  .page-index__logo-item {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    min-width: 80px !important; /* Ensure it doesn't shrink */
  }

  .page-index__logo-item a {
    padding: 8px;
  }

  /* HERO Main Image Section Mobile */
  .page-index__hero-section {
    padding-top: 0 !important; /* Ensure no extra top padding */
  }

  /* Games Display Section Mobile */
  .page-index__games-section {
    padding: 40px 15px;
  }

  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .page-index__featured-game-title {
    font-size: 20px;
    text-align: center;
  }

  .page-index__featured-game-image {
    height: 300px;
  }

  .page-index__games-tabs {
    gap: 15px;
    justify-content: center;
  }

  .page-index__games-tab {
    font-size: 16px;
  }

  .page-index__games-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
    gap: 15px;
  }

  .page-index__game-card-image {
    height: 150px;
  }

  .page-index__game-card-title {
    font-size: 13px;
    margin: 8px 0 10px 0;
    padding: 0 3px;
  }

  /* General Content Sections Mobile */
  .page-index__intro-section,
  .page-index__quick-access-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__security-support-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }

  .page-index__intro-title,
  .page-index__quick-access-title,
  .page-index__core-games-title,
  .page-index__promotions-title,
  .page-index__security-support-title,
  .page-index__faq-title,
  .page-index__blog-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .page-index__intro-text,
  .page-index__quick-access-description,
  .page-index__core-games-description,
  .page-index__promotions-description,
  .page-index__security-support-description,
  .page-index__blog-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* CTA Buttons Mobile */
  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  /* Quick Access Section Mobile */
  .page-index__access-links-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Core Games Section Mobile */
  .page-index__game-categories {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-index__game-category-image {
    height: 180px;
  }

  .page-index__game-category-name {
    font-size: 20px;
  }

  .page-index__game-category-text {
    font-size: 14px;
  }

  /* Promotions Section Mobile */
  .page-index__promotion-cards {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-index__promo-card {
    padding: 25px;
  }

  .page-index__promo-name {
    font-size: 18px;
  }

  .page-index__promo-text {
    font-size: 14px;
  }

  /* Security & Support Section Mobile */
  .page-index__features-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-index__feature-item {
    padding: 25px;
  }

  .page-index__feature-name {
    font-size: 18px;
  }

  .page-index__feature-text {
    font-size: 14px;
  }

  /* FAQ Section Mobile */
  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px;
  }

  .page-index__faq-qtext {
    font-size: 15px;
  }

  .page-index__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }

  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px;
  }

  details.page-index__faq-item .page-index__faq-answer p {
    font-size: 14px;
  }

  /* Blog Section Mobile */
  .page-index__blog-cards {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-index__blog-card-image {
    height: 180px;
  }

  .page-index__blog-card-title {
    font-size: 17px;
  }

  .page-index__blog-card-excerpt {
    font-size: 14px;
  }

  .page-index__blog-card-date {
    font-size: 12px;
  }

  /* Ensure all images are responsive except logo-item */
  .page-index img:not(.page-index__logo-item img) {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure all containers have appropriate padding/width */
  .page-index__intro-container,
  .page-index__quick-access-container,
  .page-index__core-games-container,
  .page-index__promotions-container,
  .page-index__security-support-container,
  .page-index__faq-container,
  .page-index__blog-container {
    padding-left: 0;
    padding-right: 0;
  }

  .page-index__intro-section .page-index__intro-container,
  .page-index__quick-access-section .page-index__quick-access-container,
  .page-index__core-games-section .page-index__core-games-container,
  .page-index__promotions-section .page-index__promotions-container,
  .page-index__security-support-section .page-index__security-support-container,
  .page-index__faq-section .page-index__faq-container,
  .page-index__blog-section .page-index__blog-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}