.page-index {
  font-family: Arial, sans-serif;
  color: #1F2D3D;
  background-color: #F4F7FB;
}

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

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

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

.page-index__access-links-section {
  background-color: #F4F7FB;
  padding: 30px 0;
}

.page-index__access-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.page-index__btn-access-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-access-link:hover {
  box-shadow: 0 6px 15px rgba(165, 196, 255, 0.6);
  transform: translateY(-2px);
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

.page-index__brand-intro-section {
  padding: 40px 0;
  text-align: center;
  background-color: #F4F7FB;
}

.page-index__main-title {
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  color: #1F2D3D;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__intro-text {
  font-size: 17px;
  line-height: 1.7;
  color: #333333;
  max-width: 900px;
  margin: 0 auto;
  text-align: justify;
}

.page-index__intro-link {
  color: #2F6BFF;
  text-decoration: none;
  font-weight: bold;
}

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

.page-index__section-title {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

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

.page-index__category-lobby-section {
  padding: 50px 0;
  background-color: #F4F7FB;
}

.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;
}

.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;
}

.page-index__category-card-link:hover img {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

.page-index__blog-slider-section {
  padding: 50px 0;
  background-color: #F4F7FB;
}

.page-index__blog-slider-wrapper {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
}

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

.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}

.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: #D6E2FF;
  border-radius: 4px;
}

.page-index__blog-slider-track::-webkit-scrollbar-track {
  background-color: #F4F7FB;
}

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 cards + 2 gaps */
  scroll-snap-align: start;
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #1F2D3D;
  text-decoration: none;
}

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

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

.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;
  border-radius: 10px 10px 0 0;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #2F6BFF;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: bold;
  z-index: 10;
}

.page-index__post-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin: 15px 15px 10px;
  color: #1F2D3D;
}

.page-index__post-divider {
  width: 30px;
  height: 2px;
  background-color: #D6E2FF;
  margin: 0 15px 10px;
}

.page-index__post-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #333333;
  margin: 0 15px 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(47, 107, 255, 0.8);
  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;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: #2F6BFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

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

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

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

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

.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  box-shadow: 0 6px 15px rgba(165, 196, 255, 0.6);
  transform: translateY(-2px);
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

/* --- Responsive Styles --- */

@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) {
  .page-index__container {
    padding: 0 15px;
  }

  /* Generic image and button responsiveness for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__hero-section,
  .page-index__access-links-section,
  .page-index__brand-intro-section,
  .page-index__category-lobby-section,
  .page-index__blog-slider-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__btn-access-link,
  .page-index__btn-primary {
    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;
  }

  /* Access Links */
  .page-index__access-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Brand Intro */
  .page-index__main-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

  .page-index__intro-text {
    font-size: 15px;
  }

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

  .page-index__category-card-link img {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: contain;
  }

  /* Blog Slider */
  .page-index__blog-slider-track {
    padding: 0 15px;
    gap: 10px;
  }

  .page-index__blog-slider-wrapper {
    padding: 0 15px;
  }

  .page-index__post-item {
    flex: 0 0 90%; /* Show one card + some peek of next */
    scroll-snap-align: center;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 20px;
    top: calc(50% - 20px); /* Adjust to center vertically with smaller buttons */
  }

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

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

  .page-index__post-title {
    font-size: 16px;
    margin: 10px 10px 8px;
  }

  .page-index__post-excerpt {
    font-size: 14px;
    margin: 0 10px 10px;
  }
}

@media (max-width: 549px) {
  .page-index__category-lobby__grid {
    grid-template-columns: 1fr 1fr;
  }
}