/* style/index.css */

/* General Body Styles for Contrast */
.page-index {
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-index a {
  color: #57E38D; /* Glow */
  text-decoration: none;
}

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

/* 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 {
  font-size: 2.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #F2FFF6; /* Text Main */
}

/* Tieudevip style */
.page-index__section-title.tieudevip {
  font-size: 2.2em;
  font-weight: bold;
  color: #3477c9; /* Blue from visual token */
  text-align: center;
  padding: 10px 20px;
  border: 2px solid #3477c9;
  border-radius: 8px;
  display: inline-block;
  margin: 0 auto 30px auto;
  box-shadow: 0 0 15px rgba(52, 119, 201, 0.5); /* Light blue shadow */
  text-transform: uppercase;
}

/* Buttons General Styles */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6; /* Text Main */
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

/* Module 0: Hero Carousel Section */
.page-index__hero-carousel-section {
  padding-top: 10px; /* Assuming shared.css handles body padding-top */
  margin-bottom: 0;
}

.page-index__hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

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

.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 .dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

.page-index__hero-slider-dots .dot.is-active {
  background: white;
}

/* Module 1: Operation Guide Section */
.page-index__guide-section {
  padding: 60px 0;
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-index__guide-box .page-index__section-title.tieudevip {
  color: #3477c9; /* Blue */
  border-color: #3477c9;
  box-shadow: 0 0 10px rgba(52, 119, 201, 0.4);
  margin-top: 10px;
}

.page-index__guide-grid {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping on desktop */
  align-items: flex-start;
  justify-content: center;
  gap: 15px;
}

.page-index__guide-card {
  display: block;
  flex: 0 0 calc(20% - 12px); /* 5 cards with gap */
  max-width: calc(20% - 12px);
  text-decoration: none;
  transition: transform 0.3s ease-in-out;
}

.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 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 Section */
.page-index__home-content-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

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

.page-index__home-content-box {
  max-width: 91%;
  width: 100%;
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #3477c9; /* Blue border from visual token */
  border-radius: 15px;
  box-shadow: 0 0 20px #3477c9; /* Blue shadow from visual token */
  height: 700px; /* Fixed height for desktop */
  text-align: left;
  box-sizing: border-box;
  background-color: #11271B; /* Card BG */
  color: #F2FFF6; /* Text Main */
}

.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-inner::-webkit-scrollbar {
  width: 8px;
}

.page-index__home-content-inner::-webkit-scrollbar-track {
  background: #0A4B2C; /* Deep Green */
  border-radius: 10px;
}

.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background: #2AD16F; /* Button top gradient color */
  border-radius: 10px;
}

.page-index__home-content-title {
  font-size: 2.8em;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #F2C14E; /* Gold for main title */
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-index__home-content-box h2 {
  font-size: 2.2em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #F2FFF6; /* Text Main */
}

.page-index__home-content-box h3 {
  font-size: 1.8em;
  margin-top: 25px;
  margin-bottom: 10px;
  color: #A7D9B8; /* Text Secondary */
}

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

.page-index__home-content-box ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #F2FFF6; /* Text Main */
}

.page-index__home-content-box li {
  margin-bottom: 5px;
  color: #F2FFF6; /* Text Main */
}

.page-index__wp-caption {
  text-align: center;
  margin: 20px auto;
  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-size: 0.9em;
  color: #A7D9B8; /* Text Secondary */
  margin-top: 10px;
}

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

.page-index__blog-section .page-index__section-title.tieudevip {
  color: #3477c9; /* Blue */
  border-color: #3477c9;
  box-shadow: 0 0 10px rgba(52, 119, 201, 0.4);
}

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

.page-index__blog-card {
  background-color: #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;
}

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

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

.page-index__blog-media {
  position: relative;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
  border-radius: 15px 15px 0 0;
}

.page-index__blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.page-index__blog-card:hover .page-index__blog-media img {
  transform: scale(1.05);
}

.page-index__blog-date {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #2AD16F; /* Button top gradient color */
  color: #F2FFF6; /* Text Main */
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85em;
  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 {
  font-size: 1.3em;
  font-weight: bold;
  padding: 15px;
  margin: 0;
  color: #F2FFF6; /* Text Main */
}

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

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

/* Module 4: App Download Section */
.page-index__app-download-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

.page-index__app-download-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background-color: #11271B; /* Card BG */
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.page-index__app-download-text {
  flex: 1;
  text-align: left;
}

.page-index__app-download-title {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main */
}

.page-index__app-download-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #A7D9B8; /* Text Secondary */
}

.page-index__app-download-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.page-index__btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-index__btn-download i {
  font-size: 1.2em;
}

.page-index__app-download-image {
  flex: 0 0 400px;
  max-width: 400px;
}

.page-index__app-download-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-index__section {
    padding: 30px 0;
  }

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

  .page-index__section-title.tieudevip {
    font-size: 1.6em;
    padding: 8px 15px;
  }

  /* General image and button adaptation */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__section-content,
  .page-index__guide-box,
  .page-index__home-content-box,
  .page-index__blog-card,
  .page-index__app-download-box {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 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-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-index__app-download-buttons {
    flex-direction: column !important;
    gap: 10px;
  }

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

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

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

  /* Module 1: Operation Guide Section */
  .page-index__guide-section {
    padding: 30px 0;
  }
  
  .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; /* Remove staggered padding */
  }
  /* Mobile 2-3 layout */
  .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; }

  /* Module 2: Home Content Section */
  .page-index__home-content-section {
    padding: 30px 0;
  }

  .page-index__home-content-box {
    max-width: 100%;
    height: auto; /* Auto height on mobile */
    padding: 20px 15px;
  }

  .page-index__home-content-inner {
    height: auto; /* Auto height on mobile */
    overflow: visible; /* No scrollbar on mobile */
    padding-right: 0;
  }

  .page-index__home-content-title {
    font-size: 2em;
  }

  .page-index__home-content-box h2 {
    font-size: 1.6em;
  }

  .page-index__home-content-box h3 {
    font-size: 1.3em;
  }

  /* Module 3: Latest Blog Posts Section */
  .page-index__blog-section {
    padding: 30px 0;
  }
  
  .page-index__blog-grid {
    grid-template-columns: repeat(1, 1fr); /* 1 column on mobile */
    gap: 20px;
  }

  .page-index__blog-media {
    height: 180px;
  }

  .page-index__blog-title {
    font-size: 1.1em;
  }

  /* Module 4: App Download Section */
  .page-index__app-download-section {
    padding: 30px 0;
  }

  .page-index__app-download-box {
    flex-direction: column;
    gap: 20px;
    padding: 30px 15px;
  }

  .page-index__app-download-text {
    text-align: center;
  }

  .page-index__app-download-title {
    font-size: 2em;
  }

  .page-index__app-download-image {
    flex: none;
    max-width: 80%;
  }
}