.page-index {
  color: #333333; /* Default text color for light backgrounds */
  background: var(--bg-color, #FFFFFF);
}

.page-index__dark-section {
  background: #017439;
  color: #ffffff;
}

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

.page-index__section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
}

.page-index__section-description {
  font-size: clamp(14px, 2vw, 16px);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
  color: inherit;
}

/* Buttons */
.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-register,
.page-index__btn-login,
.page-index a[class*="button"],
.page-index a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-index__btn-primary {
  background: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

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

.page-index__btn-secondary {
  background: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-index__btn-secondary:hover {
  background: #f0f0f0;
  color: #005f2f;
  border-color: #005f2f;
}

.page-index__btn-register {
  background: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

.page-index__btn-register:hover {
  background: #a00606;
  border-color: #a00606;
}

.page-index__btn-login {
  background: #C30808;
  color: #FFFF00;
  border: 2px solid #C30808;
}

.page-index__btn-login:hover {
  background: #a00606;
  border-color: #a00606;
}

/* Images responsiveness */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* LOGO Carousel Section */
.page-index__logo-carousel-section {
  width: 100%;
  padding: 10px 20px 30px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
}

.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;
  -ms-overflow-style: none;
  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;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: auto;
}

.page-index__logo-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px 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 Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Follows LOGO carousel, body padding-top handles header offset */
  margin-top: 0;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
}

.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 Section */
.page-index__games-section {
  width: 100%;
  padding: 60px 20px;
  background: #ffffff;
}

.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;
  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;
}

.page-index__games-tab.active {
  color: #C30808;
  text-decoration: underline;
}

.page-index__games-tab.active + .page-index__games-tab {
  color: #333333;
}

.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 0 0;
  padding: 0 5px;
  color: #333333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.4;
  padding-bottom: 10px;
}

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

.page-index__feature-item {
  text-align: center;
  padding: 25px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-index__feature-item:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

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

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

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 50px 20px;
  background: #f5f5f5;
  text-align: center;
}

.page-index__access-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-index__access-button {
  min-width: 180px;
}

/* Core Games Section */
.page-index__game-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.page-index__category-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  border-radius: 5px;
}

.page-index__category-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.page-index__category-tab.active {
  color: #FFFF00;
  background: rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid #FFFF00;
}

.page-index__category-content {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-index__category-content.active {
  display: grid;
}

.page-index__content-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__content-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__content-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.page-index__content-title {
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
  padding: 20px 20px 10px;
}

.page-index__content-text {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f0f0;
  padding: 0 20px 20px;
  flex-grow: 1;
}

.page-index__content-card .page-index__btn-primary {
  margin: 0 20px 20px;
  align-self: flex-start;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background: #f5f5f5;
}

.page-index__promo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__promo-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__promo-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.page-index__promo-title {
  font-size: 20px;
  font-weight: bold;
  color: #017439;
  padding: 20px 20px 10px;
}

.page-index__promo-text {
  font-size: 15px;
  line-height: 1.6;
  color: #555555;
  padding: 0 20px 20px;
  flex-grow: 1;
}

.page-index__promo-card .page-index__btn-primary {
  margin: 0 20px 20px;
  align-self: flex-start;
}

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

.page-index__item {
  text-align: center;
  padding: 25px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-index__item:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
}

.page-index__item-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

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

.page-index__item-text {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f0f0;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-index__item .page-index__btn-secondary {
  margin-top: auto;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 60px 20px;
  background: #ffffff;
}

.page-index__faq-list {
  margin-top: 40px;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #017439;
  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 8px 8px;
  color: #555555;
  line-height: 1.6;
}

details.page-index__faq-item .page-index__faq-answer p {
  margin: 0;
  padding-top: 10px;
}

/* Blog Section */
.page-index__blog-section {
  padding: 60px 20px;
}

.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: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-index__blog-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-index__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__blog-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
  color: #FFFF00;
}

.page-index__blog-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f0f0;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: auto;
}

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

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

  .page-index__intro-features,
  .page-index__promo-cards,
  .page-index__security-support-grid,
  .page-index__blog-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }

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

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

  .page-index__container {
    padding: 30px 15px;
  }

  .page-index__section-title {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .page-index__section-description {
    font-size: 14px;
    margin-bottom: 30px;
  }

  /* LOGO Carousel */
  .page-index__logo-carousel-section {
    padding: 10px 15px 20px !important;
  }
  
  .page-index__logo-carousel {
    gap: 12px;
  }
  
  .page-index__logo-item {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
  }
  
  .page-index__logo-item a {
    padding: 8px;
  }

  /* HERO Section */
  .page-index__hero-section {
    padding-top: 0 !important; /* body padding-top handles header offset */
  }

  /* Games Section */
  .page-index__games-section {
    padding: 40px 15px;
  }
  
  .page-index__games-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .page-index__featured-game-title {
    font-size: 20px;
  }
  
  .page-index__featured-game-image {
    height: 300px;
  }
  
  .page-index__games-tabs {
    gap: 15px;
  }
  
  .page-index__games-tab {
    font-size: 16px;
  }
  
  .page-index__games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .page-index__game-card-image {
    height: 150px;
  }
  
  .page-index__game-card-title {
    font-size: 13px;
    margin: 8px 0 0 0;
    padding: 0 3px;
  }

  /* Intro Section */
  .page-index__intro-features {
    gap: 20px;
  }

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

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

  /* Quick Access Section */
  .page-index__quick-access-section {
    padding: 40px 15px;
  }

  .page-index__access-links {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__access-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
  }

  /* Core Games Section */
  .page-index__game-categories {
    gap: 10px;
    margin-bottom: 30px;
  }

  .page-index__category-tab {
    padding: 8px 15px;
    font-size: 14px;
  }

  .page-index__category-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__content-image {
    height: 180px;
  }

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

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

  .page-index__content-card .page-index__btn-primary {
    margin: 0 15px 15px;
  }

  /* Promotions Section */
  .page-index__promotions-section {
    padding: 40px 15px;
  }

  .page-index__promo-cards {
    gap: 20px;
  }

  .page-index__promo-image {
    height: 150px;
  }

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

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

  .page-index__promo-card .page-index__btn-primary {
    margin: 0 15px 15px;
  }

  /* Security & Support Section */
  .page-index__security-support-section {
    padding: 40px 15px;
  }

  .page-index__security-support-grid {
    gap: 20px;
  }

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

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

  /* FAQ Section */
  .page-index__faq-section {
    padding: 40px 15px;
  }
  
  details.page-index__faq-item summary.page-index__faq-question { padding: 15px; }
  .page-index__faq-qtext { font-size: 15px; }

  /* Blog Section */
  .page-index__blog-section {
    padding: 40px 15px;
  }

  .page-index__blog-cards {
    gap: 20px;
  }

  .page-index__blog-image {
    height: 160px;
  }

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

  .page-index__blog-excerpt {
    font-size: 14px;
  }
  
  .page-index__view-all .page-index__btn-primary {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Universal Image Responsiveness for content areas, excluding logo-item */
  .page-index__container img,
  .page-index__section img,
  .page-index__card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure all containers have proper padding and max-width */
  .page-index__section,
  .page-index__container,
  .page-index__access-links,
  .page-index__game-categories,
  .page-index__games-tabs,
  .page-index__view-all {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Specific override for elements that manage their own padding or should not have extra */
  .page-index__logo-carousel-section, .page-index__hero-section, .page-index__games-section, .page-index__promotions-section, .page-index__security-support-section, .page-index__faq-section, .page-index__blog-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Inner containers for sections should handle max-width */
  .page-index__logo-carousel-container, .page-index__hero-container, .page-index__games-container {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }
}