/* Base styles for the page */
.page-index {
  background-color: #0A0A0A; /* Body background from custom palette */
  color: #FFF6D6; /* Main text color from custom palette */
}

/* === Module 0: Hero Image === */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-index__hero-image {
  width: 100%;
  height: auto;
  display: block;
}

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

/* === Module 1: H1 Title + SEO Partner Links === */
.page-index__title-section {
  max-width: 1330px;
  margin: 20px auto;
  padding: 0 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-index__page-title {
  color: #FFF6D6;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.page-index__page-title::before,
.page-index__page-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background-color: #CAAB71;
}

.page-index__seo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #9DA0A8;
  padding: 10px 0;
}

.page-index__seo-link-item a {
  color: #CAAB71;
  text-decoration: none;
  font-weight: 600;
}

.page-index__seo-link-item a:hover {
  color: #FFD36B;
  text-decoration: underline;
}

/* === Module 2: Scrollable Long Text === */
.page-index__home-content {
  border: 1px solid #FBB00D; /* Border from custom palette (Glow) */
  border-radius: 10px;
  padding: 0 10px;
  height: 650px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #CAAB71 #1A202C; /* Thumb and Track color */
  max-width: 1330px;
  margin: 40px auto;
  background-color: #111111; /* Card BG from custom palette */
  box-sizing: border-box;
}

.page-index__home-content::-webkit-scrollbar {
  width: 8px;
}

.page-index__home-content::-webkit-scrollbar-track {
  background: #1A202C;
  border-radius: 10px;
}

.page-index__home-content::-webkit-scrollbar-thumb {
  background-color: #CAAB71;
  border-radius: 10px;
  border: 2px solid #1A202C;
}

.page-index__home-content blockquote {
  border-left: 5px solid #CAAB71;
  margin: 20px 0;
  padding-left: 15px;
  color: #9DA0A8;
}

.page-index__home-content blockquote strong a {
  color: #FFD36B;
  text-decoration: none;
}

.page-index__home-content h2 {
  background: linear-gradient(-225deg, #28a745 0%, #44107a 29%, #ff1361 67%, #fff800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: page-index-gradient 5s linear infinite;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
}

.page-index__home-content h3 {
  color: #FFF6D6;
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600;
}

.page-index__home-content p {
  color: #9DA0A8; /* Text Main color from custom palette */
  margin-bottom: 15px;
  line-height: 1.6;
}

.page-index__home-content ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #9DA0A8;
}

.page-index__home-content ul li {
  margin-bottom: 5px;
  line-height: 1.5;
}

.page-index__wp-caption {
  text-align: center;
  margin: 20px auto;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.page-index__wp-caption-text {
  color: #9DA0A8;
  font-size: 14px;
  margin-top: 10px;
}

@keyframes page-index-gradient {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Module 3–6 Shared: Dark Section & Gold Title Line === */
.page-index__row-games,
.page-index__row-sport,
.page-index__row-coop {
  background-color: #1A202C;
  padding: 40px 20px;
  max-width: 1330px;
  margin: 40px auto 0; /* Adjusted margin-top for separation */
  box-sizing: border-box;
}

.page-index__games-title,
.page-index__sport-title,
.page-index__coop-title {
  color: #FFF6D6;
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 24px;
  position: relative;
  padding-bottom: 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
}

.page-index__games-title::after,
.page-index__sport-title::after,
.page-index__coop-title::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: #CAAB71;
  margin: 8px auto 0;
}

/* === Module 3: Game Slider === */
.page-index__slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0 10px; /* Internal padding for slider */
  box-sizing: border-box;
}

.page-index__slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100%;
  transition: transform 0.4s ease;
}

.page-index__game-slide {
  flex: 0 0 205px; /* Matches image width */
  max-width: 205px;
  min-width: 0;
  box-sizing: border-box;
}

.page-index__game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background-color: #111111; /* Card BG from custom palette */
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.page-index__game-card-image {
  position: relative;
  width: 100%;
  padding-top: calc(146 / 205 * 100%); /* Maintain aspect ratio 205x146 */
  overflow: hidden;
}

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

.page-index__game-card h4 {
  color: #CAAB71;
  margin: 8px 0;
  font-size: 14px;
  text-align: center;
  padding: 0 5px 10px;
}

.page-index__slider-prev,
.page-index__slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFF6D6;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.page-index__slider-prev:hover,
.page-index__slider-next:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.page-index__slider-prev {
  left: 0;
}

.page-index__slider-next {
  right: 0;
}

.page-index__slider-prev::before {
  content: '‹';
}

.page-index__slider-next::before {
  content: '›';
}

/* === Module 4: Fixed Partner 6-Column Grid (NO SCROLLING) === */
.page-index__banners-top-wrapper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: visible; /* Crucial: ensures no scrollbar */
  padding: 20px 10px;
  box-sizing: border-box;
}

.page-index__banner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.page-index__banner-item a {
  display: block;
  width: 100%;
  max-width: 120px;
  margin: 0 auto;
  text-align: center;
}

.page-index__banner-item img {
  width: 100%;
  
  height: auto;
  
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: grayscale(100%); /* Example for partner logos */
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.page-index__banner-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* === Module 5: Blog Card Grid === */
.page-index__blog-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch; /* Ensures equal height cards */
  padding: 0 10px;
  box-sizing: border-box;
}

.page-index__blog-card {
  background-color: #1A202C;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #3A2A12; /* Border from custom palette */
  height: 100%; /* Important for align-items: stretch */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-index__blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.page-index__blog-card-image {
  position: relative;
  width: 100%;
  padding-top: 56%; /* 16:9 aspect ratio */
  overflow: hidden;
  flex-shrink: 0;
}

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

.page-index__blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* Allows body to grow and push button to bottom */
  padding: 15px;
  min-height: 0;
}

.page-index__blog-card-body h5 {
  color: #CAAB71;
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.4;
}

.page-index__blog-card-body p {
  color: #9DA0A8;
  margin: 0 0 12px;
  flex: 1 1 auto; /* Allows paragraph to grow and push button to bottom */
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-index__btn-outline {
  margin-top: auto; /* Pushes button to the bottom */
  align-self: flex-start;
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid #CAAB71;
  border-radius: 5px;
  color: #CAAB71;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-index__btn-outline:hover {
  background-color: #CAAB71;
  color: #1A202C;
  border-color: #CAAB71;
}

.page-index__blog-card:hover {
  border-color: #198754;
  box-shadow: 0 0 15px rgba(25, 135, 84, 0.5);
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #CAAB71;
  color: #1A202C;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

.page-index__post-date span:first-child {
  display: block;
  font-size: 1.1rem;
}

/* === Module 6: Latest Blog Slider === */
.page-index__blog-slider {
  position: relative;
  overflow: hidden;
  padding: 0 10px;
  box-sizing: border-box;
}

.page-index__blog-slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.4s ease;
}

.page-index__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* (3 cards + 2 gaps) / 3 */
  max-width: calc(33.333% - 14px);
  min-width: 0;
  box-sizing: border-box;
}

.page-index__blog-slide-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background-color: #111111; /* Card BG from custom palette */
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-index__blog-slide-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-index__blog-slide-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px 8px 0 0;
  object-fit: cover;
}

.page-index__blog-slide-link h5 {
  color: #CAAB71;
  margin: 10px 15px 6px;
  font-size: 1rem;
  line-height: 1.4;
}

.page-index__blog-slide-link p {
  color: #9DA0A8;
  margin: 0 15px 15px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFF6D6;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.page-index__blog-slider-prev {
  left: 0;
}

.page-index__blog-slider-next {
  right: 0;
}

.page-index__blog-slider-prev::before {
  content: '‹';
}

.page-index__blog-slider-next::before {
  content: '›';
}

/* === Mobile Responsive Styles (max-width: 768px) === */
@media (max-width: 768px) {
  .page-index__hero-section {
    padding-top: 10px !important;
  }

  .page-index__title-section {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 0 15px;
  }

  .page-index__page-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    gap: 10px;
  }

  .page-index__page-title::before,
  .page-index__page-title::after {
    width: 30px;
  }

  .page-index__seo-links {
    font-size: 13px;
    padding: 5px 0;
  }

  .page-index__home-content {
    height: 500px; /* Adjust height for mobile */
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0 8px;
  }

  .page-index__home-content h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .page-index__home-content h3 {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .page-index__home-content p,
  .page-index__home-content ul li {
    font-size: 14px;
  }

  .page-index__row-games,
  .page-index__row-sport,
  .page-index__row-coop {
    padding: 25px 15px;
    margin-top: 25px;
  }

  .page-index__games-title,
  .page-index__sport-title,
  .page-index__coop-title {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    margin-bottom: 20px;
  }

  /* Module 3: Game Slider Mobile */
  .page-index__slider-wrapper {
    padding: 0 5px;
  }

  .page-index__slider-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* Space for scrollbar */
  }

  .page-index__game-slide {
    scroll-snap-align: start;
    flex: 0 0 160px; /* Smaller card width for mobile */
    max-width: 160px;
  }

  .page-index__slider-prev,
  .page-index__slider-next {
    display: none; /* Hide navigation buttons on small screens if using native scroll */
  }

  /* Module 4: Partner Banners Mobile */
  .page-index__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns for mobile */
    max-width: 100%;
    padding: 15px 5px;
  }

  .page-index__banner-item img {
    
    
  }

  /* Module 5: Blog Card Grid Mobile */
  .page-index__blog-masonry {
    grid-template-columns: 1fr; /* Single column for mobile */
    padding: 0 5px;
  }

  .page-index__blog-card-body h5 {
    font-size: 1rem;
  }

  .page-index__blog-card-body p {
    font-size: 0.8rem;
  }

  .page-index__btn-outline {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  /* Module 6: Latest Blog Slider Mobile */
  .page-index__blog-slider {
    padding: 0 5px;
  }

  .page-index__blog-slider-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* Space for scrollbar */
  }

  .page-index__blog-slide {
    flex: 0 0 100%; /* Full width for each slide on mobile */
    max-width: 100%;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Hide navigation buttons on small screens if using native scroll */
  }

  /* General Image and Container Adaptations for Mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__hero-section,
  .page-index__title-section,
  .page-index__home-content,
  .page-index__row-games,
  .page-index__row-sport,
  .page-index__row-coop,
  .page-index__slider-wrapper,
  .page-index__banners-top-wrapper,
  .page-index__blog-masonry,
  .page-index__blog-slider {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Button Responsive Adaptations for Mobile */
  .page-index__btn-outline {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center;
  }

  .page-index__blog-card-body {
    align-items: center; /* Center button if it's full width */
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .page-index__blog-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columns for tablet */
  }
  .page-index__blog-slide {
    flex: 0 0 calc(50% - 10px); /* 2 cards + 1 gap */
    max-width: calc(50% - 10px);
  }
  .page-index__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}