/* style/index.css */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF3E6; /* Text Main */
  background-color: #0D0E12; /* 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 {
  font-size: 2.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #FF8C1A;
}

.tieudevip {
  font-size: 2.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #3477c9; /* Primary blue from demo, for titles */
  padding: 10px 20px;
  border: 1px solid #1e73be;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Module 0: Hero Carousel */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Small top padding, relying on body padding for header offset */
  margin-bottom: 0;
  overflow: hidden;
}

.page-index__hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.page-index__hero-slide {
  display: none;
  width: 100%;
}

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

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

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

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

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

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

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

.page-index__hero-slider-dots button.is-active {
  background-color: #FF8C1A;
}

/* Module 1: Guide Section */
.page-index__guide-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-index__guide-box {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #17191F; /* Card BG */
  border-radius: 12px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid #A84F0C; /* Border */
}

.page-index__guide-box .tieudevip {
  margin-bottom: 40px;
  color: #FF8C1A; /* Use brand color for title in dark box */
  border-color: #A84F0C;
  background-color: rgba(255, 140, 26, 0.1);
}

.page-index__guide-grid {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping on desktop */
  align-items: flex-start;
  justify-content: center;
  gap: 15px;
}

.page-index__guide-card {
  display: block;
  flex: 0 0 18%; /* Adjusted to fit 5 cards with gap */
  max-width: 18%;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__guide-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 12px 25px rgba(255, 140, 26, 0.4);
}

.page-index__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical images */
  object-fit: contain;
  display: block;
}

/* 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 Long Text */
.page-index__home-content-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-index__home-content-row {
  display: flex;
  justify-content: center;
}

.page-index__home-content-box {
  max-width: 91%;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  border: 5px solid #3477c9; /* Blue border for the box */
  border-radius: 15px;
  box-shadow: 0 0 20px #3477c9;
  height: 700px; /* Fixed height for desktop */
  text-align: left;
  box-sizing: border-box;
  background-color: #17191F; /* Card BG */
  color: #FFF3E6; /* Text Main */
}

.page-index__home-content-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px; /* Space for scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #FF8C1A #17191F;
}

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

.page-index__home-content-inner::-webkit-scrollbar-track {
  background: #17191F;
  border-radius: 10px;
}

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background-color: #FF8C1A;
  border-radius: 10px;
  border: 2px solid #17191F;
}

.page-index__home-content-title {
  font-size: 2.5em;
  color: #FF8C1A;
  margin-bottom: 20px;
  text-align: center;
}

.page-index__home-content-box h2 {
  font-size: 1.8em;
  color: #FFA53A;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-index__home-content-box h3 {
  font-size: 1.4em;
  color: #FF8C1A;
  margin-top: 25px;
  margin-bottom: 10px;
}

.page-index__home-content-box p {
  margin-bottom: 1em;
}

.page-index__home-content-box ul,
.page-index__home-content-box ol {
  margin-bottom: 1em;
  padding-left: 20px;
}

.page-index__home-content-box li {
  margin-bottom: 0.5em;
}

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

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

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

/* Module 3: Latest Blog Posts */
.page-index__blog-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-index__blog-section .tieudevip {
  margin-bottom: 40px;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop, adjusted from 4 to fit content better */
  gap: 30px;
}

.page-index__blog-card {
  background-color: #17191F; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #A84F0C; /* Border */
}

.page-index__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(255, 140, 26, 0.4);
}

.page-index__blog-card-link {
  text-decoration: none;
  color: #FFF3E6;
  display: block;
}

.page-index__blog-media {
  position: relative;
  height: 200px; /* Fixed height for blog card images */
  overflow: hidden;
}

.page-index__blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: transform 0.3s ease;
}

.page-index__blog-card:hover .page-index__blog-media img {
  transform: scale(1.05);
}

.page-index__blog-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #FF8C1A;
  color: #FFF3E6;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9em;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

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

.page-index__blog-title {
  font-size: 1.3em;
  color: #FF8C1A;
  padding: 15px;
  margin-bottom: 5px;
}

.page-index__blog-excerpt {
  font-size: 0.9em;
  color: #FFF3E6;
  padding: 0 15px 15px;
  margin-bottom: 0;
  min-height: 40px; /* Ensure consistent height */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-index__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

/* Module 4: App Download Section */
.page-index__app-download-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

.page-index__app-download-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  background-color: #17191F; /* Card BG */
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid #A84F0C; /* Border */
}

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

.page-index__app-download-title {
  font-size: 2.2em;
  color: #FF8C1A;
  margin-bottom: 15px;
}

.page-index__app-download-description {
  font-size: 1.1em;
  color: #FFF3E6;
  margin-bottom: 30px;
}

.page-index__app-download-buttons {
  display: flex;
  gap: 20px;
}

.page-index__app-download-image {
  flex: 0 0 auto;
}

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

/* Buttons */
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button color */
  color: #FFF3E6;
  border: none;
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
  transform: translateY(-3px);
}

.page-index__btn-secondary {
  background-color: #17191F; /* Card BG */
  color: #FF8C1A;
  border: 2px solid #FF8C1A;
}

.page-index__btn-secondary:hover {
  background-color: #FF8C1A;
  color: #FFF3E6;
  transform: translateY(-3px);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__guide-grid {
    gap: 10px;
  }
  .page-index__guide-card {
    flex: 0 0 19%;
    max-width: 19%;
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__app-download-box {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    padding: 30px;
  }
  .page-index__app-download-text {
    text-align: center;
  }
  .page-index__app-download-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* General mobile container padding */
  .page-index__section-content {
    padding: 0 10px;
  }
  .page-index__section-title, .tieudevip {
    font-size: 1.8em;
    margin-bottom: 25px;
  }

  /* Module 0: Hero Carousel */
  .page-index__hero-carousel-section {
    padding-top: 10px !important; /* Ensure small top padding */
  }
  .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 {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .page-index__guide-box {
    padding: 15px;
  }
  .page-index__guide-box .tieudevip {
    margin-bottom: 30px;
  }
  .page-index__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns for 2/3 split */
    gap: 10px;
  }
  .page-index__guide-card {
    flex: none;
    max-width: none;
    padding-top: 0 !important; /* Reset PC specific 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; }

  /* Module 2: Home Content Long Text */
  .page-index__home-content-box {
    max-width: 100% !important;
    height: auto !important; /* Auto height on mobile */
    padding: 20px 15px;
    border-width: 3px;
    box-shadow: 0 0 15px #3477c9;
  }
  .page-index__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }
  .page-index__home-content-title {
    font-size: 1.8em;
  }
  .page-index__home-content-box h2 {
    font-size: 1.5em;
  }
  .page-index__home-content-box h3 {
    font-size: 1.2em;
  }

  /* Module 3: Latest Blog Posts */
  .page-index__blog-section {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(1, 1fr); /* Single column on mobile */
    gap: 20px;
  }
  .page-index__blog-title {
    font-size: 1.1em;
    padding: 10px;
  }
  .page-index__blog-excerpt {
    padding: 0 10px 10px;
    font-size: 0.85em;
    min-height: unset;
  }
  .page-index__blog-media {
    height: 180px;
  }
  .page-index__blog-date {
    top: 10px;
    right: 10px;
    padding: 3px 8px;
  }

  /* Module 4: App Download Section */
  .page-index__app-download-section {
    padding-top: 20px;
    padding-bottom: 30px;
  }
  .page-index__app-download-box {
    padding: 20px;
    gap: 20px;
  }
  .page-index__app-download-title {
    font-size: 1.8em;
  }
  .page-index__app-download-description {
    font-size: 1em;
  }
  .page-index__app-download-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__app-download-image img {
    max-width: 80%;
    margin: 0 auto;
  }

  /* Universal mobile image and button responsiveness */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__home-content-row {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    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: 10px;
    padding-right: 10px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column;
  }
  .page-index__app-download-buttons {
    padding-left: 0;
    padding-right: 0;
  }
}