/* style/index.css */

/* General Styles and Color Contrast */
.page-index {
  color: #FFF1E8; /* Text Main */
  background: #140C0C; /* Background */
  text-align: center;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-index__section-title.tieudevip {
  color: #F3C54D; /* Gold for titles, better contrast */
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 2px solid #6A1E1E; /* Border color */
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(243, 197, 77, 0.5); /* Gold shadow */
}

.page-index__section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-index a {
  color: #F3C54D; /* Gold for links */
  text-decoration: none;
}

.page-index a:hover {
  text-decoration: underline;
}

/* Button styles */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #FFF1E8; /* Text Main for buttons */
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Module 0: Hero Carousel */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding */
  padding-bottom: 40px;
  background: #140C0C; /* Background */
}

.page-index__hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  max-width: 1020px; /* Max width for carousel */
  margin: 0 auto;
}

.page-index__hero-slide {
  display: none;
}

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

.page-index__hero-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 1020 / 351; /* Maintain aspect ratio */
  min-height: 200px; /* Ensure min size */
}

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

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

.page-index__hero-slider-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.page-index__hero-slider-dot.is-active {
  background: #FFF1E8;
}

/* Module 1: Operation Guide Section */
.page-index__guide-section {
  padding: 40px 0;
  background: #140C0C; /* Background */
}

.page-index__guide-box {
  max-width: 100%; /* Important for mobile */
  margin: 0 auto;
  padding: 16px 20px 24px;
  background: #2A1212; /* Card BG */
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: 0 0 15px rgba(243, 197, 77, 0.2); /* Subtle gold shadow */
  border: 1px solid #6A1E1E; /* Border color */
}

.page-index__guide-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start; /* For staggered effect */
  justify-content: center;
  gap: 15px; /* Adjust gap for desktop */
}

.page-index__guide-card {
  display: block;
  flex: 0 0 18%; /* Adjusted for 5 cards with gap */
  max-width: 18%;
  text-decoration: none;
  transition: transform 0.3s ease;
  overflow: hidden; /* For image-zoom effect */
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background: #2A1212; /* Card BG */
}

.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;
  min-height: 200px; /* Ensure min size */
  transition: transform 0.3s ease;
}

.page-index__guide-card:hover img {
  transform: scale(1.05); /* Image zoom on hover */
}

/* 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: 40px 0;
  background: #140C0C; /* Background */
}

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

.page-index__home-content-box {
  max-width: 91%; /* Max width for desktop */
  width: 100%; /* Ensure it takes full width up to max */
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #6A1E1E; /* Border color */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(243, 197, 77, 0.4); /* Gold shadow */
  height: 700px; /* Fixed height for desktop */
  text-align: left;
  box-sizing: border-box;
  background: #2A1212; /* Card BG */
  color: #FFF1E8; /* Text Main */
}

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

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

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background: #F3C54D; /* Gold scrollbar */
  border-radius: 4px;
}

.page-index__home-content-inner::-webkit-scrollbar-track {
  background: #6A1E1E; /* Deep Red track */
}

.page-index__home-content-title {
  color: #F3C54D; /* Gold for main title */
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index__home-content-box h2 {
  color: #FFB04A; /* Orange from button gradient */
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
}

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

.page-index__home-content-box p,
.page-index__home-content-box ul,
.page-index__home-content-box ol {
  margin-bottom: 15px;
  color: #FFF1E8; /* Text Main */
}

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

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

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

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  min-height: 200px; /* Ensure min size */
}

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

/* Module 3: Latest Blog Posts */
.page-index__blog-section {
  padding: 40px 0;
  background: #140C0C; /* Background */
}

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

.page-index__blog-card {
  background: #2A1212; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  border: 1px solid #6A1E1E; /* Border color */
}

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

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

.page-index__blog-media {
  position: relative;
  overflow: hidden;
}

.page-index__blog-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  min-height: 200px; /* Ensure min size */
}

.page-index__blog-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #C61F1F; /* Main color */
  color: #FFF1E8;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
  text-align: center;
  line-height: 1.2;
}

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

.page-index__blog-title {
  color: #F3C54D; /* Gold */
  font-size: 1.2em;
  font-weight: bold;
  padding: 15px;
  margin-top: 0;
  text-align: left;
}

.page-index__blog-excerpt {
  color: #FFF1E8; /* Text Main */
  font-size: 0.9em;
  padding: 0 15px 15px;
  margin-bottom: 0;
  text-align: left;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Module 4: App Download Promotion Area */
.page-index__download-app-section {
  padding: 60px 0;
  background: #140C0C; /* Background */
}

.page-index__download-app-box {
  background: #2A1212; /* Card BG */
  border-radius: 15px;
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 0 25px rgba(243, 197, 77, 0.3); /* Gold shadow */
  border: 1px solid #6A1E1E; /* Border color */
}

.page-index__download-app-title {
  color: #F3C54D; /* Gold */
  font-size: 2em;
  margin-bottom: 20px;
}

.page-index__download-app-description {
  color: #FFF1E8; /* Text Main */
  font-size: 1.1em;
  margin-bottom: 30px;
  line-height: 1.5;
}

.page-index__download-app-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Ensure buttons wrap on mobile */
}

.page-index__download-btn {
  min-width: 200px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__section-title.tieudevip {
    font-size: 2em;
  }
  .page-index__hero-slider {
    max-width: 90%;
  }
  .page-index__guide-card {
    flex: 0 0 20%;
    max-width: 20%;
  }
  .page-index__home-content-box {
    max-width: 95%;
    height: 600px; /* Slightly reduced height */
  }
  .page-index__home-content-title {
    font-size: 2.2em;
  }
  .page-index__home-content-box h2 {
    font-size: 1.6em;
  }
  .page-index__blog-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* General mobile styles */
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-index__section-content {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__section-title.tieudevip {
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 8px;
  }

  /* Buttons general mobile adaption */
  .page-index__btn-primary,
  .page-index__download-btn {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 0;
    padding-right: 0;
  }
  .page-index__download-app-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  /* Images general mobile adaption */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__guide-box,
  .page-index__home-content-box,
  .page-index__blog-card,
  .page-index__download-app-box {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Module 0: Hero Carousel mobile */
  .page-index__hero-carousel-section {
    padding-top: 10px !important;
    padding-bottom: 20px;
  }
  .page-index__hero-slider {
    max-width: 100%;
    border-radius: 0;
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 1.2em;
  }
  .page-index__hero-slider-dots {
    bottom: 5px;
  }

  /* Module 1: Operation Guide Section mobile */
  .page-index__guide-section {
    padding: 20px 0;
  }
  .page-index__guide-box {
    padding: 15px;
  }
  .page-index__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns for mobile grid */
    gap: 8px;
  }
  .page-index__guide-card {
    flex: none;
    max-width: none;
    padding-top: 0 !important; /* Remove staggered padding */
  }
  /* Mobile: Top 2 cards, then bottom 3 cards */
  .page-index__guide-card--pos-1,
  .page-index__guide-card--pos-2 { grid-column: span 3; } /* Each takes 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; } /* Each takes 2/6 = 33.33% width */

  /* Module 2: home_content Long Text Area mobile */
  .page-index__home-content-section {
    padding: 20px 0;
  }
  .page-index__home-content-box {
    max-width: 100%; /* Full width on mobile */
    height: auto; /* Auto height on mobile, no scrolling box */
    padding: 20px 15px;
    border-width: 3px;
  }
  .page-index__home-content-inner {
    height: auto;
    overflow: visible; /* Show all content on mobile */
    padding-right: 0;
  }
  .page-index__home-content-title {
    font-size: 1.8em;
  }
  .page-index__home-content-box h2 {
    font-size: 1.4em;
  }
  .page-index__home-content-box h3 {
    font-size: 1.2em;
}
  .page-index__wp-caption img {
    border-radius: 5px;
  }

  /* Module 3: Latest Blog Posts mobile */
  .page-index__blog-section {
    padding: 20px 0;
  }
  .page-index__blog-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 15px;
  }
  .page-index__blog-card {
    border-radius: 8px;
  }
  .page-index__blog-media img {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }
  .page-index__blog-title {
    font-size: 1.1em;
    padding: 10px;
  }
  .page-index__blog-excerpt {
    padding: 0 10px 10px;
  }
  .page-index__view-all-button {
    margin-top: 25px;
  }

  /* Module 4: App Download mobile */
  .page-index__download-app-section {
    padding: 30px 0;
  }
  .page-index__download-app-box {
    padding: 25px;
    border-radius: 10px;
  }
  .page-index__download-app-title {
    font-size: 1.6em;
  }
  .page-index__download-app-description {
    font-size: 1em;
  }
}