/* style/index.css */

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

.page-index__section {
  padding: 20px 0;
  margin-bottom: 20px;
}

.page-index__section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__section-title.tieudevip {
  text-align: center;
  font-size: 2.5em;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  margin-bottom: 40px;
  padding-bottom: 10px;
  position: relative;
  border-bottom: 2px solid #6A1E1E; /* Border */
  text-shadow: 0 0 10px rgba(243, 197, 77, 0.5);
}

.page-index__section-title.tieudevip::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #F3C54D, transparent);
}

/* --- Module 0: Hero Carousel Section --- */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Assuming body handles var(--header-offset) */
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.page-index__hero-slider {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

.page-index__hero-slide {
  display: none;
  width: 100%;
  transition: opacity 0.5s ease-in-out;
}

.page-index__hero-slide.is-active {
  display: block;
}

.page-index__hero-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.page-index__hero-slider-prev,
.page-index__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.5em;
  z-index: 10;
  border-radius: 5px;
}

.page-index__hero-slider-prev {
  left: 10px;
}

.page-index__hero-slider-next {
  right: 10px;
}

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

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

.page-index__hero-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.page-index__hero-slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.page-index__hero-slider-dots button.is-active {
  background: #FFF1E8; /* Text Main */
}

/* --- Module 1: Guide Section --- */
.page-index__guide-section {
  margin-bottom: 50px;
}

.page-index__guide-box {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #2A1212; /* Card BG */
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.page-index__guide-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.page-index__guide-card {
  display: block;
  flex: 0 0 calc(20% - 8px);
  max-width: calc(20% - 8px);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 5px;
  overflow: hidden;
}

.page-index__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(243, 197, 77, 0.3);
}

.page-index__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350;
  object-fit: contain;
  display: block;
  border-radius: 5px;
}

/* PC 错落：中间高、两边平行 */
.page-index__guide-card--pos-1,
.page-index__guide-card--pos-5 { padding-top: 50px; }
.page-index__guide-card--pos-2,
.page-index__guide-card--pos-4 { padding-top: 25px; }
.page-index__guide-card--pos-3 { padding-top: 0; }

/* --- Module 2: Home Content Section (Long Text) --- */
.page-index__home-content-section {
  margin-bottom: 50px;
}

.page-index__home-content-box {
  max-width: 91%;
  margin: 0 auto;
  padding: 20px 25px;
  border: 5px solid #6A1E1E; /* Border */
  border-radius: 15px;
  box-shadow: 0 0 20px #7E0D0D; /* Deep Red for shadow */
  height: 700px;
  text-align: left;
  box-sizing: border-box;
  background-color: #2A1212; /* Card BG */
}

.page-index__home-content-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px; /* Space for scrollbar */
  box-sizing: border-box;
}

.page-index__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background-color: #F3C54D; /* Gold */
  border-radius: 4px;
}

.page-index__home-content-title {
  font-size: 2.2em;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  margin-bottom: 25px;
  line-height: 1.3;
}

.page-index__home-content-subtitle {
  font-size: 1.8em;
  font-weight: bold;
  color: #E53030; /* Auxiliary */
  margin-top: 35px;
  margin-bottom: 15px;
}

.page-index__home-content-sub-subtitle {
  font-size: 1.4em;
  font-weight: bold;
  color: #C61F1F; /* Primary */
  margin-top: 25px;
  margin-bottom: 10px;
}

.page-index__home-content-inner p,
.page-index__home-content-inner ul,
.page-index__home-content-inner ol {
  margin-bottom: 15px;
  color: #FFF1E8; /* Text Main */
}

.page-index__home-content-inner ul,
.page-index__home-content-inner ol {
  padding-left: 25px;
}

.page-index__home-content-inner li {
  margin-bottom: 8px;
}

.page-index__home-content-inner a {
  color: #F3C54D; /* Gold for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__home-content-inner a:hover {
  color: #FFB04A; /* Lighter gold on hover */
  text-decoration: underline;
}

.page-index__wp-caption {
  margin: 25px auto;
  text-align: center;
  max-width: 100%;
}

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-index__wp-caption figcaption {
  font-style: italic;
  font-size: 0.9em;
  color: #AAA;
  margin-top: 10px;
}

.page-index__faq-question {
  font-size: 1.2em;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  margin-top: 20px;
  margin-bottom: 10px;
  cursor: pointer;
}

.page-index__faq-answer {
  color: #FFF1E8; /* Text Main */
  margin-bottom: 15px;
  padding-left: 20px;
}

/* --- Module 3: Blog Section --- */
.page-index__blog-section {
  margin-bottom: 50px;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Changed to 3 columns for better fit, demo was 4 */
  gap: 25px;
}

.page-index__blog-card {
  background-color: #2A1212; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(243, 197, 77, 0.4);
}

.page-index__blog-card-link {
  text-decoration: none;
  display: block;
  color: #FFF1E8; /* Text Main */
}

.page-index__blog-media {
  position: relative;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.page-index__blog-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.page-index__blog-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #C61F1F; /* Primary */
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.page-index__blog-date span:first-child {
  font-size: 1.2em;
}

.page-index__blog-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 15px 15px 10px;
  color: #F3C54D; /* Gold */
}

.page-index__blog-excerpt {
  font-size: 0.9em;
  color: #AAA;
  margin: 0 15px 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Module 4: App Download Section --- */
.page-index__app-download-section {
  margin-bottom: 50px;
}

.page-index__app-download-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background-color: #2A1212; /* Card BG */
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  gap: 30px;
}

.page-index__app-download-text {
  flex: 1;
  text-align: left;
}

.page-index__app-download-title {
  font-size: 2em;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  margin-bottom: 20px;
}

.page-index__app-download-description {
  font-size: 1.1em;
  color: #FFF1E8; /* Text Main */
  margin-bottom: 30px;
}

.page-index__btn-download {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 176, 74, 0.4);
}

.page-index__app-download-image {
  flex: 0 0 40%;
  max-width: 40%;
  text-align: center;
}

.page-index__app-download-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* --- General Image and Button Responsiveness --- */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-index a[class*="btn"],
.page-index a[class*="button"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-buttons,
.page-index__button-group,
.page-index__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-index__section-title.tieudevip {
    font-size: 2em;
    margin-bottom: 30px;
  }

  /* Module 0: Hero Carousel Section */
  .page-index__hero-carousel-section {
    padding-top: 10px !important; /* Retain small padding */
    margin-bottom: 20px;
  }

  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 1.2em;
  }

  /* Module 1: Guide Section */
  .page-index__guide-section {
    margin-bottom: 30px;
  }

  .page-index__guide-box {
    padding: 15px;
  }

  .page-index__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 2+3 layout */
    gap: 10px;
    margin-top: 20px;
  }

  .page-index__guide-card {
    flex: none;
    max-width: none;
    padding-top: 0 !important; /* Reset staggered padding */
  }

  .page-index__guide-card--pos-1,
  .page-index__guide-card--pos-2 {
    grid-column: span 3;
  }

  .page-index__guide-card--pos-3,
  .page-index__guide-card--pos-4,
  .page-index__guide-card--pos-5 {
    grid-column: span 2;
  }
  
  .page-index__guide-card img {
    aspect-ratio: 250 / 350;
    object-fit: contain;
  }

  /* Module 2: Home Content Section (Long Text) */
  .page-index__home-content-section {
    margin-bottom: 30px;
  }

  .page-index__home-content-box {
    max-width: 100%;
    height: auto; /* Allow full content display */
    padding: 15px;
  }

  .page-index__home-content-inner {
    height: auto;
    overflow-y: visible; /* Remove scrollbar */
    padding-right: 0;
  }

  .page-index__home-content-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  .page-index__home-content-subtitle {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 10px;
  }

  .page-index__home-content-sub-subtitle {
    font-size: 1.2em;
    margin-top: 20px;
  }

  /* Module 3: Blog Section */
  .page-index__blog-section {
    margin-bottom: 30px;
  }

  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    gap: 15px;
  }

  .page-index__blog-title {
    font-size: 1.1em;
    margin: 10px 10px 5px;
  }

  .page-index__blog-excerpt {
    margin: 0 10px 10px;
  }

  /* Module 4: App Download Section */
  .page-index__app-download-box {
    flex-direction: column;
    padding: 25px;
    text-align: center;
  }

  .page-index__app-download-text {
    text-align: center;
  }

  .page-index__app-download-image {
    flex: none;
    max-width: 80%;
    margin-top: 25px;
  }

  .page-index__app-download-title {
    font-size: 1.5em;
  }

  .page-index__app-download-description {
    font-size: 1em;
  }

  .page-index__btn-download {
    padding: 12px 25px;
    font-size: 1em;
  }

  /* General Mobile Image and Button Overrides */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__section-content,
  .page-index__card,
  .page-index__container,
  .page-index__app-download-box {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index a[class*="btn"],
  .page-index a[class*="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;
  }

  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-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;
  }

  .page-index__cta-buttons {
    display: flex;
    flex-direction: column; /* Ensure vertical stacking for multiple buttons */
  }
}