/* General Styles for page-index */
.page-index {
  font-family: 'Arial', sans-serif;
  color: #FFF6D6; /* Text Main */
  background-color: #0A0A0A; /* Background */
  line-height: 1.6;
}

.page-index__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #F2C14E; /* Primary color */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #FFD36B; /* Auxiliary color */
  border-radius: 2px;
}

.page-index__section-description,
.page-index__intro-text,
.page-index p {
  text-align: justify;
  max-width: 900px;
  margin: 0 auto 20px auto;
  color: #FFF6D6;
}

.page-index__text-link {
  color: #F2C14E;
  text-decoration: none;
}

.page-index__text-link:hover {
  text-decoration: underline;
}

/* Module 1: Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Assuming shared.css handles body padding-top for header offset */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

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

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

/* Module 2: Access Links */
.page-index__access-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__btn-access-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Dark text for contrast on bright button */
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 100%; /* Ensure responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-access-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.4);
  filter: brightness(1.1);
}

/* Module 3: Brand Intro */
.page-index__brand-intro {
  max-width: 1250px;
  margin: 40px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive h1 font size */
  font-weight: 800;
  color: #F2C14E;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index__intro-text {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* Module 4: Game Lobby */
.page-index__category-lobby {
  max-width: 1250px;
  margin: 60px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__category-lobby__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.page-index__category-card,
.page-index__category-card-link {
  display: block;
  border: none;
  box-shadow: none;
  outline: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.page-index__category-card-link img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border: none;
  box-shadow: none;
  border-radius: 0;
  transition: transform 0.3s ease;
}

.page-index__category-card-link:hover img {
  transform: scale(1.05);
}

/* Why Choose u888vip1 */
.page-index__features-section {
  max-width: 1250px;
  margin: 60px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

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

.page-index__feature-item {
  background-color: #111111; /* Card BG */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid #3A2A12; /* Border */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 211, 107, 0.4);
}

.page-index__feature-title {
  font-size: 1.5em;
  color: #F2C14E; /* Primary color */
  margin-bottom: 15px;
  text-align: center;
}

.page-index__feature-description {
  font-size: 0.95em;
  color: #FFF6D6;
  line-height: 1.7;
}

/* CTA Section */
.page-index__cta-section {
  max-width: 900px;
  margin: 80px auto;
  padding: 40px 15px;
  background-color: #111111; /* Card BG */
  border-radius: 15px;
  text-align: center;
  border: 1px solid #3A2A12; /* Border */
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

.page-index__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #FFF6D6;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Button gradient */
  color: #111111; /* Dark text for contrast */
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.2em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Ensure responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 211, 107, 0.6);
  filter: brightness(1.1);
}

/* Module 5: Blog Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 80px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__blog-slider-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 30px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  scrollbar-width: none; /* Firefox */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background-color: #F2C14E; /* Primary color */
  color: #111111;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-index__blog-slider-prev {
  left: -20px;
}

.page-index__blog-slider-next {
  right: -20px;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: #FFD36B; /* Glow color */
  transform: translateY(-50%) scale(1.1);
}

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 items with 16px gap */
  scroll-snap-align: start;
  background-color: #111111; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid #3A2A12; /* Border */
  display: flex;
  flex-direction: column;
  color: #FFF6D6;
  position: relative;
}

.page-index__post-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

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

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #FFF6D6;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  z-index: 5;
}

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

.page-index__post-title {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-index__post-title a:hover {
  color: #FFD36B;
  text-decoration: underline;
}

.page-index__post-excerpt {
  font-size: 0.9em;
  line-height: 1.5;
  color: #FFF6D6;
  flex-grow: 1;
}

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

.page-index__btn-view-all {
  display: inline-block;
  padding: 12px 30px;
  background: #F2C14E; /* Primary color */
  color: #111111;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  max-width: 100%; /* Ensure responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-view-all:hover {
  background-color: #FFD36B; /* Glow color */
}

/* Responsive Design */
/* General responsive for images and containers */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-index__section,
.page-index__container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* @media (max-width: 1024px) for tablet adjustments */
@media (max-width: 1024px) {
  .page-index__section-title {
    font-size: 2em;
  }
  .page-index__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }
  .page-index__features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-index__blog-slider-prev {
    left: 0px;
  }
  .page-index__blog-slider-next {
    right: 0px;
  }
  .page-index__post-item {
    flex: 0 0 calc(50% - 8px); /* 2 items with 16px gap */
  }
}

/* @media (max-width: 849px) for Banner specific */
@media (max-width: 849px) {
  .page-index__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    max-height: none !important;
  }
}

/* @media (max-width: 768px) for mobile adjustments */
@media (max-width: 768px) {
  .page-index {
    font-size: 15px;
  }
  .page-index__hero-section {
    padding-top: 10px; /* Consistent with desktop, relies on body padding for header offset */
  }
  .page-index__access-links {
    grid-template-columns: 1fr; /* Single column for buttons */
    gap: 10px;
    padding: 0 15px;
  }
  .page-index__btn-access-link,
  .page-index__btn-primary,
  .page-index__btn-view-all,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__brand-intro,
  .page-index__category-lobby,
  .page-index__features-section,
  .page-index__cta-section,
  .page-index__blog-slider,
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }
  .page-index__section-title {
    font-size: 1.8em;
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for game lobby */
    gap: 10px;
  }
  .page-index__category-card-link img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: none;
    box-shadow: none;
  }
  .page-index__features-grid {
    grid-template-columns: 1fr;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Hide arrows on small mobile */
  }
  .page-index__post-item {
    flex: 0 0 90%; /* Single item visible, with some padding */
  }
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* @media (max-width: 549px) for very small mobile */
@media (max-width: 549px) {
  .page-index__category-lobby__grid {
    grid-template-columns: 1fr; /* Single column for game lobby on very small screens */
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Ensure arrows are hidden */
  }
  .page-index__post-item {
    flex: 0 0 100%; /* Full width for blog cards */
  }
}