.page-index {
  background-color: var(--background-color, #08160F); /* Fallback to default if not set by shared */
  color: var(--text-main-color, #F2FFF6); /* Fallback to default if not set by shared */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Assuming shared.css handles body padding-top for 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;
}

/* Access Links Section */
.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 {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: block;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-access-link:hover {
  box-shadow: 0 6px 15px rgba(87, 227, 141, 0.4); /* Glow color */
  transform: translateY(-2px);
}

/* Brand Intro Section */
.page-index__brand-intro {
  max-width: 1250px;
  margin: 0 auto;
  padding: 20px 12px;
  box-sizing: border-box;
  text-align: center;
}

.page-index__main-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 font size with clamp */
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

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

.page-index__description a {
  color: #2AD16F; /* Button start color for links */
  text-decoration: underline;
}

.page-index__keyword-highlight {
  color: #F2C14E; /* Gold */
  font-weight: bold;
}

/* Category Lobby Section */
.page-index__category-lobby {
  max-width: 1250px;
  margin: 0 auto;
  padding: 40px 12px;
  box-sizing: border-box;
}

.page-index__section-title {
  font-size: clamp(24px, 3.5vw, 38px);
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  font-weight: 600;
}

.page-index__section-title::before,
.page-index__section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 80px;
  height: 2px;
  background-color: #1E3A2A; /* Divider */
  transform: translateY(-50%);
}

.page-index__section-title::before {
  left: 0;
  right: auto;
  margin-left: -100px; /* Adjust as needed for spacing */
}

.page-index__section-title::after {
  right: 0;
  left: auto;
  margin-right: -100px; /* Adjust as needed for spacing */
}

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

.page-index__category-card {
  display: block;
  border: none;
  box-shadow: none;
  outline: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 250px; /* Limit max width for desktop cards */
}

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

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

/* Blog Slider Section */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 0 auto;
  padding: 40px 12px;
  box-sizing: border-box;
  position: relative;
}

.page-index__section-subtitle {
  font-size: clamp(22px, 3vw, 32px);
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

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

.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 */
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  padding-bottom: 15px; /* Space for potential scrollbar */
}

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

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 cards on desktop with 16px gap */
  scroll-snap-align: start;
  background: #11271B; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
}

.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-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0; /* No border radius on images inside card */
  border: none;
  box-shadow: none;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(17, 168, 78, 0.8); /* Main color with opacity */
  color: #F2FFF6; /* Text Main */
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
}

.page-index__post-title {
  font-size: 18px;
  color: #F2FFF6; /* Text Main */
  margin: 15px 15px 10px 15px;
  line-height: 1.4;
  font-weight: 600;
}

.page-index__post-excerpt {
  font-size: 14px;
  color: #A7D9B8; /* Text Secondary */
  margin: 0 15px 15px 15px;
  padding-bottom: 10px;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17, 168, 78, 0.8); /* Main color with opacity */
  color: #F2FFF6; /* Text Main */
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #11A84E; /* Main color */
  transform: translateY(-50%) scale(1.1);
}

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

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

/* General image responsive */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    padding: 8px 12px;
    font-size: 20px;
  }
}

@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 {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Hero Section */
  .page-index__hero-section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Access Links Section */
  .page-index__access-links {
    grid-template-columns: 1fr;
    padding: 20px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 10px;
  }
  .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: 12px 15px;
    font-size: 15px;
  }

  /* Brand Intro Section */
  .page-index__brand-intro {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__main-title {
    font-size: 28px;
  }
  .page-index__description {
    font-size: 15px;
    text-align: left;
  }

  /* Category Lobby Section */
  .page-index__category-lobby {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__section-title {
    font-size: 24px;
  }
  .page-index__section-title::before,
  .page-index__section-title::after {
    width: 40px;
    margin-left: -60px;
    margin-right: -60px;
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .page-index__category-card-link img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Blog Slider Section */
  .page-index__blog-slider {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__section-subtitle {
    font-size: 22px;
  }
  .page-index__blog-slider-track {
    padding-bottom: 10px;
  }
  .page-index__post-item {
    flex: 0 0 85%; /* Single card visible on mobile */
  }
  .page-index__post-title {
    font-size: 16px;
  }
  .page-index__post-excerpt {
    font-size: 13px;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    top: calc(50% + 15px); /* Adjust for slider height on mobile */
    padding: 6px 10px;
    font-size: 20px;
  }

  /* General image and button overrides for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}