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

/* Module 1: Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
  overflow: hidden;
  max-width: 1920px; /* Max width for consistency */
  margin: 0 auto;
}
.page-index__hero-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  scroll-snap-type: x mandatory;
  overflow-x: hidden; /* Hide scrollbar for track */
}
.page-index__hero-slider-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  position: relative; /* For image positioning */
}
.page-index__hero-slider-slide.is-active {
  opacity: 1;
}
.page-index__hero-slider-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image 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: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.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: 1px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
}
.page-index__hero-slider-dots button.is-active {
  background: #E53935;
}

/* Module 3: Promo Duo */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}
.page-index__promo-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.page-index__promo-duo-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #FFFFFF; /* Card BG */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  padding-bottom: 20px;
}
.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}
.page-index__promo-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  border-radius: 4px;
  text-decoration: none;
  max-width: calc(100% - 40px); /* Adjust for padding in parent */
  margin: 0 20px;
  box-sizing: border-box;
  font-weight: bold;
  font-size: 18px;
  white-space: normal;
  word-wrap: break-word;
  transition: opacity 0.3s ease;
}
.page-index__promo-cta:hover {
  opacity: 0.9;
}

/* Module 4: Decorative H1 */
.page-index__section-title {
  text-align: center;
  margin: 30px auto;
  max-width: 1250px;
  padding: 0 16px;
  box-sizing: border-box;
}
.page-index__main-title {
  color: #E53935; /* Main color for H1 */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-size: clamp(24px, 4vw, 48px); /* Clamp for H1 font size */
  margin: 0;
  padding: 0;
}

/* Module 5: Long SEO Content */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px; /* Fixed height for desktop */
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #FF5A4F; /* Border color */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 90, 79, 0.6); /* Shadow color based on aux color */
  background: rgba(255, 255, 255, 0.92);
  color: #333333; /* Text Main color */
}
.page-index__home-content-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  text-align: justify;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.page-index__home-content-inner::-webkit-scrollbar {
  width: 10px;
}
.page-index__home-content-inner::-webkit-scrollbar-thumb {
  background-color: #4C9BB6; /* Scrollbar thumb color */
  border-radius: 20px;
  border: 3px solid #FF5A4F; /* Scrollbar border color */
}
.page-index__home-content-inner h2,
.page-index__home-content-inner h3 {
  color: #E53935; /* Main color for headings */
  margin-top: 24px;
  margin-bottom: 12px;
}
.page-index__home-content-inner h3 {
  font-size: 1.3em;
}
.page-index__home-content-inner p {
  margin-bottom: 12px;
}
.page-index__home-content-inner a {
  color: #E53935; /* Main color for links */
  text-decoration: underline;
}
.page-index__home-content-inner a:hover {
  opacity: 0.8;
}
.page-index__figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}
.page-index__figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}
.page-index__figure figcaption {
  font-size: 0.9em;
  color: #666;
  margin-top: 8px;
}
.page-index__milestone-list,
.page-index__guide-list,
.page-index__future-plan-list,
.page-index__contact-list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 12px;
}
.page-index__guide-list {
  list-style-type: decimal;
}
.page-index__table-wrapper {
  overflow-x: auto; /* For responsive tables */
  margin-bottom: 20px;
  box-sizing: border-box;
}
.page-index__content-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 0.95em;
  min-width: 500px; /* Ensure table doesn't collapse too much */
}
.page-index__content-table th,
.page-index__content-table td {
  border: 1px solid #E0E0E0; /* Border color */
  padding: 10px 12px;
  text-align: left;
}
.page-index__content-table th {
  background-color: #f0f0f0;
  font-weight: bold;
  color: #333333;
}

/* Module 6: Latest Articles · Blog Card Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto 60px auto;
  padding: 0 16px;
  box-sizing: border-box;
}
.page-index__blog-slider-title {
  text-align: center;
  color: #FF5A4F; /* Aux color for blog title */
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
}
.page-index__blog-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px; /* For arrows */
}
.page-index__blog-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}
.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 cards on desktop with 20px gap */
  scroll-snap-align: start;
  box-sizing: border-box;
  background: #FFFFFF; /* Card BG */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.page-index__post-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.page-index__post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Fixed 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}
.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}
.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #fff;
  border: 2px solid #E53935; /* Main color for date border */
  border-radius: 2px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: #E53935; /* Main color for date text */
  font-size: 10px;
  text-transform: uppercase;
}
.page-index__post-date-day {
  display: block;
  font-weight: 700;
  font-size: 16px;
}
.page-index__post-date-month {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}
.page-index__post-item h5 {
  text-align: center;
  color: #333333; /* Text Main color for H5 */
  margin: 12px 15px 6px;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.4;
}
.page-index__post-item p {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin: 0 15px 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #FF5A4F; /* Aux color for slider buttons */
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #E53935; /* Main color on hover */
}

/* Universal image responsiveness for content area */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}
.page-index__cta-button,
.page-index__btn-primary,
.page-index__btn-secondary,
.page-index a[class*="button"],
.page-index a[class*="btn"],
.page-index__promo-cta {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__cta-buttons,
.page-index__button-group,
.page-index__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media Queries for Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* Module 1: Hero Slider */
  .page-index__hero-slider {
    padding-top: 10px !important;
  }
  .page-index__hero-slider-slide img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 20px;
    width: 32px;
    height: 32px;
    top: 45%;
  }
  .page-index__hero-slider-prev { left: 5px; }
  .page-index__hero-slider-next { right: 5px; }
  .page-index__hero-slider-dots { bottom: 5px; }

  /* Module 3: Promo Duo */
  .page-index__promo-duo-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .page-index__promo-duo {
    margin: 20px auto;
    padding: 0 10px;
  }
  .page-index__promo-duo-col img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}