/* Base Styles & Typography */
.page-index {
  font-family: Arial, sans-serif;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
  line-height: 1.6;
}

.page-index__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #F3C54D; /* Gold */
  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, transparent, #F3C54D, transparent);
  margin: 10px auto 0;
  border-radius: 2px;
}

.page-index__main-title {
  font-size: clamp(2em, 4vw, 3em); /* H1字号使用clamp，避免过大 */
  font-weight: 800;
  color: #F3C54D; /* Gold */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__intro-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #FFF1E8; /* Text Main */
}

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

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

/* Module 1: Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, body handled by shared */
  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;
}

/* 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: block;
  padding: 15px 25px;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button */
  color: #FFF1E8; /* Text Main */
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
  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(255, 176, 74, 0.4);
  border-color: #F3C54D; /* Gold */
}

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

/* Module 4: Category Lobby */
.page-index__category-lobby {
  max-width: 1250px;
  margin: 40px 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: 30px;
}

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

/* 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: 30px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}

.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background: #6A1E1E; /* Border */
  border-radius: 4px;
}

.page-index__blog-slider-track::-webkit-scrollbar-track {
  background: #2A1212; /* Card BG */
  border-radius: 4px;
}

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 cards + 2 gaps */
  scroll-snap-align: start;
  background: #2A1212; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid #6A1E1E; /* Border */
  display: flex;
  flex-direction: column;
}

.page-index__post-image-wrapper {
  position: relative;
  width: 100%;
  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;
  max-width: 100%;
  height: auto;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(198, 31, 31, 0.9); /* Primary color with opacity */
  color: #FFF1E8;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
}

.page-index__post-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__post-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__post-title a {
  color: #F3C54D; /* Gold */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__post-title a:hover {
  color: #FFB04A;
}

.page-index__post-excerpt {
  font-size: 0.95em;
  color: #FFF1E8;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__read-more {
  display: inline-block;
  color: #FFB04A;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__read-more:hover {
  color: #F3C54D;
  text-decoration: underline;
}

.page-index__blog-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(198, 31, 31, 0.8); /* Primary color with opacity */
  color: #FFF1E8;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-nav:hover {
  background: #C61F1F;
}

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

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

/* Responsive Styles */

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

/* Mobile/Tablet for all sections (max-width: 768px) */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index__section-title {
    font-size: 2em;
  }

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

  .page-index__intro-description {
    font-size: 1em;
    padding: 0 15px;
  }

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

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

  /* Category Lobby Mobile */
  .page-index__category-lobby {
    margin: 30px auto;
    padding: 0 15px;
  }

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

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

  /* Blog Slider Mobile */
  .page-index__blog-slider {
    margin: 40px auto;
    padding: 0 15px;
  }

  .page-index__blog-slider-track {
    padding-bottom: 0;
  }

  .page-index__post-item {
    flex: 0 0 85%; /* Show roughly 1 full card and part of the next */
  }

  .page-index__blog-slider-nav {
    width: 30px;
    height: 30px;
    font-size: 1.2em;
  }

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

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

  .page-index__post-title {
    font-size: 1.1em;
  }

  .page-index__post-excerpt {
    font-size: 0.9em;
  }

  /* General Image & Button Mobile Responsiveness */
  .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__post-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__hero-section {
    padding-left: 0;
    padding-right: 0;
  }

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

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