.page-index {
  background-color: #B71C1C; /* Custom background color */
  color: #FFF5E1; /* Custom text color for dark background */
}

.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, not --header-offset */
  overflow: hidden;
  box-sizing: border-box;
}

.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%;
  opacity: 0;
  transition: opacity 0.5s 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, 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: 10;
  font-size: 24px;
  line-height: 1;
  border-radius: 4px;
}

.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-dots::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 4px 8px;
  margin: -4px -8px;
  z-index: -1;
}

.page-index__hero-slider-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

.page-index__hero-slider-dot.is-active {
  background: #fff;
}

.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: #D32F2F; /* Card BG color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding: 15px;
  box-sizing: border-box;
}

.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  margin-bottom: 15px;
  min-width: 200px;
  min-height: 200px;
}

.page-index__promo-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #ffffff; /* White text for gold button */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__promo-cta--alert {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
  color: #ffffff; /* White text for gold button */
}

.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 {
  font-size: clamp(2em, 4vw, 3.5em); /* Use clamp for h1 font-size */
  color: #FFF5E1; /* Main text color */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px;
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #F2B544; /* Border color */
  border-radius: 15px;
  box-shadow: 0 0 20px #FFCC66; /* Glow color */
  background: rgba(255, 255, 255, 0.92); /* Light background for readability */
  color: #333333; /* Dark text for 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: #F4D34D; /* Gold scrollbar thumb */
  border-radius: 20px;
  border: 3px solid #E6B800; /* Gold border */
}

.page-index__home-content-inner h2 {
  color: #C91F17; /* Main color for h2 */
  margin-top: 25px;
  margin-bottom: 15px;
}

.page-index__home-content-inner h3 {
  color: #E53935; /* Aux color for h3 */
  margin-top: 20px;
  margin-bottom: 10px;
}

.page-index__home-content-inner h4,
.page-index__home-content-inner h5,
.page-index__home-content-inner h6 {
  color: #7A0E0E; /* Deep Red for other headings */
  margin-top: 18px;
  margin-bottom: 8px;
}

.page-index__home-content-inner p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.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;
}

.page-index__home-content-inner figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

.page-index__home-content-inner figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  min-height: 200px;
}

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

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

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

.page-index__home-content-inner th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #C91F17;
}

.page-index__home-content-inner a {
  color: #E53935; /* Aux color for links */
  text-decoration: none;
}

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

.page-index__quick-link {
  font-weight: bold;
  color: #C91F17; /* Main color for quick links */
}

.page-index__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-index__cta-button--register {
  display: block;
  margin: 20px auto;
  max-width: 300px;
}

.page-index__table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
  color: #FFF5E1; /* Text Main color */
}

.page-index__blog-slider-title {
  text-align: center;
  color: #E53935; /* Aux color for title */
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: clamp(1.5em, 3vw, 2.5em);
  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;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari */
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #C91F17; /* Main color for buttons */
  color: #FFF5E1; /* Text Main color */
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #E53935; /* Aux color on hover */
}

.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 items with 20px gap */
  scroll-snap-align: start;
  box-sizing: border-box;
  background: #D32F2F; /* Card BG color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  min-width: 200px;
}

.page-index__post-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-index__post-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
}

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

.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #FFF5E1; /* Text Main color as background */
  border: 2px solid #F2B544; /* Border color */
  border-radius: 2px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: #C91F17; /* Main color for date text */
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.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 {
  color: #FFF5E1; /* Text Main color */
  margin: 12px 8px 6px;
  font-size: 18px;
  line-height: 1.4;
  min-height: 48px; /* Ensure consistent card height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-index__post-item p {
  color: #F4D34D; /* Gold color for summary */
  font-size: 14px;
  margin: 0 8px 12px;
  line-height: 1.5;
  min-height: 60px; /* Ensure consistent card height */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.page-index__home-content-inner table {
  display: table; /* Default for desktop */
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 20px;
  }
  .page-index__promo-duo-grid {
    gap: 15px;
  }
  .page-index__post-item {
    flex: 0 0 calc((100% - 20px) / 2); /* 2 items on tablet */
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

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

  /* Hero Slider */
  .page-index__hero-slider {
    padding-top: 10px !important; /* Ensure small padding */
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 6px 10px;
    font-size: 18px;
  }

  /* Promo Duo */
  .page-index__promo-duo {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__promo-duo-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 15px;
  }
  .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__promo-duo-col {
    padding: 10px;
  }

  /* Section Title */
  .page-index__section-title {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__section-title h1 {
    font-size: 1.8em; /* Smaller h1 on mobile */
  }

  /* Long SEO Content */
  .page-index__home-content {
    height: 60vh; /* Responsive height for scrolling box */
    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 table {
    display: block; /* Make table scrollable */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .page-index__home-content-inner th,
  .page-index__home-content-inner td {
    white-space: normal; /* Allow text wrapping within cells */
  }
  .page-index__home-content-inner figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__cta-button {
    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-button--register {
    max-width: 100% !important;
  }

  /* Blog Slider */
  .page-index__blog-slider {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__blog-slider-title {
    font-size: 1.4em;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .page-index__post-item {
    flex: 0 0 100%; /* Single item on mobile */
    padding-bottom: 10px;
  }
  .page-index__post-item h5 {
    font-size: 16px;
    min-height: 40px;
  }
  .page-index__post-item p {
    font-size: 13px;
    min-height: 50px;
  }

  /* General content areas and containers */
  .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;
  }

  /* Button containers */
  .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; /* Stack buttons vertically on mobile */
  }
}