/* General styles for the page */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

.page-index__section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: #22C768; /* Auxiliary color */
  margin: 10px auto 0;
  border-radius: 2px;
}

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

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

/* Module 1: Hero Banner */
.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-wrapper {
  width: 100%;
  overflow: hidden;
}

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

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

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

.page-index__btn-access-link {
  display: block;
  padding: 15px 20px;
  text-align: center;
  color: #F2FFF6; /* Text Main */
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  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(87, 227, 141, 0.4);
}

/* Module 3: Brand Main Title + Introduction */
.page-index__brand-intro-section {
  padding: 40px 12px;
  max-width: 1250px;
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
}

.page-index__main-title {
  color: #F2FFF6; /* Text Main */
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  /* clamp for responsive font size without fixed large values */
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.page-index__intro-text {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  max-width: 900px;
  margin: 0 auto;
  text-align: justify;
}

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

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

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

.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: translateY(-5px);
}

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

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

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

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

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 items per row, with gap */
  scroll-snap-align: start;
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(87, 227, 141, 0.5);
}

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

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

.page-index__post-image {
  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(17, 168, 78, 0.8); /* Main color with transparency */
  color: #F2FFF6; /* Text Main */
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: bold;
}

.page-index__post-content {
  padding: 15px;
}

.page-index__post-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__post-summary {
  font-size: 0.95rem;
  color: #A7D9B8; /* Text Secondary */
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-index__blog-slider-nav {
  background-color: rgba(17, 168, 78, 0.9); /* Main color with transparency */
  color: #F2FFF6; /* Text Main */
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  font-size: 1.5rem;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-nav:hover {
  background-color: #2AD16F; /* Lighter shade on hover */
}

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

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

/* Why Choose Us Section */
.page-index__why-choose-us-section {
  padding: 50px 12px;
  max-width: 1250px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.page-index__feature-card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.page-index__feature-card:hover {
  transform: translateY(-5px);
}

.page-index__feature-title {
  font-size: 1.4rem;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  font-weight: 700;
}

.page-index__feature-description {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
}

/* CTA Section */
.page-index__cta-section {
  padding: 60px 12px;
  text-align: center;
  background: linear-gradient(180deg, #0A4B2C 0%, #08160F 100%); /* Deep Green to Background */
}

.page-index__cta-title {
  font-size: clamp(28px, 5vw, 42px);
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.page-index__cta-description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 18px 35px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
  color: #F2FFF6; /* Text Main */
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(87, 227, 141, 0.6);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__access-links-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .page-index__category-lobby-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-index__post-item {
    flex: 0 0 calc(50% - 8px); /* 2 items per row */
  }
}

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

@media (max-width: 768px) {
  /* General mobile text and padding */
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-index__intro-text {
    font-size: 1rem;
    text-align: left;
  }

  /* All images responsive */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* All image containers responsive */
  .page-index__hero-image-wrapper,
  .page-index__post-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* All buttons responsive */
  .page-index__btn-access-link,
  .page-index__btn-primary,
  .page-index__cta-button {
    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;
  }

  /* Button containers responsive */
  .page-index__access-links-container,
  .page-index__cta-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* Module 1: Hero Banner */
  .page-index__hero-section {
    padding-top: 10px;
  }

  /* Module 2: Three Access Links */
  .page-index__access-links-container {
    grid-template-columns: 1fr;
    padding: 20px 15px;
  }

  /* Module 3: Brand Main Title + Introduction */
  .page-index__brand-intro-section {
    padding: 30px 15px;
  }

  .page-index__main-title {
    font-size: 2.2rem;
  }

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

  .page-index__category-lobby-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

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

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

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

  .page-index__post-item {
    flex: 0 0 85%; /* 1 item visible, larger for better mobile view */
  }

  /* Why Choose Us Section */
  .page-index__why-choose-us-section {
    padding: 40px 15px;
  }

  .page-index__features-grid {
    grid-template-columns: 1fr;
  }

  .page-index__feature-card {
    padding: 20px;
  }

  /* CTA Section */
  .page-index__cta-section {
    padding: 40px 15px;
  }

  .page-index__cta-title {
    font-size: 28px;
  }

  .page-index__btn-primary {
    font-size: 1rem;
    padding: 15px 25px;
  }
}

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