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

.page-index__section {
  padding: 40px 0;
  margin-bottom: 20px;
  box-sizing: border-box;
}

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

.page-index__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #FF8C1A;
}

/* tieudevip styles */
.page-index__section-title.tieudevip {
  display: inline-block;
  position: relative;
  padding: 10px 30px;
  border: 2px solid #FF8C1A;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(255, 140, 26, 0.5);
  background-color: #17191F; /* Card BG */
  color: #FF8C1A;
  margin: 40px auto;
  font-size: 2em;
  text-transform: uppercase;
}

/* Buttons */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 0 15px #FFB04D;
}

/* Hero Carousel Section (Module 0) */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Fixed top spacing, not var(--header-offset) */
  margin-bottom: 0;
  padding-bottom: 0;
  background-color: #0D0E12;
}

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

.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;
  border-radius: 8px;
}

.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: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.5em;
  z-index: 10;
  border-radius: 50%;
}

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

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

.page-index__hero-slider-dots {
  text-align: center;
  position: absolute;
  bottom: 10px;
  width: 100%;
}

.page-index__hero-slider-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

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

/* Guide Section (Module 1) */
.page-index__guide-section {
  background-color: #0D0E12;
  padding: 60px 0;
}

.page-index__guide-box {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #f5e6d3; /* Light background for guide box */
  border-radius: 4px;
  box-sizing: border-box;
}

.page-index__guide-box .page-index__section-title.tieudevip {
  color: #333333;
  border-color: #A84F0C;
  background-color: transparent;
  box-shadow: none;
  margin-top: 20px;
  margin-bottom: 30px;
}

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

.page-index__guide-card {
  display: block;
  flex: 0 0 19%; /* Adjusted to account for gap */
  max-width: 19%;
  text-decoration: none;
  transition: transform 0.3s ease;
}

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

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

/* PC staggered layout */
.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; }

/* Home Content Section (Module 2) */
.page-index__home-content-section {
  background-color: #0D0E12;
  padding: 60px 0;
}

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

.page-index__home-content-box {
  max-width: 91%; /* Approx 1092px for 1200px container */
  width: 100%;
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #3477c9;
  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;
}

.page-index__home-content-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px; /* For scrollbar */
}

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

.page-index__home-content-box h2 {
  font-size: 1.8em;
  color: #FF8C1A;
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 1px solid #A84F0C;
  padding-bottom: 5px;
}

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

.page-index__home-content-box p,
.page-index__home-content-box li {
  margin-bottom: 10px;
  color: #FFF3E6;
}

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

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

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

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

/* Blog Section (Module 3) */
.page-index__blog-section {
  background-color: #0D0E12;
  padding: 60px 0;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
  gap: 20px;
  margin-top: 40px;
}

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

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

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

.page-index__blog-media {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.page-index__blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px 10px 0 0; /* Top corners rounded */
}

.page-index__blog-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #FF8C1A;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
  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.2em;
  font-weight: bold;
  color: #FF8C1A;
  padding: 15px;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-index__blog-excerpt {
  font-size: 0.9em;
  color: #FFF3E6;
  padding: 0 15px 15px;
  margin-top: 0;
  margin-bottom: 0;
  height: 40px; /* Limit excerpt height */
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* App Download Section (Module 4) */
.page-index__app-download-section {
  background-color: #17191F; /* Card BG */
  padding: 60px 0;
  text-align: center;
}

.page-index__app-download-content {
  max-width: 800px;
  margin: 0 auto;
}

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

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

.page-index__app-download-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.page-index__btn-download-ios,
.page-index__btn-download-android {
  min-width: 180px;
}

.page-index__app-qr-code img {
  width: 200px;
  height: 200px;
  display: block;
  margin: 0 auto 10px;
  border: 5px solid #FF8C1A;
  border-radius: 5px;
}

.page-index__app-qr-code p {
  color: #FFF3E6;
  font-size: 0.9em;
}

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

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

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

  .page-index__section {
    padding: 30px 0;
  }

  .page-index__section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
  }

  .page-index__section-title.tieudevip {
    font-size: 1.5em;
    padding: 8px 20px;
    margin: 30px auto;
  }

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

  .page-index__hero-slide img {
    border-radius: 0;
  }

  .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: 40px 0;
  }

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

  .page-index__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Base grid for mobile */
    gap: 8px;
  }

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

  .page-index__guide-card img {
    aspect-ratio: 250 / 350; /* Maintain aspect ratio */
    object-fit: contain;
  }

  .page-index__guide-card--pos-1,
  .page-index__guide-card--pos-2 { grid-column: span 3; } /* Top row: 2 cards */
  .page-index__guide-card--pos-3,
  .page-index__guide-card--pos-4,
  .page-index__guide-card--pos-5 { grid-column: span 2; } /* Bottom row: 3 cards */

  /* Module 2: Home Content Section */
  .page-index__home-content-section {
    padding: 40px 0;
  }

  .page-index__home-content-box {
    max-width: 100%;
    height: auto; /* Auto height on mobile */
    padding: 20px 16px;
    border-radius: 8px;
    box-shadow: 0 0 10px #3477c9;
  }

  .page-index__home-content-inner {
    height: auto;
    overflow: visible; /* Content fully visible on mobile */
    padding-right: 0;
  }

  .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: Blog Section */
  .page-index__blog-section {
    padding: 40px 0;
  }

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

  .page-index__blog-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .page-index__blog-media {
    height: 180px;
  }

  .page-index__blog-title {
    font-size: 1.1em;
    padding: 10px 15px;
  }

  .page-index__blog-excerpt {
    padding: 0 15px 10px;
    height: auto; /* Allow full excerpt on mobile */
  }

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

  .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__btn-download-ios,
  .page-index__btn-download-android {
    width: 100%;
    max-width: 280px; /* Optional: limit width even if 100% */
    margin: 0 auto;
  }

  /* General image and button overrides for mobile */
  .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__guide-box,
  .page-index__home-content-box,
  .page-index__blog-card,
  .page-index__app-download-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-index__app-download-buttons {
    display: flex;
    flex-wrap: wrap !important; /* Ensure buttons wrap */
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}