/* style/index.css */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #FFA500; /* Orange Gold */
  --dark-accent-color: #8B0000; /* Dark Red */
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --background-light-grey: #f1f3f5;
  --border-light-grey: #e4e4e4;
}

.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light-bg);
  background-color: var(--dark-bg-1); /* Assume dark background from shared.css */
}

/* Ensure all images are responsive and do not overflow */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Default for all images */
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 180px; /* Desktop: Adjusted for fixed header */
  background: linear-gradient(135deg, var(--dark-accent-color), #4a0000); /* Darker gradient for contrast */
  color: var(--text-color-dark-bg);
}

.page-index__hero-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-index__hero-content h1 {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color); /* Gold color for heading */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index__hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-dark-bg);
}

.page-index__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  border: none;
}

.page-index__cta-button:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Game Leaderboard Section */
.page-index__game-leaderboard-section {
  padding: 60px 20px;
  background: var(--background-light-grey);
  color: var(--text-color-light-bg);
}

.page-index__page-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--dark-accent-color);
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.page-index__game-leaderboard {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-index__game-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-card-segment {
  padding: 0 20px;
  height: 100%; /* Ensure segments have equal height */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-index__game-card-segment:not(:first-child) {
  border-left: 1px solid var(--border-light-grey);
}

.page-index__segment-1 {
  flex-shrink: 0;
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 0;
}

.page-index__rank-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Default for 4+ */
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.page-index__rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500); /* Gold */
}

.page-index__rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0); /* Silver */
}

.page-index__rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333); /* Bronze */
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

.page-index__segment-2 {
  flex: 1;
  text-align: center;
}

.page-index__game-name {
  font-size: 24px;
  font-weight: bold;
  color: var(--dark-accent-color);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.page-index__game-name-link {
  color: var(--dark-accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-name-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-index__game-description {
  font-size: 14px;
  color: #555555;
  font-weight: bold;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-index__game-description a {
  color: #0066cc;
  font-weight: bold;
  text-decoration: none;
}

.page-index__game-description a:hover {
  color: #004499;
  text-decoration: underline;
}

.page-index__segment-3 {
  flex-shrink: 0;
  width: 180px;
  text-align: center;
}

.page-index__game-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 18px;
}

.page-index__rating-number {
  font-weight: bold;
  margin-left: 5px;
  color: #333333;
}

.page-index__promotion-text {
  font-size: 14px;
  color: #555555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.page-index__promotion-link {
  color: #0066cc;
  text-decoration: none;
  font-weight: bold;
}

.page-index__promotion-link:hover {
  color: #004499;
  text-decoration: underline;
}

.page-index__hot-badge {
  background: #ff4d4d;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.page-index__segment-4 {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 0;
}

.page-index__cta-button {
  display: block;
  width: 100%;
  padding: 12px 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: none;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-review {
  background: #ffffff;
  color: var(--dark-accent-color);
  border: 1px solid var(--dark-accent-color);
  box-shadow: none;
}

.page-index__cta-button:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__btn-review:hover {
  background: var(--background-light-grey);
  color: var(--dark-accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Brand Review Content Section */
.page-index__review-content-section {
  padding: 40px 20px;
  background: var(--background-light-grey); /* Match leaderboard background */
  color: var(--text-color-light-bg);
}

.page-index__review-content-container {
  max-width: 1400px; /* Wider for better readability */
  margin: 0 auto;
}

.page-index__review-content-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

.page-index__review-content-card h2 {
  font-size: 28px;
  font-weight: bold;
  color: var(--dark-accent-color);
  margin-bottom: 24px;
  text-align: center;
}

.page-index__review-content-card h3 {
  font-size: 20px;
  font-weight: bold;
  color: var(--dark-accent-color);
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-index__review-body {
  color: var(--text-color-light-bg);
  line-height: 1.7;
}

.page-index__review-body p {
  margin-bottom: 16px;
  font-size: 16px;
}

/* Intro Section */
.page-index__intro-section {
  padding: 60px 20px;
  background: var(--dark-accent-color); /* Dark background for contrast */
  color: var(--text-color-dark-bg);
  text-align: center;
}

.page-index__intro-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__section-title {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--primary-color); /* Gold color for heading */
}

.page-index__intro-section p {
  font-size: 17px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-index__intro-item:hover {
  transform: translateY(-5px);
}

.page-index__intro-item h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__intro-item p {
  font-size: 15px;
  color: var(--text-color-dark-bg);
  margin-bottom: 0;
}

/* Games & Services Section */
.page-index__games-services-section {
  padding: 60px 20px;
  background: #ffffff;
  color: var(--text-color-light-bg);
  text-align: center;
}

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

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

.page-index__game-service-card {
  background: var(--background-light-grey);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__game-service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__game-service-card h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--dark-accent-color);
  margin-bottom: 10px;
}

.page-index__game-service-card p {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: #ffffff;
  color: var(--dark-accent-color);
  border: 2px solid var(--dark-accent-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-index__btn-secondary:hover {
  background: var(--dark-accent-color);
  color: #ffffff;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background: var(--dark-accent-color); /* Dark background for contrast */
  color: var(--text-color-dark-bg);
  text-align: center;
}

.page-index__promotions-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__promotions-section p {
  font-size: 17px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-index__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-index__promotion-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__promotion-card h3 {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-index__promotion-card p {
  font-size: 15px;
  color: var(--text-color-dark-bg);
  margin-bottom: 20px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 10px 25px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
}

.page-index__btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-2px);
}

/* Latest Blog Section */
.page-index__latest-blog-section {
  padding: 60px 20px;
  background: var(--background-light-grey);
  color: var(--text-color-light-bg);
  text-align: center;
}

.page-index__latest-blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__latest-blog-section p {
  font-size: 17px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__blog-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 25px;
  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 20px rgba(0, 0, 0, 0.15);
}

.page-index__blog-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__blog-card h3 {
  font-size: 20px;
  font-weight: bold;
  color: var(--dark-accent-color);
  margin-bottom: 10px;
}

.page-index__blog-title-link {
  color: var(--dark-accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-index__blog-summary {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
}

.page-index__btn-readmore {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-index__btn-readmore:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-content h1 {
    font-size: 36px;
  }

  .page-index__hero-content p {
    font-size: 16px;
  }

  .page-index__cta-button {
    font-size: 18px;
    padding: 15px 35px;
  }

  .page-index__page-title {
    font-size: 28px;
  }

  .page-index__game-card-segment {
    padding: 0 15px;
  }

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

  .page-index__game-description {
    font-size: 13px;
  }

  .page-index__segment-3 {
    width: 150px;
  }

  .page-index__segment-4 {
    width: 180px;
  }

  .page-index__cta-button {
    font-size: 14px;
    padding: 10px 12px;
  }

  .page-index__section-title {
    font-size: 26px;
  }

  .page-index__intro-item h3,
  .page-index__game-service-card h3,
  .page-index__promotion-card h3,
  .page-index__blog-card h3 {
    font-size: 20px;
  }

  .page-index__intro-section p,
  .page-index__promotions-section p,
  .page-index__latest-blog-section p {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 160px !important; /* Mobile: Adjusted for fixed header */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__hero-content h1 {
    font-size: 28px;
  }

  .page-index__hero-content p {
    font-size: 15px;
  }

  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__games-services-section,
  .page-index__promotions-section,
  .page-index__latest-blog-section {
    padding: 30px 15px;
  }

  .page-index__page-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-index__game-card {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }

  .page-index__game-card-segment {
    width: 100% !important;
    border-left: none !important;
    padding: 10px 0;
  }

  .page-index__game-card-segment:not(:first-child) {
    border-top: 1px solid var(--border-light-grey);
  }

  .page-index__segment-1 {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding-top: 0;
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-light-grey);
  }

  .page-index__rank-badge {
    width: 28px;
    height: 28px;
    font-size: 15px;
    margin-bottom: 0;
  }

  .page-index__game-icon {
    max-width: 80px;
  }

  .page-index__segment-2 {
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light-grey);
  }

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

  .page-index__game-description {
    font-size: 12px;
  }

  .page-index__segment-3 {
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light-grey);
  }

  .page-index__game-rating {
    font-size: 16px;
  }

  .page-index__promotion-text {
    font-size: 13px;
  }

  .page-index__segment-4 {
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
    padding-bottom: 0;
  }

  .page-index__btn-download,
  .page-index__btn-review {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 12px;
    padding: 8px 12px;
    white-space: normal;
    word-wrap: break-word;
    min-width: auto;
  }

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

  .page-index__review-content-card h2 {
    font-size: 24px;
  }

  .page-index__review-content-card h3 {
    font-size: 18px;
  }

  .page-index__review-body p {
    font-size: 15px;
  }

  .page-index__intro-grid,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
  }

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

  .page-index__intro-item h3,
  .page-index__game-service-card h3,
  .page-index__promotion-card h3,
  .page-index__blog-card h3 {
    font-size: 18px;
  }

  .page-index__intro-section p,
  .page-index__promotions-section p,
  .page-index__latest-blog-section p {
    font-size: 15px;
  }

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__hero-container,
  .page-index__game-leaderboard,
  .page-index__review-content-container,
  .page-index__intro-container,
  .page-index__games-services-container,
  .page-index__promotions-container,
  .page-index__latest-blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Override specific padding for segments if needed to prevent overflow */
  .page-index__game-card-segment {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-index__intro-item,
  .page-index__game-service-card,
  .page-index__promotion-card,
  .page-index__blog-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .page-index__hero-content h1 {
    font-size: 24px;
  }
  .page-index__cta-button {
    font-size: 14px;
    padding: 10px 20px;
  }
  .page-index__page-title {
    font-size: 20px;
  }
  .page-index__game-icon {
    max-width: 60px;
  }
  .page-index__game-name {
    font-size: 16px;
  }
  .page-index__game-description {
    font-size: 11px;
  }
  .page-index__btn-download, .page-index__btn-review {
    font-size: 11px;
    padding: 6px 8px;
  }
  .page-index__section-title {
    font-size: 20px;
  }
  .page-index__intro-section p,
  .page-index__promotions-section p,
  .page-index__latest-blog-section p {
    font-size: 14px;
  }
  .page-index__intro-item h3,
  .page-index__game-service-card h3,
  .page-index__promotion-card h3,
  .page-index__blog-card h3 {
    font-size: 18px;
  }
}