.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Main text color for dark body background */
  background-color: #08160F; /* Ensure consistent with body background */
}

/* General section styling */
.page-index__section {
  padding: 40px 0;
  position: relative;
  overflow: hidden; /* Prevent content overflow */
}

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

/* Section Titles */
.page-index__section-title.tieudevip {
  font-size: clamp(1.8em, 2.5vw, 2.5em); /* Use clamp for H1, other titles can be fixed or relative */
  font-weight: bold;
  text-align: center;
  color: #F2C14E; /* Gold for titles */
  margin-bottom: 30px;
  padding: 10px 20px;
  border: 2px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 15px rgba(87, 227, 141, 0.5); /* Glow color with opacity */
  text-transform: uppercase;
  letter-spacing: 1px;
  max-width: 90%;
  box-sizing: border-box;
}

/* Hero Carousel Section */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Small top margin, body handles header offset */
  padding-bottom: 0;
  background-color: #08160F;
}

.page-index__hero-slider {
  position: relative;
  width: 100%;
  max-width: 1020px; /* Max width for the carousel */
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
}

.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: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  line-height: 1;
  border-radius: 4px;
}

.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: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

.page-index__hero-slider-dots button.is-active {
  background: #F2C14E; /* Gold color for active dot */
}

/* Guide Section */
.page-index__guide-section {
  padding-top: 50px;
  background-color: #08160F;
}

.page-index__guide-box {
  max-width: 100%; /* Ensure it takes full width on smaller screens before content max-width */
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #11271B; /* Card BG */
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid #2E7A4E; /* Border */
  box-shadow: 0 0 10px rgba(87, 227, 141, 0.3); /* Glow */
}

.page-index__guide-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start; /* For the "mountain" effect */
  justify-content: center;
  gap: 15px; /* Gap between cards */
  margin-top: 20px;
}

.page-index__guide-card {
  display: block;
  flex: 0 0 calc(20% - 12px); /* 5 cards per row, accounting for gap */
  max-width: calc(20% - 12px);
  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(-5px);
  box-shadow: 0 8px 20px rgba(87, 227, 141, 0.5); /* Glow on hover */
}

.page-index__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350; /* Maintain portrait aspect ratio */
  object-fit: contain; /* Ensure image fits without cropping */
  display: block;
  border-radius: 8px;
}

/* PC "mountain" 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 */
.page-index__home-content-section {
  padding-top: 50px;
  padding-bottom: 50px;
  background-color: #08160F;
}

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

.page-index__home-content-box {
  max-width: 91%; /* Max width as per requirement */
  width: 100%; /* Ensure it takes full available width up to max */
  margin: 0 auto;
  padding: 20px 25px;
  border: 5px solid #2E7A4E; /* Border color */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(87, 227, 141, 0.5); /* Glow shadow */
  height: 700px; /* Fixed height for desktop */
  text-align: left;
  box-sizing: border-box;
  background-color: #11271B; /* Card BG for content box */
  color: #F2FFF6; /* Main text color */
}

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

.page-index__home-content-inner h1 {
  font-size: clamp(2em, 3vw, 3.5em); /* H1 font size with clamp */
  font-weight: bold;
  color: #F2C14E; /* Gold for H1 */
  margin-bottom: 20px;
  text-align: center;
}

.page-index__home-content-inner h2 {
  font-size: clamp(1.5em, 2.2vw, 2em);
  color: #2AD16F; /* Green for H2 */
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-index__home-content-inner h3 {
  font-size: clamp(1.2em, 1.8vw, 1.5em);
  color: #A7D9B8; /* Secondary text color for H3 */
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index__home-content-inner p,
.page-index__home-content-inner ul,
.page-index__home-content-inner ol {
  font-size: 1.1em;
  margin-bottom: 1em;
  color: #F2FFF6; /* Main text color */
}

.page-index__home-content-inner ul,
.page-index__home-content-inner ol {
  padding-left: 25px;
}

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

.page-index__wp-caption {
  margin: 20px auto;
  text-align: center;
  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 10px rgba(0, 0, 0, 0.2);
}

.page-index__wp-caption figcaption {
  font-style: italic;
  font-size: 0.9em;
  color: #A7D9B8; /* Secondary text color */
  margin-top: 10px;
}

/* Blog Section */
.page-index__blog-section {
  padding-top: 50px;
  padding-bottom: 50px;
  background-color: #08160F;
}

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

.page-index__blog-card {
  background: #11271B; /* 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;
  position: relative;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(87, 227, 141, 0.6); /* Glow on hover */
}

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

.page-index__blog-media {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  border-radius: 15px 15px 0 0; /* Rounded top corners */
}

.page-index__blog-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__blog-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #F2C14E; /* Gold */
  color: #08160F; /* Dark text for contrast */
  padding: 8px 10px;
  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.3em;
  font-weight: bold;
  color: #F2FFF6; /* Main text color */
  padding: 15px 15px 0;
  margin-bottom: 10px;
}

.page-index__blog-excerpt {
  font-size: 0.95em;
  color: #A7D9B8; /* Secondary text color */
  padding: 0 15px 20px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
}

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

/* App Download Section */
.page-index__app-download-section {
  padding: 60px 0;
  background-color: #0A4B2C; /* Deep Green */
  text-align: center;
}

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

.page-index__app-download-title {
  font-size: clamp(1.8em, 2.5vw, 2.5em);
  color: #F2C14E; /* Gold */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-index__app-download-description {
  font-size: 1.1em;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 30px;
}

/* Buttons */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  max-width: 100%; /* For mobile responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(87, 227, 141, 0.6); /* Glow on hover */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__section-title.tieudevip {
    font-size: 2em;
  }
  .page-index__guide-grid {
    gap: 10px;
  }
  .page-index__guide-card {
    flex: 0 0 calc(33.33% - 10px); /* 3 cards per row */
    max-width: calc(33.33% - 10px);
  }
  .page-index__home-content-box {
    max-width: 95%;
    height: 600px; /* Slightly reduce height for smaller desktops */
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-index__section {
    padding: 30px 0;
  }

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

  /* Hero Carousel */
  .page-index__hero-carousel-section {
    padding-top: 10px !important; /* Small top margin, body handles header offset */
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    font-size: 18px;
    padding: 8px 12px;
  }
  .page-index__hero-slider-dots {
    bottom: 5px;
    gap: 5px;
  }
  .page-index__hero-slider-dots button {
    width: 8px;
    height: 8px;
  }
  .page-index__hero-slide img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Guide Section */
  .page-index__guide-box {
    padding: 15px;
  }
  .page-index__guide-grid {
    display: grid; /* Use grid for more control over mobile layout */
    grid-template-columns: repeat(6, 1fr); /* 6 fractional units */
    gap: 8px;
    margin-top: 15px;
  }
  .page-index__guide-card {
    flex: none; /* Reset flex properties */
    max-width: none;
    padding-top: 0 !important; /* Reset mountain effect */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .page-index__guide-card--pos-1,
  .page-index__guide-card--pos-2 {
    grid-column: span 3; /* First two cards take 3/6 = 50% width */
  }
  .page-index__guide-card--pos-3,
  .page-index__guide-card--pos-4,
  .page-index__guide-card--pos-5 {
    grid-column: span 2; /* Remaining three cards take 2/6 = 33.33% width */
  }
  .page-index__guide-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section-title.tieudevip {
    font-size: 1.5em;
    padding: 8px 15px;
    max-width: 100%;
  }

  /* Home Content Section */
  .page-index__home-content-box {
    max-width: 100%;
    height: auto; /* Auto height for mobile */
    padding: 15px;
    border-width: 3px;
    box-shadow: 0 0 10px rgba(87, 227, 141, 0.3);
  }
  .page-index__home-content-inner {
    height: auto; /* Full content visible */
    overflow: visible;
    padding-right: 0;
  }
  .page-index__home-content-inner h1 {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-index__home-content-inner h2 {
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 10px;
  }
  .page-index__home-content-inner h3 {
    font-size: 1.1em;
    margin-top: 15px;
    margin-bottom: 8px;
  }
  .page-index__home-content-inner p,
  .page-index__home-content-inner ul,
  .page-index__home-content-inner ol {
    font-size: 1em;
  }
  .page-index__wp-caption img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Blog Section */
  .page-index__blog-grid {
    grid-template-columns: repeat(1, 1fr); /* 1 column for mobile */
    gap: 20px;
  }
  .page-index__blog-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .page-index__blog-media img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__blog-title {
    font-size: 1.1em;
  }
  .page-index__blog-excerpt {
    font-size: 0.9em;
  }

  /* App Download Section */
  .page-index__app-download-title {
    font-size: 1.8em;
  }
}