/* style/index.css */

:root {
  --primary-color: #0047AB; /* Deep Ocean Blue */
  --secondary-color: #FFD700; /* Gold */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f1f3f5;
  --border-light: #e4e4e4;
  --dark-bg-1: #0d0d0d; /* Assuming this is a dark background from shared.css */
}

/* Base styles for the page content */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--dark-bg-1); /* Inherited from body */
}

/* 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: Adjust for fixed header */
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
}

.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 24px rgba(0, 0, 0, 0.3);
}

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

.page-index__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.page-index__hero-description {
  font-size: 20px;
  line-height: 1.8;
  margin-bottom: 40px;
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__cta-button:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-index__text-highlight {
  color: var(--secondary-color);
  font-weight: bold;
}

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

.page-index__page-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 20px;
  text-align: center;
}

.page-index__leaderboard-intro {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px 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;
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%; /* Ensure segments take full height */
}

.page-index__segment-1 {
  border-left: none; /* No border on the very first segment */
  padding-left: 0;
  flex-shrink: 0;
  width: 150px; /* Fixed width */
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.page-index__segment-2 {
  flex: 2; /* Main content column, flexible width */
  min-width: 250px; /* Ensure minimum width */
}

.page-index__segment-3 {
  flex-shrink: 0;
  width: 180px; /* Fixed or moderate width */
}

.page-index__segment-4 {
  flex-shrink: 0;
  width: 220px; /* Fixed width for buttons */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-index__rank-badge {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 2px 6px 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__rank-badge:not(.page-index__rank-1):not(.page-index__rank-2):not(.page-index__rank-3) {
  background: linear-gradient(135deg, #ff6b35, #ff8c42); /* Orange for others */
}

.page-index__game-icon {
  max-width: 100px;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.page-index__game-name-link {
  color: var(--text-dark);
  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: var(--text-dark);
  font-weight: bold;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-index__game-description a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}

.page-index__game-description a:hover {
  text-decoration: underline;
  color: #003380; /* Darker primary */
}

.page-index__game-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
}

.page-index__stars {
  color: var(--secondary-color);
  font-size: 18px;
  font-weight: bold;
}

.page-index__rating-number {
  font-size: 16px;
  color: var(--text-dark);
  font-weight: bold;
}

.page-index__promotion-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-index__promotion-link {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
}

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

.page-index__hot-badge {
  background: #dc3545;
  color: var(--text-light);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
}

.page-index__cta-button {
  display: block;
  width: 100%;
  padding: 12px 15px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
}

.page-index__btn-download {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.page-index__btn-review {
  background: linear-gradient(135deg, #6c757d, #5a6268);
}

.page-index__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

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

.page-index__review-content-container {
  max-width: 1400px; /* Wider than leaderboard for 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-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 24px;
  text-align: center;
}

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

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

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

/* Homepage Intro Section */
.page-index__intro-section {
  padding: 60px 20px;
  background: var(--dark-bg-1);
  color: var(--text-light);
  text-align: center;
}

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

.page-index__intro-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 40px;
  color: var(--text-light);
}

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

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

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

.page-index__intro-item img {
  max-width: 200px; /* Ensuring minimum size for intro images */
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 0 5px var(--secondary-color));
}

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

.page-index__intro-item p {
  font-size: 16px;
  color: #e0e0e0;
}

/* Core Games Section */
.page-index__core-games-section {
  padding: 60px 20px;
  background: var(--bg-light);
  text-align: center;
}

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

.page-index__core-games-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-index__core-games-description {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__game-carousel {
  display: flex;
  overflow-x: auto; /* Enable horizontal scrolling */
  gap: 30px;
  padding-bottom: 20px; /* Space for scrollbar */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.page-index__game-card-large {
  flex: 0 0 350px; /* Fixed width for larger cards */
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-index__game-card-content {
  padding: 25px;
}

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

.page-index__game-card-content p {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-index__game-card-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border: none;
}

.page-index__game-card-button:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.page-index__core-games-footer {
  font-size: 18px;
  color: var(--text-dark);
  margin-top: 40px;
}

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

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

.page-index__promotions-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-index__promotions-description {
  font-size: 18px;
  color: #e0e0e0;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.page-index__promotion-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-index__promotion-card-content {
  padding: 25px;
}

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

.page-index__promotion-card-content p {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.page-index__promotion-card-button {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  border: none;
}

.page-index__promotion-card-button:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.page-index__promotions-footer {
  font-size: 18px;
  color: #e0e0e0;
  margin-top: 40px;
}

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

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

.page-index__latest-blog-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.page-index__latest-blog-description {
  font-size: 18px;
  color: var(--text-dark);
  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(300px, 1fr));
  gap: 30px;
}

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

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

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

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

.page-index__blog-card-content h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

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

.page-index__blog-card-link:hover {
  color: #003380; /* Darker primary */
  text-decoration: underline;
}

.page-index__blog-card-content p {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.page-index__blog-date {
  font-size: 14px;
  color: #6c757d;
  display: block;
}

.page-index__blog-footer {
  margin-top: 40px;
}

.page-index__view-all-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
}

.page-index__view-all-button:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 40px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__cta-button {
    padding: 15px 35px;
    font-size: 18px;
  }
  .page-index__game-card {
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
  }
  .page-index__game-card-segment {
    border-left: none;
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }
  .page-index__segment-1, .page-index__segment-3, .page-index__segment-4 {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
  }
  .page-index__segment-1 {
    position: relative;
    height: auto;
    gap: 20px;
  }
  .page-index__game-icon {
    max-width: 120px;
  }
  .page-index__rank-badge {
    position: static;
    margin-right: 10px;
  }
  .page-index__segment-2 {
    order: 1; /* Move game info to top when wrapped */
    padding: 10px 0;
  }
  .page-index__segment-3 {
    order: 2;
  }
  .page-index__segment-4 {
    order: 3;
    margin-top: 15px;
  }
  .page-index__game-name {
    font-size: 22px;
  }
  .page-index__game-description {
    font-size: 13px;
  }
  .page-index__cta-button {
    font-size: 14px;
    padding: 10px 15px;
  }
  .page-index__game-carousel {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__game-card-large {
    flex: 0 0 300px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 140px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
  }
  .page-index__hero-title {
    font-size: 32px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-index__page-title,
  .page-index__intro-title,
  .page-index__core-games-title,
  .page-index__promotions-title,
  .page-index__latest-blog-title {
    font-size: 28px;
  }
  .page-index__leaderboard-intro,
  .page-index__core-games-description,
  .page-index__promotions-description,
  .page-index__latest-blog-description {
    font-size: 16px;
  }
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__latest-blog-section {
    padding: 30px 15px;
  }
  .page-index__review-content-card {
    padding: 25px;
  }
  .page-index__review-title {
    font-size: 24px;
  }
  .page-index__review-content-card h3 {
    font-size: 18px;
  }
  .page-index__review-body p {
    font-size: 15px;
  }
  .page-index__intro-item h3,
  .page-index__game-card-content h3,
  .page-index__promotion-card-content h3,
  .page-index__blog-card-content h3 {
    font-size: 20px;
  }
  .page-index__intro-item p,
  .page-index__game-card-content p,
  .page-index__promotion-card-content p,
  .page-index__blog-card-content p {
    font-size: 15px;
  }
  .page-index__game-card-button,
  .page-index__promotion-card-button,
  .page-index__view-all-button {
    font-size: 14px;
    padding: 10px 20px;
  }
  
  /* Force responsive images and containers */
  .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-section,
  .page-index__game-leaderboard-section,
  .page-index__review-content-section,
  .page-index__intro-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__latest-blog-section,
  .page-index__hero-container,
  .page-index__game-leaderboard,
  .page-index__review-content-container,
  .page-index__review-content-card,
  .page-index__intro-container,
  .page-index__intro-grid,
  .page-index__intro-item,
  .page-index__core-games-container,
  .page-index__game-carousel,
  .page-index__game-card-large,
  .page-index__promotions-container,
  .page-index__promotion-grid,
  .page-index__promotion-card,
  .page-index__latest-blog-container,
  .page-index__blog-grid,
  .page-index__blog-card,
  .page-index__segment-4 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__segment-4 {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .page-index__btn-download,
  .page-index__btn-review {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-width: auto !important;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 28px;
  }
  .page-index__hero-description {
    font-size: 15px;
  }
  .page-index__cta-button {
    padding: 10px 25px;
    font-size: 15px;
  }
  .page-index__page-title,
  .page-index__intro-title,
  .page-index__core-games-title,
  .page-index__promotions-title,
  .page-index__latest-blog-title {
    font-size: 24px;
  }
  .page-index__game-card-large {
    flex: 0 0 90%; /* Adjust for smaller screens */
  }
  .page-index__intro-item img {
    max-width: 150px;
  }
}