:root {
  --primary-color: #FF8C1A;
  --secondary-color: #FFA53A;
  --card-bg: #17191F;
  --background-color: #0D0E12;
  --text-main-color: #FFF3E6;
  --border-color: #A84F0C;
  --glow-color: #FFB04D;
  --deep-orange: #D96800;
  --button-gradient: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
}

.page-index {
  color: var(--text-main-color); /* Body background is dark, so light text */
  background-color: var(--background-color); /* Ensure consistency */
}

.page-index__hero-section {
  padding-top: 10px; /* Small top padding, assuming 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%;
  max-width: 100%;
  overflow: hidden;
}

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

.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 20px;
  background: var(--button-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  box-shadow: 0 4px 15px rgba(255, 165, 58, 0.4);
}

.page-index__btn-access-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 58, 0.6);
}

.page-index__brand-intro {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 12px;
  text-align: center;
  box-sizing: border-box;
}

.page-index__main-title {
  font-size: clamp(2.2em, 4vw, 2.8em); /* Use clamp for H1 */
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-index__intro-text {
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--text-main-color);
  text-align: justify;
}

.page-index__intro-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

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

.page-index__section-title {
  font-size: 2em;
  color: var(--primary-color);
  text-align: center;
  margin: 60px auto 40px;
  position: relative;
  padding-bottom: 10px;
  max-width: 1000px;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

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

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

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

.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;
  transition: transform 0.2s ease;
}

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

.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__blog-slider {
  max-width: 1250px;
  margin: 0 auto 60px;
  padding: 0 12px;
  box-sizing: border-box;
}

.page-index__blog-slider-container {
  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;
  padding-bottom: 20px; /* Space for scrollbar */
  flex-grow: 1;
}

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 items per row, accounting for gap */
  scroll-snap-align: start;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

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

.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;
  max-width: 100%; /* Ensure responsiveness */
}

.page-index__post-content {
  padding: 15px;
  color: var(--text-main-color);
}

.page-index__post-title {
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.4;
  color: var(--secondary-color);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-index__post-meta {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 10px;
}

.page-index__post-excerpt {
  font-size: 0.9em;
  line-height: 1.6;
  color: #ccc;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 20px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  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 {
  left: -20px;
}

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

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: var(--deep-orange);
}

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

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

/* Responsive Styles */
@media (max-width: 849px) {
  .page-index__hero-image {
    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;
  }

  .page-index__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
  }

  .page-index__access-links {
    grid-template-columns: 1fr;
    padding: 20px 15px;
  }

  .page-index__btn-access-link {
    padding: 12px 15px;
    font-size: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__brand-intro {
    margin: 30px auto;
    padding: 0 15px;
  }

  .page-index__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-index__intro-text {
    font-size: 1em;
  }

  .page-index__section-title {
    font-size: 1.6em;
    margin: 40px auto 30px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__category-lobby {
    padding: 0 15px 40px;
  }

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

  .page-index__blog-slider {
    padding: 0 15px;
    margin-bottom: 40px;
  }

  .page-index__blog-slider-track {
    scroll-padding-left: 15px;
  }

  .page-index__post-item {
    flex: 0 0 85%; /* Show one and a bit for swipe indication */
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 30px;
    height: 30px;
    font-size: 16px;
    left: -10px;
    right: -10px;
  }

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__hero-section,
  .page-index__access-links,
  .page-index__brand-intro,
  .page-index__category-lobby,
  .page-index__blog-slider {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

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