.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--background-color, #FFFFFF);
}

.page-index__container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}

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

.page-index__hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover; /* Default to cover for desktop */
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

/* Module 2: Three Access Buttons */
.page-index__access-links-section {
  padding: 30px 0;
}

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

.page-index__btn-access-link {
  display: block;
  padding: 15px 20px;
  background: #26A9E0; /* Primary brand color */
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-access-link:hover {
  background: #1e87c0;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Module 3: Brand Intro */
.page-index__brand-intro-section {
  padding: 20px 0 40px;
}

.page-index__brand-intro {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 12px;
  text-align: center;
  box-sizing: border-box;
}

.page-index__main-title {
  font-size: clamp(28px, 4vw, 42px); /* Using clamp for h1 font size */
  color: #26A9E0;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-index__description {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 0;
  text-align: justify;
}

.page-index__description a {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
}

.page-index__description a:hover {
  text-decoration: underline;
}

.page-index__highlight {
  color: #26A9E0;
  font-weight: bold;
}

/* Module 4: Game Lobby */
.page-index__category-lobby-section {
  padding: 40px 0;
}

.page-index__section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  color: #26A9E0;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 10px;
}

.page-index__section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #26A9E0;
  margin: 10px auto 0;
}

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

.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;
  text-decoration: none;
}

.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.2s ease;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

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

/* Module 5: Blog Card Slider */
.page-index__blog-slider-section {
  padding: 40px 0 60px;
}

.page-index__blog-slider-wrapper {
  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; /* For smoother scrolling on iOS */
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
}

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

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 items per row on desktop, considering gap */
  scroll-snap-align: start;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 280px; /* Minimum width for blog card to maintain content visibility */
}

.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.page-index__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.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;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(38, 169, 224, 0.8); /* Primary brand color with transparency */
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
}

.page-index__post-title {
  font-size: 18px;
  font-weight: bold;
  color: #26A9E0;
  margin: 15px 15px 10px;
  line-height: 1.4;
}

.page-index__post-excerpt {
  font-size: 14px;
  color: #555555;
  margin: 0 15px 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-index__blog-slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(38, 169, 224, 0.8); /* Primary brand color with transparency */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-nav-btn:hover {
  background: #26A9E0;
}

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

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

.page-index__arrow-icon {
  font-size: 20px;
  line-height: 1;
}

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

@media (max-width: 768px) {
  /* Generic mobile image adaptation */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: unset !important;
    min-height: unset !important;
  }
  
  /* Generic section/container padding */
  .page-index__access-links-section,
  .page-index__brand-intro-section,
  .page-index__category-lobby-section,
  .page-index__blog-slider-section {
    padding: 20px 0;
  }

  .page-index__container,
  .page-index__access-links,
  .page-index__brand-intro {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Module 2: Three Access Buttons */
  .page-index__access-links {
    grid-template-columns: 1fr; /* Stack buttons vertically */
    gap: 10px;
  }

  .page-index__btn-access-link {
    padding: 12px 15px;
    font-size: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Module 3: Brand Intro */
  .page-index__main-title {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 15px;
  }

  .page-index__description {
    font-size: 15px;
    text-align: left;
  }

  /* Module 4: Game Lobby */
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr); /* 2 items per row */
    gap: 10px;
  }

  /* Module 5: Blog Card Slider */
  .page-index__blog-slider-track {
    scroll-padding-left: 15px; /* Adjust scroll snap for padding */
  }
  .page-index__post-item {
    flex: 0 0 calc(85% - 8px); /* Approximately 1 card visible, with some peek of next */
    min-width: unset;
  }
  .page-index__blog-slider-nav-btn {
    width: 35px;
    height: 35px;
    left: -10px;
    right: -10px;
  }
  .page-index__arrow-icon {
    font-size: 18px;
  }
}

@media (max-width: 549px) {
  .page-index__category-lobby__grid {
    grid-template-columns: 1fr 1fr; /* Sticking to 2-col as per U888 style guide for 549px */
  }
  .page-index__post-item {
    flex: 0 0 95%; /* Make it almost full width for single card focus */
  }
}