.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color, #FFF6D6); /* Default to light text for dark background */
  background-color: var(--background-color, #0A0A0A); /* Default to dark background */
  text-align: center;
}

.page-index__section {
  padding: 40px 0;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.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;
  margin-bottom: 30px;
  font-weight: bold;
  color: #F2C14E;
}

.tieudevip {
  display: inline-block;
  position: relative;
  padding: 10px 30px;
  margin-bottom: 40px;
  font-size: 2em;
  font-weight: 700;
  color: #3477c9; /* Primary blue for titles */
  text-transform: uppercase;
  border: 2px solid #3477c9;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(52, 119, 201, 0.4);
  background-color: #fff;
  z-index: 2;
}

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

.page-index__hero-slider {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.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: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.5em;
  z-index: 10;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.page-index__hero-slider-prev:hover,
.page-index__hero-slider-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.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: 8px;
  z-index: 10;
}

.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;
  transition: background-color 0.3s ease;
}

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

/* Module 1: Operation Guide Section */
.page-index__guide-section {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--background-color, #0A0A0A);
}

.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;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-index__guide-box .page-index__section-title {
  color: #333333;
  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 calc(20% - 8px);
  max-width: calc(20% - 8px);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-index__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

.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 Area */
.page-index__home-content-section {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--background-color, #0A0A0A);
}

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

.page-index__home-content-box {
  max-width: 91%;
  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: var(--card-bg-color, #111111); /* Dark background for content box */
  color: var(--text-main-color, #FFF6D6);
}

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

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

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

.page-index__home-content-inner::-webkit-scrollbar-track {
  background-color: #3A2A12;
}

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

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

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

.page-index__home-content-box p,
.page-index__home-content-box li {
  margin-bottom: 15px;
  font-size: 1em;
  color: var(--text-main-color, #FFF6D6);
}

.page-index__home-content-box ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
}

.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: #ccc;
  margin-top: 10px;
}

/* Module 3: Latest Blog Posts Section */
.page-index__blog-section {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--background-color, #0A0A0A);
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__blog-card {
  background-color: var(--card-bg-color, #111111);
  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;
  position: relative;
}

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

.page-index__blog-card-link {
  text-decoration: none;
  display: block;
  color: var(--text-main-color, #FFF6D6);
}

.page-index__blog-media {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.page-index__blog-media img {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s 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: #F2C14E;
  color: #333333;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9em;
  text-align: center;
  line-height: 1.2;
}

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

.page-index__blog-title {
  font-size: 1.2em;
  margin: 15px;
  line-height: 1.4;
  color: #F2C14E;
  text-align: left;
}

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

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

.page-index__view-all-button {
  display: inline-block;
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #333333;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__view-all-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Module 4: App Download Section */
.page-index__app-download-section {
  background-color: var(--background-color, #0A0A0A);
  padding-top: 60px;
  padding-bottom: 80px;
}

.page-index__app-download-description {
  font-size: 1.1em;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-index__app-download-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.page-index__app-qr-code {
  text-align: center;
  background-color: var(--card-bg-color, #111111);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-index__app-qr-code img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto 15px;
}

.page-index__app-qr-code p {
  color: var(--text-main-color, #FFF6D6);
  font-size: 0.95em;
}

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

.page-index__app-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 10px;
  text-decoration: none;
  min-width: 250px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__app-button--android::before,
.page-index__app-button--ios::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  background-size: contain;
  background-repeat: no-repeat;
  filter: invert(1); /* Ensure icon is visible on dark button */
}

.page-index__app-button--android::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 2v20h10V2H7zm4 16h2v-2h-2v2zm0-4h2V8h-2v6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
}

.page-index__app-button--ios::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 17c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zM7 22h10c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2H7c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2zm0-2V4h10v16H7z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
}

.page-index__app-button--play {
  background: #ffffff;
  color: #333333;
  border: 2px solid #F2C14E;
}

.page-index__app-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General button styles */
.page-index__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #333333;
  border: none;
}

.page-index__btn-secondary {
  background: #ffffff;
  color: #F2C14E;
  border: 2px solid #F2C14E;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .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__hero-carousel-section {
    padding-top: 10px !important;
  }

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

  .page-index__hero-slider-dots {
    bottom: 5px;
    gap: 5px;
  }

  .page-index__hero-slider-dots button {
    width: 8px;
    height: 8px;
  }

  .page-index__guide-section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

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

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

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

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

  .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__home-content-section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .page-index__home-content-box {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Auto height for mobile */
    padding: 20px 15px;
    border-width: 3px;
  }

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

  .page-index__blog-section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

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

  .page-index__blog-card-link {
    display: flex;
    flex-direction: column;
  }

  .page-index__blog-media img {
    height: 200px; /* Adjust height for mobile */
  }

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

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

  .page-index__view-all-button-container {
    margin-top: 30px;
  }

  .page-index__app-download-section {
    padding-top: 30px;
    padding-bottom: 50px;
  }

  .page-index__app-download-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-index__app-download-grid {
    flex-direction: column;
    gap: 30px;
  }

  .page-index__app-qr-code {
    padding: 15px;
  }

  .page-index__app-qr-code img {
    
    
  }

  .page-index__app-buttons {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    gap: 15px;
  }

  .page-index__app-button {
    min-width: unset;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
  }
}