/* style/index.css */

/* General styles for page-index to ensure contrast */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #ffffff; /* Assuming body background is light or white */
}

/* Ensure all images are responsive by default */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure all buttons are responsive by default */
.page-index a[class*="button"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  display: inline-block; /* Adjust as needed for layout */
  text-align: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

/* Section general styles */
.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.tieudevip {
  font-size: 2.2em;
  font-weight: bold;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 15px;
  position: relative;
}

.page-index__section-title.tieudevip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #26A9E0;
  border-radius: 2px;
}

/* Module 0: Hero Carousel Banner */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 0;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  background-color: #f0f8ff; /* Light background for carousel area */
}

.page-index__hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.page-index__hero-slide {
  display: none;
  width: 100%;
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
}

.page-index__hero-slide.is-active {
  display: block;
  opacity: 1;
}

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

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

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

.page-index__hero-slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.page-index__hero-slider-dots span {
  display: block;
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
}

.page-index__hero-slider-dots span.is-active {
  background-color: #26A9E0;
}

/* Module 1: Operation Guide Section */
.page-index__guide-section {
  padding: 60px 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; /* For staggered effect */
  justify-content: center;
  gap: 8px; /* Small gap between cards */
  margin-top: 30px;
}

.page-index__guide-card {
  display: block;
  flex: 0 0 calc(20% - 8px); /* 5 cards per row, accounting for gap */
  max-width: calc(20% - 8px);
  text-decoration: none;
  transition: transform 0.3s ease;
  overflow: hidden; /* For image zoom effect */
}

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

.page-index__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical images */
  object-fit: contain; /* Ensure image fits without cropping */
  display: block;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.page-index__guide-card:hover img {
  transform: scale(1.03);
}

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

/* Module 2: home_content Long Text Area */
.page-index__home-content-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-index__home-content-box {
  max-width: 91%;
  width: 100%; /* Ensure it takes full width up to max-width */
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #3477c9;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(52, 119, 201, 0.4); /* Adjusted shadow for visibility */
  height: 700px; /* Fixed height for desktop */
  text-align: left;
  box-sizing: border-box;
  background-color: #ffffff; /* Explicitly white background */
  color: #333333; /* Dark text for light background */
}

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

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

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

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

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

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

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

.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);
  width: 100%;
  height: auto;
  object-fit: cover;
}

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

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

.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 40px;
}

.page-index__blog-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333; /* Dark text for light card background */
}

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

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

.page-index__blog-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.page-index__blog-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #26A9E0;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85em;
  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.25em;
  font-weight: bold;
  margin: 15px 15px 10px;
  color: #26A9E0; /* Brand color for titles */
}

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

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

.page-index__view-all-button.btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-index__view-all-button.btn-primary:hover {
  background-color: #1e73be;
}

/* Module 4: App Download Promotion Area */
.page-index__app-download-section {
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff; /* White text for dark background */
  padding: 80px 0;
  text-align: center;
}

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

.page-index__app-download-title {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__app-download-description {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-index__app-download-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-index__app-button {
  background-color: #EA7C07; /* Login button color for emphasis */
  color: #ffffff;
  padding: 15px 40px;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
  min-width: 180px; /* Ensure buttons are not too small */
}

.page-index__app-button:hover {
  background-color: #c96500;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__hero-carousel-section {
    padding-top: 10px;
  }

  .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-2,
  .page-index__guide-card--pos-3,
  .page-index__guide-card--pos-4,
  .page-index__guide-card--pos-5 {
    padding-top: 0;
  }

  .page-index__blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-index__home-content-box {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  /* General mobile text and padding adjustments */
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-index__section-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

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

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

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

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

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

  /* Module 1: Operation Guide Section Mobile (上二下三) */
  .page-index__guide-section {
    padding: 40px 0;
  }

  .page-index__guide-box {
    max-width: 100% !important;
    width: 100% !important;
    padding: 15px;
    box-sizing: border-box !important;
  }

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

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

  .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 {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 250 / 350; /* Maintain vertical aspect ratio */
  }

  /* Module 2: home_content Long Text Area Mobile */
  .page-index__home-content-section {
    padding: 40px 0;
  }
}