.page-index {
  font-family: Arial, sans-serif;
  color: #FFF3E6; /* Text Main */
  background-color: var(--site-bg, #0D0E12); /* Fallback to custom bg color */
  line-height: 1.6;
}

.page-index__section {
  padding: 40px 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 {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  color: #FF8C1A; /* Main brand color */
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 10px;
}

.page-index__section-title.tieudevip::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: #FF8C1A;
  margin: 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
}

/* Module 0: Hero Carousel */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Consistent with shared body padding-top */
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
}

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

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

.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: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5em;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.page-index__hero-slider-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

.page-index__hero-slider-dot.is-active {
  background: #FF8C1A;
}


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

.page-index__guide-box {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #17191F; /* Card BG */
  border-radius: 4px;
  box-sizing: border-box;
  border: 1px solid #A84F0C; /* Border color */
  box-shadow: 0 0 15px rgba(255, 140, 26, 0.3);
}

.page-index__guide-grid {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping on desktop */
  align-items: flex-start; /* For staggered layout */
  justify-content: center;
  gap: 15px; /* Increased gap for better spacing */
  margin-top: 20px;
}

.page-index__guide-card {
  display: block;
  flex: 0 0 18%; /* Adjusted for 5 cards with gap */
  max-width: 18%;
  text-decoration: none;
  transition: transform 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
}

.page-index__guide-card:hover {
  transform: translateY(-10px) scale(1.03);
}

.page-index__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350; /* Maintain portrait aspect ratio */
  object-fit: cover; /* Cover the area, but maintain aspect ratio */
  display: block;
  border-radius: 8px;
}

/* PC staggered layout */
.page-index__guide-card--pos-1 { padding-top: 50px; }
.page-index__guide-card--pos-2 { padding-top: 25px; }
.page-index__guide-card--pos-3 { padding-top: 0; }
.page-index__guide-card--pos-4 { padding-top: 25px; }
.page-index__guide-card--pos-5 { padding-top: 50px; }

/* Module 2: Home Content Long Text Section */
.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%; /* Ensure it takes full width up to max-width */
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #FF8C1A; /* Main brand color */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 140, 26, 0.5);
  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; /* Scroll within the box */
  overflow-x: hidden;
  padding-right: 8px; /* For scrollbar spacing */
}

/* Custom scrollbar for webkit browsers */
.page-index__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-index__home-content-inner::-webkit-scrollbar-track {
  background: #0D0E12; /* Background color */
  border-radius: 10px;
}

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background: #FF8C1A; /* Main brand color */
  border-radius: 10px;
}

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

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

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

.page-index__home-content-list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 15px;
}

.page-index__home-content-list li {
  margin-bottom: 8px;
  color: #FFF3E6;
}

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

.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-size: 0.9em;
  color: rgba(255, 243, 230, 0.8); /* Lighter Text Main */
  margin-top: 10px;
}

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

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Changed to 3 for better card size */
  gap: 30px;
  margin-top: 30px;
}

.page-index__blog-card {
  background-color: #17191F; /* Card BG */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__blog-media {
  position: relative;
  width: 100%;
  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-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

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

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

.page-index__blog-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #FF8C1A; /* Main brand color */
  margin: 15px 15px 10px;
  flex-grow: 1;
}

.page-index__blog-excerpt {
  font-size: 0.95em;
  color: rgba(255, 243, 230, 0.9);
  margin: 0 15px 15px;
  line-height: 1.5;
}

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

/* Module 4: App Download Section */
.page-index__download-app-section {
  padding-top: 40px;
  padding-bottom: 60px;
  text-align: center;
}

.page-index__download-app-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF3E6;
}

.page-index__download-app-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* General Button Styles */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
  color: #FFF3E6; /* Text Main */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure button adapts */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__section-title.tieudevip {
    font-size: 2em;
  }
  .page-index__home-content-title {
    font-size: 2em;
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__guide-card {
    flex: 0 0 30%; /* Adjust for 3 cards per row if needed, but sticking to 5 for now */
    max-width: 30%;
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-index__section-content {
    padding: 0 10px;
  }

  .page-index__section-title.tieudevip {
    font-size: 1.8em;
    margin-bottom: 20px;
  }
  
  /* Mobile general image responsiveness */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* Mobile general container responsiveness */
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__guide-box,
  .page-index__home-content-box,
  .page-index__blog-card,
  .page-index__download-app-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Module 0: Hero Carousel - Mobile */
  .page-index__hero-carousel-section {
    padding-top: 10px !important; /* Ensure minimal top padding */
  }
}