.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff;
}

.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 {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #26A9E0;
}

.tieudevip {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #26A9E0;
  position: relative;
  padding-bottom: 10px;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

.tieudevip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #26A9E0;
  box-shadow: 0 2px 5px rgba(38, 169, 224, 0.4);
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-index__btn-primary:hover {
  background: #1e73be;
  border-color: #1e73be;
}

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

.page-index__btn-secondary:hover {
  background: #f0f8ff;
  color: #1e73be;
}

.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 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;
}

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

.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;
  z-index: 10;
  font-size: 1.5em;
  border-radius: 50%;
}

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

.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: #fff;
}

/* Module 1: Guide Section */
.page-index__guide-section {
  padding: 40px 0;
  background-color: #f9f9f9;
}

.page-index__guide-box {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #f5e6d3;
  border-radius: 4px;
  box-sizing: border-box;
  text-align: center;
}

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

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

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

/* PC specific staggered layout for guide cards */
.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: 40px 0;
  background-color: #ffffff;
}

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

.page-index__home-content-box {
  max-width: 91%;
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #26A9E0; /* Using primary color */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(38, 169, 224, 0.6); /* Shadow with primary color */
  height: 700px;
  text-align: left;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #333333;
}

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

.page-index__home-content-inner h1 {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-index__home-content-inner h2 {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-index__home-content-inner h3 {
  font-size: 1.4em;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #333333;
}

.page-index__home-content-inner p,
.page-index__home-content-inner ul,
.page-index__home-content-inner li {
  font-size: 1em;
  margin-bottom: 10px;
  color: #333333;
}

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

.page-index__wp-caption img {
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

/* Module 3: Blog Section */
.page-index__blog-section {
  padding: 40px 0;
  background-color: #f9f9f9;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Default 3 columns for desktop */
  gap: 20px;
  margin-bottom: 30px;
}

.page-index__blog-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.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-top: 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: 10px;
  border-top-right-radius: 10px;
}

.page-index__blog-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #26A9E0;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

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

.page-index__blog-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 15px;
  color: #333333;
  flex-grow: 1;
}

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

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

/* Module 4: App Download Section */
.page-index__app-download-section {
  background-color: #26A9E0; /* Primary color background */
  color: #ffffff;
  padding: 60px 0;
  text-align: center;
}

.page-index__app-download-section .tieudevip {
  color: #ffffff;
}

.page-index__app-download-section .tieudevip::after {
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(255, 255, 255, 0.4);
}

.page-index__app-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__app-download-buttons .page-index__btn-primary {
  background: #EA7C07; /* Login color for download button */
  border-color: #EA7C07;
}

.page-index__app-download-buttons .page-index__btn-primary:hover {
  background: #d46a00;
  border-color: #d46a00;
}

.page-index__app-download-buttons .page-index__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border-color: #ffffff;
}

.page-index__app-download-buttons .page-index__btn-secondary:hover {
  background: #f0f0f0;
  color: #1e73be;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__section-title {
    font-size: 2em;
  }
  .tieudevip {
    font-size: 2em;
  }
  .page-index__home-content-box {
    max-width: 95%;
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__guide-card {
    flex: 0 0 calc(33.33% - 8px);
    max-width: calc(33.33% - 8px);
  }
  .page-index__guide-card--pos-1, .page-index__guide-card--pos-5,
  .page-index__guide-card--pos-2, .page-index__guide-card--pos-4,
  .page-index__guide-card--pos-3 {
    padding-top: 0; /* Reset staggered padding for smaller desktops/tablets */
  }
}

@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,
  .page-index__card,
  .page-index__container,
  .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;
  }

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

  /* Module 0: Hero Carousel */
  .page-index__hero-carousel-section {
    padding-top: 10px !important;
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 5px 10px;
    font-size: 1.2em;
  }

  /* Module 1: Guide Section */
  .page-index__guide-box {
    padding: 15px;
  }
  .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 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 Long Text */
  .page-index__home-content-box {
    max-width: 100% !important;
    height: auto !important;
    padding: 20px 15px;
    box-shadow: none;
  }
  .page-index__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0;
  }
  .page-index__home-content-inner h1 {
    font-size: 1.8em;
  }
  .page-index__home-content-inner h2 {
    font-size: 1.5em;
  }
  .page-index__home-content-inner h3 {
    font-size: 1.2em;
  }

  /* Module 3: Blog Section */
  .page-index__blog-grid {
    grid-template-columns: repeat(1, 1fr); /* Single column on mobile */
    gap: 15px;
  }
  .page-index__blog-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .page-index__blog-title {
    font-size: 1.1em;
  }

  /* Module 4: App Download Section */
  .page-index__app-download-buttons {
    flex-direction: column;
    gap: 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;
  }
}