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

.page-index__section {
  padding: 20px 0;
  margin-bottom: 20px;
  text-align: center;
}

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

.page-index__section-title {
  font-size: 2.2em;
  font-weight: bold;
  margin-bottom: 30px;
  color: #017439; /* Brand primary color */
}

.tieudevip {
  display: inline-block;
  padding: 8px 20px;
  border: 2px solid #017439;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 116, 57, 0.2);
  text-transform: uppercase;
  font-size: 1.8em;
  font-weight: 700;
  color: #017439;
  margin-bottom: 40px;
}

/* Hero Carousel Section */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Small top padding */
  margin-bottom: 30px;
  overflow: hidden;
  position: relative;
}

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

.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-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}

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

/* Guide Section */
.page-index__guide-section {
  margin-bottom: 40px;
}

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

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

.page-index__guide-card {
  display: block;
  flex: 0 0 calc(20% - 12px);
  max-width: calc(20% - 12px);
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

/* 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 */
.page-index__home-content-section {
  margin-bottom: 40px;
  text-align: left;
}

.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 #017439; /* Brand primary color */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(1, 116, 57, 0.5); /* Green shadow */
  height: 700px;
  text-align: left;
  box-sizing: border-box;
  background-color: #ffffff;
}

.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: clamp(1.8em, 2.5vw, 2.5em);
  font-weight: 700;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

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

.page-index__home-content-section p {
  margin-bottom: 15px;
  color: #333333;
}

.page-index__home-content-section ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #333333;
}

.page-index__home-content-section li {
  margin-bottom: 5px;
}

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

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

/* Blog Section */
.page-index__blog-section {
  margin-bottom: 40px;
}

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Changed from 4 to 3 for better spacing on desktop */
  gap: 25px;
  margin-top: 30px;
}

.page-index__blog-card {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

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

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

.page-index__blog-media {
  position: relative;
  height: 200px; /* Fixed height for blog card images */
  overflow: hidden;
}

.page-index__blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  display: block;
}

.page-index__blog-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
  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;
  font-weight: 600;
  color: #017439;
  margin: 15px 15px 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-index__blog-excerpt {
  font-size: 0.9em;
  color: #555;
  margin: 0 15px 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* App Download Section */
.page-index__app-download-section {
  background-color: #f0f8f0; /* Light green background */
  padding: 50px 0;
  margin-top: 40px;
  margin-bottom: 0;
}

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

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

.page-index__qr-code-container {
  text-align: center;
}

.page-index__qr-code-container img {
  max-width: 250px;
  height: auto;
  display: block;
  margin: 0 auto 15px;
  border: 5px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-index__qr-code-container p {
  font-size: 1em;
  color: #333333;
  font-weight: 500;
}

/* General Buttons */
.page-index__btn-primary {
  display: inline-block;
  background-color: #C30808; /* Red for functional buttons */
  color: #FFFF00; /* Yellow text for functional buttons */
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(195, 8, 8, 0.3);
}

.page-index__btn-primary:hover {
  background-color: #a00606;
  transform: translateY(-2px);
}

.page-index__btn-download {
  background-color: #017439; /* Green for download buttons */
  color: #FFFFFF;
  box-shadow: 0 4px 8px rgba(1, 116, 57, 0.3);
}

.page-index__btn-download:hover {
  background-color: #005a2e;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__section-title {
    font-size: 1.8em;
  }
  .tieudevip {
    font-size: 1.5em;
  }
  .page-index__guide-card {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
  }
  .page-index__guide-grid {
    gap: 10px;
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-index__section-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* General Image & Container Responsive */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__guide-box,
  .page-index__home-content-box,
  .page-index__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero Carousel */
  .page-index__hero-carousel-section {
    padding-top: 10px !important; /* Ensure small padding */
    margin-bottom: 20px;
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 1.2em;
  }
  .page-index__hero-slider-dots {
    bottom: 5px;
    gap: 5px;
  }
  .page-index__hero-slider-dots button {
    width: 10px;
    height: 10px;
  }

  /* Guide Section - Mobile 2x3 Grid */
  .page-index__guide-box {
    padding: 15px;
  }
  .page-index__section-title.tieudevip {
    font-size: 1.3em;
    padding: 6px 15px;
    margin-bottom: 20px;
  }
  .page-index__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
  .page-index__guide-card {
    flex: none;
    max-width: none;
    padding-top: 0 !important; /* Reset 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 {
    border-radius: 6px;
  }

  /* Home Content Section - Auto Height */
  .page-index__home-content-box {
    max-width: 100% !important;
    height: auto !important;
    padding: 20px 15px !important;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(1, 116, 57, 0.4);
  }
  .page-index__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }
  .page-index__home-content-title {
    font-size: 1.6em;
    margin-bottom: 15px;
  }
  .page-index__home-content-section h2 {
    font-size: 1.5em;
    margin-top: 25px;
  }
  .page-index__home-content-section h3 {
    font-size: 1.2em;
    margin-top: 20px;
  }

  /* Blog Section - 2 Columns */
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-index__blog-card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .page-index__blog-media {
    height: 150px; /* Adjust height for mobile */
  }
  .page-index__blog-title {
    font-size: 1.1em;
    margin: 10px 10px 5px;
  }
  .page-index__blog-excerpt {
    margin: 0 10px 15px;
  }

  /* App Download Section */
  .page-index__app-download-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-index__btn-primary,
  .page-index__btn-download {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 10px 15px;
    font-size: 0.95em;
  }
  .page-index__app-description {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .page-index__blog-grid {
    grid-template-columns: 1fr; /* Single column on very small screens */
  }
  .page-index__guide-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for guide on very small screens */
  }
  .page-index__guide-card--pos-1,
  .page-index__guide-card--pos-2,
  .page-index__guide-card--pos-3,
  .page-index__guide-card--pos-4,
  .page-index__guide-card--pos-5 { grid-column: span 1; }
  .page-index__guide-card {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
  .page-index__section-title.tieudevip {
    font-size: 1.1em;
  }
}