/* style/index.css */

.page-index {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
}

/* Module 1: Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 30px; /* Module 2: Spacing */
}

.page-index__hero-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.page-index__hero-slider-slide {
  flex: 0 0 100%;
  display: none;
}

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

.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);
  max-width: 100%; /* Ensure responsiveness */
}

.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;
  font-size: 24px;
  z-index: 10;
  border-radius: 4px;
  max-width: 100%;
  box-sizing: border-box;
}

.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: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #fff;
  cursor: pointer;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

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

/* Module 3: Promo Duo */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 0 auto 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 {
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 8px 8px 0 0;
  max-width: 100%;
}

.page-index__promo-cta {
  display: block;
  width: calc(100% - 40px);
  text-align: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__promo-cta:hover {
  opacity: 0.9;
}

.page-index__promo-cta--alert {
  background: linear-gradient(180deg, #FF6B6B 0%, #E74C3C 100%); /* High contrast alert color */
}

.page-index__promo-cta--alert: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__section-title h1 {
  color: #2F6BFF;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
  font-size: clamp(28px, 4vw, 48px); /* Using clamp for responsive H1 font size */
}

/* Module 5: Long-form SEO Content */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px;
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #6FA3FF;
  border-radius: 15px;
  box-shadow: 0 0 20px #A5C4FF; /* Glow */
  background: #FFFFFF;
  color: #1F2D3D; /* Text Main */
  line-height: 1.7;
  font-size: 16px;
}

.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: #6FA3FF; /* Adjusted to match auxiliary color */
  border-radius: 20px;
  border: 3px solid #2F6BFF; /* Adjusted to match primary color */
}

.page-index__home-content-inner h2 {
  color: #2F6BFF;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 24px;
  font-weight: 600;
}

.page-index__home-content-inner h3 {
  color: #000000; /* Custom Color_1776249996415 */
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
}

.page-index__home-content-inner figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
  background: #FFFFFF;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.page-index__home-content-inner figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 0 auto;
}

.page-index__home-content-inner figcaption {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
}

.page-index__home-content-inner ul {
  list-style: disc;
  padding-left: 25px;
  margin-bottom: 15px;
}

.page-index__home-content-inner li {
  margin-bottom: 8px;
  color: #1F2D3D;
}

.page-index__home-content-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #FFFFFF;
  border: 1px solid #D6E2FF;
  border-radius: 8px;
  overflow: hidden;
}

.page-index__home-content-inner th,
.page-index__home-content-inner td {
  border: 1px solid #D6E2FF;
  padding: 12px 15px;
  text-align: left;
  color: #1F2D3D;
}

.page-index__home-content-inner th {
  background-color: #F4F7FB;
  font-weight: 600;
  color: #2F6BFF;
}

.page-index__home-content-inner a {
  color: #2F6BFF;
  text-decoration: none;
}

.page-index__home-content-inner a:hover {
  text-decoration: underline;
}

/* Module 6: Latest Articles / Blog Card Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__blog-slider-title {
  text-align: center;
  color: #2F6BFF;
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 700;
}

.page-index__blog-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px; /* Space for scrollbar */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}

.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: #6FA3FF;
  border-radius: 10px;
}

.page-index__blog-slider-track::-webkit-scrollbar-track {
  background-color: #e0e0e0;
}

.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 cards + 2 gaps */
  scroll-snap-align: start;
  box-sizing: border-box;
  background: #FFFFFF;
  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: 8px 8px 0 0;
}

.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: #2F6BFF;
  color: #FFFFFF;
  border: 2px solid #6FA3FF;
  border-radius: 4px;
  padding: 5px 10px;
  text-align: center;
  line-height: 1.2;
  font-size: 13px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.page-index__post-date-day {
  display: block;
  font-weight: 700;
  font-size: 18px;
}

.page-index__post-date-month {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.page-index__post-item h5 {
  color: #2F6BFF;
  margin: 15px 12px 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.page-index__post-item p {
  color: #1F2D3D;
  font-size: 14px;
  margin: 0 12px 15px;
  line-height: 1.5;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #6FA3FF;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #2F6BFF;
}

/* General Image Responsiveness */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* General Button Responsiveness */
.page-index a[class*="cta"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* Media Queries for Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Module 1: Hero Slider */
  .page-index__hero-slider {
    padding-top: 10px !important; /* Small top padding, no --header-offset override */
    margin-bottom: 20px;
  }

  .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;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Module 3: Promo Duo */
  .page-index__promo-duo {
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .page-index__promo-duo-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-index__promo-duo-col img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__promo-cta {
    width: calc(100% - 30px); /* Adjust padding */
    padding: 12px 15px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Module 4: Decorative H1 */
  .page-index__section-title {
    margin: 20px auto;
    padding: 0 10px;
  }

  .page-index__section-title h1 {
    font-size: clamp(24px, 7vw, 36px);
  }

  /* Module 5: Long-form SEO Content */
  .page-index__home-content {
    height: 60vh; /* Responsive height */
    min-height: 420px;
    max-height: 560px;
    margin: 16px 12px;
    border-width: 3px;
    padding: 8px;
    box-shadow: 0 0 15px #A5C4FF;
  }

  .page-index__home-content-inner {
    padding: 8px 10px;
  }

  .page-index__home-content-inner h2 {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .page-index__home-content-inner h3 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 8px;
  }

  .page-index__home-content-inner figure {
    padding: 8px;
  }

  .page-index__home-content-inner figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__home-content-inner ul {
    padding-left: 20px;
  }

  .page-index__home-content-inner table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
    margin: 15px 0;
  }

  .page-index__home-content-inner table th,
  .page-index__home-content-inner table td {
    padding: 10px;
    font-size: 14px;
    white-space: nowrap; /* Prevent text wrapping in table cells */
  }

  /* Module 6: Latest Articles / Blog Card Slider */
  .page-index__blog-slider {
    margin: 20px auto;
    padding: 0 10px;
  }

  .page-index__blog-slider-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .page-index__blog-slider-wrap {
    gap: 10px;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 18px;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__blog-slider-track {
    gap: 15px;
  }

  .page-index__post-item {
    flex: 0 0 100%; /* Single card on mobile */
  }

  .page-index__post-cover img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__post-date {
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .page-index__post-date-day {
    font-size: 16px;
  }

  .page-index__post-item h5 {
    font-size: 16px;
    margin: 12px 10px 6px;
  }

  .page-index__post-item p {
    font-size: 13px;
    margin: 0 10px 12px;
  }

  /* Universal Image Responsiveness for content area */
  .page-index__content-area img,
  .page-index__card img,
  .page-index__container img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Universal Button Responsiveness for content area */
  .page-index__cta-button,
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column; /* Ensure vertical stacking for buttons */
  }
}