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

/* Section Titles */
.page-index__section-title {
  font-size: 2.2em;
  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: 80px;
  height: 4px;
  background: linear-gradient(90deg, #11A84E 0%, #22C768 100%);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Module 1: Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, body has --header-offset */
  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;
  object-fit: cover;
}

/* Module 2: Access Links */
.page-index__access-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1250px;
  margin: 0 auto;
  padding: 30px 12px;
  box-sizing: border-box;
}
.page-index__btn-access-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 25px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
  color: #F2FFF6; /* Text Main */
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  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 15px rgba(0, 0, 0, 0.4), 0 0 15px #57E38D; /* Glow */
}

/* Module 3: Brand Intro */
.page-index__brand-intro {
  max-width: 1250px;
  margin: 40px auto;
  padding: 20px 12px;
  box-sizing: border-box;
  text-align: center;
}
.page-index__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(87, 227, 141, 0.5); /* Subtle glow */
  /* No fixed font-size, rely on responsive scaling */
}
.page-index__intro-text {
  font-size: 1.1em;
  color: #A7D9B8; /* Text Secondary */
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  text-align: justify;
}
.page-index__intro-link {
  color: #F2C14E; /* Gold */
  text-decoration: none;
  font-weight: bold;
}
.page-index__intro-link:hover {
  text-decoration: underline;
}

/* Module 4: Category Lobby */
.page-index__category-lobby {
  max-width: 1250px;
  margin: 60px auto;
  padding: 0 12px;
  box-sizing: border-box;
}
.page-index__category-lobby__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.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;
  transition: transform 0.3s ease;
}
.page-index__category-card-link:hover img {
  transform: scale(1.03);
}

/* Module 5: Blog Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 60px auto;
  padding: 0 12px;
  box-sizing: border-box;
}
.page-index__blog-slider-wrapper {
  position: relative;
  margin-top: 40px;
}
.page-index__blog-slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* For Firefox */
}
.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, Opera */
}
.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 items per view with gap */
  scroll-snap-align: start;
  background: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E; /* Border */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 10px #57E38D; /* Glow */
}
.page-index__post-link {
  text-decoration: none;
  display: block;
  color: #F2FFF6; /* Text Main */
}
.page-index__post-image-wrapper {
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  overflow: hidden;
}
.page-index__post-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-index__post-content {
  padding: 15px;
  position: relative;
}
.page-index__post-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #F2FFF6; /* Text Main */
}
.page-index__post-date {
  display: block;
  font-size: 0.85em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 10px;
  border-bottom: 1px solid #1E3A2A; /* Divider */
  padding-bottom: 10px;
}
.page-index__post-excerpt {
  font-size: 0.95em;
  color: #A7D9B8; /* Text Secondary */
  line-height: 1.6;
  margin-bottom: 0;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(17, 168, 78, 0.8); /* Primary color with transparency */
  color: #F2FFF6; /* Text Main */
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background-color 0.3s ease;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: #22C768; /* Auxiliary color */
}
.page-index__blog-slider-prev { left: -20px; }
.page-index__blog-slider-next { right: -20px; }

/* Responsive Styles for 1024px */
@media (max-width: 1024px) {
  .page-index__section-title {
    font-size: 2em;
  }
  .page-index__access-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 25px 10px;
  }
  .page-index__btn-access-link {
    font-size: 1em;
    padding: 12px 20px;
  }
  .page-index__brand-intro {
    margin: 30px auto;
    padding: 15px 10px;
  }
  .page-index__main-title {
    font-size: 2.5em;
  }
  .page-index__intro-text {
    font-size: 1em;
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .page-index__blog-slider-prev { left: 0; }
  .page-index__blog-slider-next { right: 0; }
}

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

/* Responsive Styles for 768px (Mobile) */
@media (max-width: 768px) {
  /* All images */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  /* All image containers */
  .page-index__hero-section,
  .page-index__category-card,
  .page-index__post-image-wrapper,
  .page-index__blog-slider-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* All buttons */
  .page-index__btn-access-link,
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    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 */
  .page-index__access-links {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    grid-template-columns: 1fr; /* Single column */
    gap: 10px;
  }

  /* Section Titles */
  .page-index__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__section-title::after {
    width: 60px;
  }

  /* Module 1: Hero Section */
  .page-index__hero-section {
    padding-top: 10px; /* Consistent with desktop, body handles main offset */
    padding-left: 0;
    padding-right: 0;
  }

  /* Module 3: Brand Intro */
  .page-index__brand-intro {
    margin: 30px auto;
    padding: 15px 15px;
  }
  .page-index__main-title {
    font-size: 2em;
  }
  .page-index__intro-text {
    font-size: 0.95em;
  }

  /* Module 4: Category Lobby */
  .page-index__category-lobby {
    margin: 40px auto;
    padding: 0 15px;
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 10px;
    margin-top: 30px;
  }

  /* Module 5: Blog Slider */
  .page-index__blog-slider {
    margin: 40px auto;
    padding: 0 15px;
  }
  .page-index__blog-slider-track {
    gap: 10px;
  }
  .page-index__post-item {
    flex: 0 0 85%; /* 1 item visible, 85% width */
  }
  .page-index__post-title {
    font-size: 1.1em;
  }
  .page-index__post-date {
    font-size: 0.8em;
  }
  .page-index__post-excerpt {
    font-size: 0.9em;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 1.3em;
    top: calc(50% + 20px); /* Adjust position for better visibility on mobile */
  }
  .page-index__blog-slider-prev { left: 5px; }
  .page-index__blog-slider-next { right: 5px; }
}

@media (max-width: 549px) {
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr); /* Still 2 columns for very small screens */
  }
  .page-index__main-title {
    font-size: 1.8em;
  }
  .page-index__post-item {
    flex: 0 0 95%; /* Make it almost full width for smaller phones */
  }
}