.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background-color: #F5F7FA; /* Background */
}

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

.page-index__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #E53935; /* Primary color for titles */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 10px;
}

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

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

.page-index__hero-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 42.1875%; /* 810 / 1920 = 0.421875 */
  overflow: hidden;
}

.page-index__hero-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Module 2: Access Links */
.page-index__access-links {
  padding: 30px 12px;
  background-color: #F5F7FA; /* Background */
}

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

.page-index__btn-access-link {
  display: block;
  padding: 15px 20px;
  text-align: center;
  font-size: 1.1em;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px 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 {
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* Module 3: Brand Intro */
.page-index__brand-intro {
  padding: 40px 12px;
  background-color: #FFFFFF; /* Card BG */
  margin-bottom: 30px;
}

.page-index__main-title {
  font-size: 2.8em;
  font-weight: 800;
  color: #E53935; /* Primary color */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__intro-text {
  font-size: 1.1em;
  line-height: 1.8;
  text-align: justify;
  color: #333333; /* Text Main */
  max-width: 900px;
  margin: 0 auto;
}

.page-index__intro-text a {
  color: #FF5A4F;
  text-decoration: none;
  font-weight: bold;
}

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

/* Module 4: Game Lobby Entrance */
.page-index__category-lobby {
  padding: 50px 12px;
  background-color: #F5F7FA; /* Background */
}

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

.page-index__category-card {
  display: block;
  border: none; /* No border */
  box-shadow: none; /* No shadow */
  outline: none;
  background: transparent; /* Transparent background */
  border-radius: 0; /* No border radius */
  padding: 0;
  margin: 0;
}

.page-index__category-card-link {
  display: block;
  text-decoration: none;
  border: none; /* No border */
  box-shadow: none; /* No shadow */
  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; /* No border */
  box-shadow: none; /* No shadow */
  border-radius: 0;
}

.page-index__category-card-link:hover img {
  filter: brightness(1.05); /* Slight brightness change on hover */
}

/* Module 5: Blog Card Slider */
.page-index__blog-slider {
  padding: 50px 12px;
  background-color: #FFFFFF; /* Card BG */
}

.page-index__blog-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.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: #FF5A4F;
  border-radius: 4px;
}

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

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* (100% - 2*gap) / 3 */
  scroll-snap-align: start;
  background-color: #FFFFFF;
  border: 1px solid #E0E0E0; /* Border */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.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: none;
  box-shadow: none;
  border-radius: 0;
}

.page-index__post-meta {
  padding: 10px 15px 0;
  font-size: 0.9em;
  color: #666;
}

.page-index__post-title {
  font-size: 1.2em;
  font-weight: 700;
  color: #E53935; /* Primary color */
  padding: 10px 15px;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__post-excerpt {
  font-size: 0.95em;
  color: #333333;
  padding: 0 15px 15px;
  margin: 0;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #E53935;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: #FF5A4F;
  transform: scale(1.05);
}

.page-index__blog-slider-prev svg,
.page-index__blog-slider-next svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Responsive Styles */

/* General mobile image and button styles */
@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__hero-section,
  .page-index__access-links,
  .page-index__brand-intro,
  .page-index__category-lobby,
  .page-index__blog-slider,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__btn-access-link {
    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;
  }
}

/* Module 1: Hero Banner Mobile */
@media (max-width: 849px) {
  .page-index__hero-image-wrapper {
    padding-top: unset; /* Reset aspect ratio */
    height: auto;
  }
  .page-index__hero-image-wrapper img {
    object-fit: contain !important; /* Ensure image is fully visible */
    position: static; /* Remove absolute positioning */
    height: auto !important;
    max-height: none !important;
  }
  .page-index__hero-section {
    padding-top: 10px; /* Keep small top padding */
  }
}

/* Module 2: Access Links Mobile */
@media (max-width: 768px) {
  .page-index__access-links .page-index__container {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Module 3: Brand Intro Mobile */
@media (max-width: 768px) {
  .page-index__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-index__intro-text {
    font-size: 1em;
    text-align: left;
  }
}

/* Module 4: Game Lobby Mobile */
@media (max-width: 768px) {
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .page-index__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
}

/* Module 5: Blog Card Slider Mobile */
@media (max-width: 768px) {
  .page-index__blog-slider-track {
    scroll-snap-align: start;
    padding-bottom: 15px;
  }
  .page-index__post-item {
    flex: 0 0 85%; /* Show approx 1 card at a time */
  }
  .page-index__blog-slider-controls {
    justify-content: space-between;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
  }
  .page-index__post-title {
    font-size: 1.1em;
  }
  .page-index__post-excerpt {
    font-size: 0.9em;
  }
}