/* General styles for page-index */
.page-index {
  color: var(--text-main, #FFF5E1); /* Default text color from custom palette */
  background: var(--background, #B71C1C); /* Default background from custom palette */
}

/* Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__hero-slider-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}
.page-index__hero-slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}
.page-index__hero-slider-slide.is-active {
  opacity: 1;
  z-index: 1;
}
.page-index__hero-slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.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: 2;
  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%);
  z-index: 2;
  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(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.page-index__hero-slider-dots button.is-active {
  background: #FFD86A; /* Button gradient start color */
  border-color: #FFD86A;
}

/* Promo Duo Section */
.page-index__promo-duo {
  margin: 30px auto;
  max-width: 1250px;
  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: var(--card-bg, #D32F2F);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 20px;
}
.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  margin-bottom: 20px;
}
.page-index__promo-cta {
  display: block;
  width: 100%;
  max-width: calc(100% - 40px); /* Adjust for padding */
  text-align: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: var(--deep-red, #7A0E0E); /* Text color for button */
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  margin: 0 20px;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__promo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Section Title 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: var(--gold, #F4D34D); /* Gold for H1 */
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  margin: 0;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* 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 var(--border, #F2B544); /* Border color from custom palette */
  border-radius: 15px;
  box-shadow: 0 0 20px var(--glow, #FFCC66); /* Glow color from custom palette */
  background: rgba(255, 255, 255, 0.92); /* Light background for readability */
  color: #333333; /* Dark text for readability on light background */
}
.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: var(--auxiliary-color, #E53935); /* Auxiliary color for scrollbar */
  border-radius: 20px;
  border: 3px solid var(--primary-color, #C91F17); /* Primary color for scrollbar border */
}
.page-index__home-content-inner h2 {
  color: var(--deep-red, #7A0E0E); /* Deep Red for H2 */
  margin-top: 25px;
  margin-bottom: 15px;
  text-align: center;
}
.page-index__home-content-inner h3 {
  color: var(--primary-color, #C91F17); /* Primary color for H3 */
  margin-top: 20px;
  margin-bottom: 10px;
}
.page-index__home-content-inner h5 {
  color: var(--auxiliary-color, #E53935);
}
.page-index__home-content-inner p {
  margin-bottom: 10px;
  line-height: 1.6;
}
.page-index__home-content-inner a {
  color: var(--primary-color, #C91F17);
  text-decoration: underline;
}
.page-index__home-content-inner a:hover {
  color: var(--auxiliary-color, #E53935);
}
.page-index__home-content-inner ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 10px;
}
.page-index__home-content-inner li {
  margin-bottom: 5px;
  line-height: 1.5;
}
.page-index__home-content-inner figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}
.page-index__home-content-inner figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.page-index__home-content-inner figcaption {
  font-style: italic;
  font-size: 0.9em;
  color: #666;
  margin-top: 8px;
}
.page-index__home-content-inner .page-index__table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.page-index__home-content-inner table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Ensure table is wide enough for content */
}
.page-index__home-content-inner table th,
.page-index__home-content-inner table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  color: #333333;
}
.page-index__home-content-inner table th {
  background-color: var(--card-bg, #D32F2F); /* Card BG for table header */
  color: var(--text-main, #FFF5E1); /* Text Main for table header */
  font-weight: bold;
}
.page-index__home-content-inner table tr:nth-child(even) {
  background-color: #f2f2f2;
}
.page-index__home-content-inner table tr:nth-child(odd) {
  background-color: #ffffff;
}

/* 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: var(--auxiliary-color, #E53935); /* Auxiliary color for title */
  text-transform: uppercase;
  font-size: 2em;
  margin-bottom: 25px;
}
.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: 15px; /* Space for scrollbar */
}
.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}
.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}
.page-index__blog-slider-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
}
.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: var(--card-bg, #D32F2F); /* Card BG for post item */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding-bottom: 15px;
}
.page-index__post-item a {
  text-decoration: none;
  color: var(--text-main, #FFF5E1); /* Text Main for post item text */
  display: block;
}
.page-index__post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  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;
}
.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #fff;
  border: 2px solid var(--primary-color, #C91F17); /* Primary color for date border */
  border-radius: 2px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: var(--primary-color, #C91F17); /* Primary color for date text */
  font-size: 0.9em;
}
.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(--gold, #F4D34D); /* Gold for post title */
  margin: 12px 8px 6px;
  font-size: 1.1em;
  line-height: 1.4;
}
.page-index__post-item p {
  text-align: center;
  color: var(--text-main, #FFF5E1); /* Text Main for post summary */
  font-size: 0.9em;
  margin: 0 8px 8px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  flex-shrink: 0;
  margin: 0 5px;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

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

/* Responsive styles for mobile */
@media (max-width: 768px) {
  /* Hero Slider */
  .page-index__hero-slider {
    padding-top: 10px !important; /* Ensure small padding */
  }
  .page-index__hero-slider-track {
    padding-bottom: 65%; /* Adjust aspect ratio for smaller screens if needed, e.g., 4:3 */
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 20px;
  }

  /* Promo Duo Section */
  .page-index__promo-duo {
    padding: 0 10px;
  }
  .page-index__promo-duo-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 15px;
  }
  .page-index__promo-cta {
    max-width: calc(100% - 30px) !important;
    width: 100% !important;
    padding: 12px 15px !important;
    margin: 0 15px !important;
    font-size: 1em;
  }
  .page-index__promo-duo-col img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Section Title H1 */
  .page-index__section-title {
    padding: 0 10px;
  }
  .page-index__section-title h1 {
    font-size: 1.8em; /* Smaller H1 on mobile */
  }

  /* Long-form SEO Content */
  .page-index__home-content {
    height: 60vh; /* Responsive height for scrollbox */
    min-height: 420px;
    max-height: 560px;
    margin: 16px 12px;
    border-width: 3px;
    padding: 5px;
  }
  .page-index__home-content-inner {
    padding: 8px 10px;
  }
  .page-index__home-content-inner h2 {
    font-size: 1.5em;
  }
  .page-index__home-content-inner h3 {
    font-size: 1.2em;
  }
  .page-index__home-content-inner table {
    display: block;
    overflow-x: auto;
    width: 100%; /* Ensure table takes full width of scroll container */
    min-width: unset; /* Allow table to shrink if content allows */
  }
  .page-index__home-content-inner table th,
  .page-index__home-content-inner table td {
    font-size: 0.9em;
    padding: 8px;
  }
  .page-index__home-content-inner figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Blog Card Slider */
  .page-index__blog-slider {
    padding: 0 10px;
  }
  .page-index__blog-slider-title {
    font-size: 1.5em;
  }
  .page-index__blog-slider-wrap {
    gap: 5px;
  }
  .page-index__blog-slider-track {
    gap: 15px;
  }
  .page-index__post-item {
    flex: 0 0 100%; /* One card per row on mobile */
  }
  .page-index__post-item h5 {
    font-size: 1em;
  }
  .page-index__post-item p {
    font-size: 0.8em;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    font-size: 20px;
    padding: 8px 12px;
  }
  .page-index__post-cover img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* General image and button responsiveness for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__promo-duo,
  .page-index__section-title,
  .page-index__blog-slider {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  .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 multiple buttons */
  }
}