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

/* Section Titles */
.page-index__section-title {
  font-size: 32px;
  font-weight: 700;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-top: 20px;
}
.page-index__section-title::before,
.page-index__section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 50px;
  height: 2px;
  background: #D6E2FF; /* Border color */
  transform: translateY(-50%);
}
.page-index__section-title::before {
  left: calc(50% - 100px);
}
.page-index__section-title::after {
  right: calc(50% - 100px);
}

/* Module 1: Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Small top margin, as body has --header-offset */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  margin-bottom: 20px;
}
.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

/* Module 2: Access Links */
.page-index__access-links {
  max-width: 1250px;
  margin: 0 auto;
  padding: 30px 12px;
  box-sizing: border-box;
}
.page-index__access-links-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.page-index__btn-access-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 25px;
  border-radius: 8px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  white-space: normal;
  word-wrap: break-word;
}
.page-index__btn-access-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 15px #A5C4FF; /* Glow */
}

/* Module 3: Brand Intro */
.page-index__brand-intro {
  max-width: 1000px; /* Slightly narrower for readability */
  margin: 0 auto;
  padding: 20px 12px 40px;
  box-sizing: border-box;
  text-align: center;
}
.page-index__main-title {
  font-weight: 800;
  line-height: 1.2;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 20px;
  font-size: clamp(28px, 4vw, 42px); /* H1 font size rule */
}
.page-index__intro-text {
  font-size: 16px;
  line-height: 1.8;
  color: #1F2D3D; /* Text Main */
  text-align: justify;
}
.page-index__intro-text a {
  color: #2F6BFF; /* Primary color for links */
  text-decoration: none;
  font-weight: 600;
}
.page-index__intro-text a:hover {
  text-decoration: underline;
}

/* Module 4: Game Lobby Entry */
.page-index__category-lobby {
  padding: 40px 0;
  background: #F4F7FB; /* Background color */
  margin-bottom: 40px;
}
.page-index__category-lobby__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 12px;
}
.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;
  transition: transform 0.3s ease;
}
.page-index__category-card:hover {
  transform: translateY(-5px);
}
.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;
}

/* Module 5: Blog Slider */
.page-index__blog-slider {
  padding: 40px 0 60px;
  background: #FFFFFF; /* Card BG */
}
.page-index__blog-slider-wrapper {
  position: relative;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 12px;
}
.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 */
  padding-bottom: 10px; /* To prevent scrollbar from overlapping content */
}
.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}
.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: #D6E2FF; /* Border color */
  border-radius: 4px;
}
.page-index__blog-slider-track::-webkit-scrollbar-track {
  background-color: #F4F7FB; /* Background color */
}
.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 cards visible with 16px gap */
  scroll-snap-align: start;
  background: #FFFFFF; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.page-index__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.page-index__image-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}
.page-index__image-cover 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: rgba(47, 107, 255, 0.8); /* Primary color with transparency */
  color: #FFFFFF;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}
.page-index__post-item h5.page-index__post-title {
  font-size: 18px;
  font-weight: 700;
  color: #1F2D3D; /* Text Main */
  margin: 15px 15px 10px;
  line-height: 1.4;
  flex-grow: 1; /* Allow title to take available space */
}
.page-index__post-item h5.page-index__post-title a {
  color: inherit;
  text-decoration: none;
}
.page-index__post-item h5.page-index__post-title a:hover {
  text-decoration: underline;
}
.page-index__post-excerpt {
  font-size: 14px;
  color: #1F2D3D; /* Text Main */
  margin: 0 15px 15px;
  line-height: 1.6;
}
.page-index__post-excerpt a {
  color: #2F6BFF; /* Primary color for links */
  text-decoration: none;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(47, 107, 255, 0.7); /* Primary color with transparency */
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: background-color 0.3s ease;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #2F6BFF; /* Primary color */
}
.page-index__blog-slider-prev {
  left: -20px;
}
.page-index__blog-slider-next {
  right: -20px;
}

/* Long-form Content Section */
.page-index__about-us-section {
  padding: 60px 0;
}
.page-index__section-heading {
  font-size: 36px;
  font-weight: 700;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 30px;
}
.page-index__sub-heading {
  font-size: 28px;
  font-weight: 600;
  color: #2F6BFF; /* Primary color */
  margin-top: 40px;
  margin-bottom: 20px;
}
.page-index__text-block p {
  font-size: 16px;
  line-height: 1.8;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 15px;
  text-align: justify;
}
.page-index__text-block p a {
  color: #2F6BFF; /* Primary color for links */
  text-decoration: none;
  font-weight: 600;
}
.page-index__text-block p a:hover {
  text-decoration: underline;
}
.page-index__feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.page-index__feature-list li {
  font-size: 16px;
  line-height: 1.8;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
}
.page-index__feature-list li::before {
  content: '✅';
  position: absolute;
  left: 0;
  color: #2F6BFF; /* Primary color */
}
.page-index__feature-list li strong {
  color: #2F6BFF; /* Primary color */
}


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

/* Mobile @media (max-width: 768px) */
@media (max-width: 768px) {
  /* General mobile adjustments */
  .page-index__container,
  .page-index__access-links,
  .page-index__brand-intro,
  .page-index__category-lobby__grid,
  .page-index__blog-slider-wrapper,
  .page-index__about-us-section .page-index__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Section Titles */
  .page-index__section-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .page-index__section-title::before,
  .page-index__section-title::after {
    width: 30px;
    left: calc(50% - 70px);
  }
  .page-index__section-title::after {
    right: calc(50% - 70px);
  }

  /* Hero Section */
  .page-index__hero-section {
    padding-top: 10px !important; /* Ensure small top margin */
    margin-bottom: 15px;
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Access Links */
  .page-index__access-links-container {
    grid-template-columns: 1fr; /* Single column */
    gap: 10px;
  }
  .page-index__btn-access-link {
    font-size: 16px;
    padding: 15px 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Brand Intro */
  .page-index__brand-intro {
    padding-bottom: 30px;
  }
  .page-index__main-title {
    font-size: clamp(24px, 7vw, 36px);
  }
  .page-index__intro-text {
    font-size: 15px;
  }

  /* Game Lobby Entry */
  .page-index__category-lobby {
    padding: 30px 0;
    margin-bottom: 30px;
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 10px;
  }
  .page-index__category-card-link img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Blog Slider */
  .page-index__blog-slider {
    padding: 30px 0 40px;
  }
  .page-index__blog-slider-track {
    padding-bottom: 8px;
  }
  .page-index__post-item {
    flex: 0 0 85%; /* Single card visible */
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 20px;
    left: -10px;
    right: -10px;
  }
  .page-index__blog-slider-prev {
    left: -10px;
  }
  .page-index__blog-slider-next {
    right: -10px;
  }
  .page-index__post-item h5.page-index__post-title {
    font-size: 16px;
    margin: 10px 10px 8px;
  }
  .page-index__post-excerpt {
    font-size: 13px;
    margin: 0 10px 10px;
  }
  .page-index__post-date {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* Long-form Content Section */
  .page-index__about-us-section {
    padding: 40px 0;
  }
  .page-index__section-heading {
    font-size: 28px;
  }
  .page-index__sub-heading {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
  }
  .page-index__text-block p,
  .page-index__feature-list li {
    font-size: 15px;
  }
}

/* Ensure images and buttons are always responsive */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}
.page-index__section,
.page-index__card,
.page-index__container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure button text wraps */
.page-index a[class*="btn"] {
  white-space: normal;
  word-wrap: break-word;
}