/* style/index.css */

:root {
  --primary-color: #E53935;
  --secondary-color: #FF5A4F;
  --card-bg: #FFFFFF;
  --background-color: #F5F7FA;
  --text-main-color: #333333;
  --border-color: #E0E0E0;
  --button-gradient: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
}

.page-index {
  color: var(--text-main-color);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
}

/* Module 1: Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding */
  overflow: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}
.page-index__hero-slider-track {
  display: flex;
  width: 100%;
  height: auto;
  transition: transform 0.6s ease-in-out;
}
.page-index__hero-slider-slide {
  flex: 0 0 100%;
  width: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}
.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);
  max-width: 100%;
  box-sizing: border-box;
}
.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;
  font-size: 24px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.page-index__hero-slider-prev:hover,
.page-index__hero-slider-next:hover {
  background: rgba(0, 0, 0, 0.7);
}
.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;
  z-index: 10;
}
.page-index__hero-slider-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.page-index__hero-slider-dot.is-active {
  background: #fff;
}

/* Module 2: Spacing */
.page-index__spacing-medium {
  margin-bottom: 30px;
}

/* Module 3: Promo Duo */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 0 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;
  align-items: center;
}
.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__promo-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  background: var(--button-gradient);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: opacity 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;
}

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

/* Module 5: Long SEO Text */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px;
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid var(--secondary-color);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 90, 79, 0.5);
  background: rgba(255, 255, 255, 0.92);
}
.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; /* Light blue/cyan for scrollbar thumb */
  border-radius: 20px;
  border: 3px solid var(--secondary-color);
}
.page-index__home-content-inner h2.page-index__h2-title {
  color: var(--primary-color);
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 24px;
}
.page-index__home-content-inner h3.page-index__h3-title {
  color: var(--secondary-color);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 20px;
}
.page-index__home-content-inner p {
  margin-bottom: 10px;
  color: var(--text-main-color);
}
.page-index__home-content-inner .page-index__ul-list {
  list-style: disc inside;
  margin-bottom: 10px;
  padding-left: 20px;
  color: var(--text-main-color);
}
.page-index__home-content-inner .page-index__ul-list li {
  margin-bottom: 5px;
}
.page-index__content-figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}
.page-index__content-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__content-figure figcaption {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}
.page-index__table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.page-index__content-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.page-index__content-table th,
.page-index__content-table td {
  border: 1px solid var(--border-color);
  padding: 10px;
  text-align: left;
  color: var(--text-main-color);
}
.page-index__content-table th {
  background-color: #f0f0f0;
  font-weight: bold;
  color: #555;
}
.page-index__inline-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
}
.page-index__inline-link:hover {
  color: var(--secondary-color);
}

/* Module 6: Blog 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: var(--secondary-color);
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: 28px;
}
.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; /* For scrollbar visibility */
}
.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}
.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  border-radius: 4px;
}
.page-index__blog-slider-track::-webkit-scrollbar-track {
  background-color: #f0f0f0;
}
.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.page-index__post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.page-index__post-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-bottom: 15px;
}
.page-index__post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  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;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: var(--primary-color);
  font-weight: bold;
}
.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: var(--primary-color);
  margin: 12px 8px 6px;
  font-size: 18px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.page-index__post-item p {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin: 0 8px 8px;
  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: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: var(--secondary-color);
}

/* General Image and Button Responsive Styles (Important for all images and buttons) */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}
.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__promo-duo-grid,
.page-index__button-group,
.page-index__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Responsive Styles for Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .page-index {
    font-size: 15px;
    line-height: 1.5;
  }
  
  /* 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;
  }

  /* Promo Duo */
  .page-index__promo-duo {
    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 {
    padding: 12px 15px;
    font-size: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Decorative H1 */
  .page-index__section-title {
    font-size: clamp(20px, 6vw, 32px);
    margin: 20px auto;
    padding: 0 10px;
  }

  /* Long SEO Text */
  .page-index__home-content {
    height: 60vh;
    min-height: 420px;
    max-height: 560px;
    margin: 16px 12px;
    border-width: 3px;
    padding: 8px;
  }
  .page-index__home-content-inner {
    padding: 10px;
  }
  .page-index__home-content-inner h2.page-index__h2-title {
    font-size: 20px;
  }
  .page-index__home-content-inner h3.page-index__h3-title {
    font-size: 18px;
  }
  .page-index__content-figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__table-wrapper {
    overflow-x: auto;
  }
  .page-index__content-table {
    min-width: 500px; /* Ensure table content is scrollable if wider */
  }

  /* Blog 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: 5px;
  }
  .page-index__blog-slider-track {
    gap: 15px;
  }
  .page-index__post-item {
    flex: 0 0 100%;
  }
  .page-index__post-cover img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__post-item h5 {
    font-size: 16px;
    -webkit-line-clamp: 3;
  }
  .page-index__post-item p {
    font-size: 13px;
    -webkit-line-clamp: 4;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    padding: 6px 10px;
    font-size: 18px;
  }

  /* General Image and Button Overrides for Mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index a[class*="button"],
  .page-index a[class*="btn"],
  .page-index__promo-cta {
    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;
  }
  .page-index__cta-buttons {
    display: flex;
    flex-direction: column; /* Ensure vertical stacking for multiple buttons */
  }
}