/* Base styles for the page, ensuring proper contrast on dark background */
.page-index {
  background-color: #0D0E12; /* Custom background color */
  color: #FFF3E6; /* Main text color for readability on dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, not var(--header-offset) */
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.page-index__hero-image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.page-index__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Page Title (H1) */
.page-index__page-title {
  color: #e13923; /* Primary red for titles */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1250px;
  margin: 24px auto 16px;
  padding: 0 15px;
  font-weight: 700;
  font-size: clamp(1.8em, 4vw, 2.8em); /* Example using clamp for responsive H1 */
  line-height: 1.2;
}
.page-index__page-title::before,
.page-index__page-title::after {
  content: '';
  width: 40px;
  height: 3px;
  background-color: #e13923;
  margin: 0 14px;
}
.page-index__title-main {
  white-space: nowrap;
}

/* Home Content (SEO Long Text Area) */
.page-index__content-section {
  padding: 20px 0;
}
.page-index__home-content {
  max-width: 1250px;
  margin: 0 auto 36px;
  padding: 0 15px;
  box-sizing: border-box;
  line-height: 1.7;
}
.page-index__home-content h2,
.page-index__home-content h3 {
  color: #FF8C1A; /* Primary orange for subheadings */
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 600;
}
.page-index__home-content h2 {
  font-size: 2em;
}
.page-index__home-content h3 {
  font-size: 1.5em;
}
.page-index__home-content p {
  margin-bottom: 1em;
  color: #FFF3E6; /* Main text color */
}
.page-index__home-content a {
  color: #2995f3; /* Link color */
  text-decoration: none;
}
.page-index__home-content a:hover {
  text-decoration: underline;
}
.page-index__home-content strong {
  color: #FFA53A; /* Highlight important text */
}
.page-index__wp-caption {
  text-align: center;
  margin: 20px auto;
  max-width: 800px; /* Constrain image width */
  width: 100%;
}
.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
.page-index__wp-caption-text {
  font-style: italic;
  font-size: 0.9em;
  color: #A84F0C; /* Border color for caption text */
  margin-top: 8px;
}

/* Table styles for FAQs */
.page-index__faq-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background-color: #17191F; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
}
.page-index__faq-table th,
.page-index__faq-table td {
  border: 1px solid #A84F0C; /* Border color */
  padding: 12px 15px;
  text-align: left;
  color: #FFF3E6;
}
.page-index__faq-table th {
  background-color: #D96800; /* Deep Orange for table header */
  font-weight: bold;
  color: #FFF3E6;
}
.page-index__faq-table h3 {
  margin: 0; /* Reset margin for h3 inside table */
  color: #FFF3E6; /* Ensure h3 in table is visible */
  font-size: 1em;
}

/* CTA Buttons within content */
.page-index__cta-buttons {
  text-align: center;
  margin-top: 30px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button gradient */
  color: #FFF3E6; /* Button text color */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
}

/* Blog Section */
.page-index__blog-section {
  padding: 40px 0;
  background-color: #0D0E12;
}
.page-index__blog-section-title {
  color: #e13923;
  text-align: center;
  margin: 0 0 24px;
  font-size: 2.2em;
  font-weight: 700;
}
.page-index__blog-slider {
  position: relative;
  overflow: hidden;
  max-width: 1250px;
  margin: 0 auto 40px;
  padding: 0 15px;
  box-sizing: border-box;
}
.page-index__blog-slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.4s ease;
}
.page-index__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* Desktop 3 columns */
  max-width: calc(33.333% - 14px);
  min-width: 0;
  background-color: #17191F; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.page-index__blog-card-link {
  text-decoration: none;
  display: block;
  color: inherit;
}
.page-index__blog-card-image {
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}
.page-index__blog-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.page-index__blog-card-link:hover .page-index__blog-card-image img {
  transform: scale(1.05);
}
.page-index__blog-card-body {
  text-align: center;
  padding: 14px 10px;
}
.page-index__blog-card-body h5 {
  color: #FFA53A; /* Auxiliary orange for card titles */
  margin: 0 0 8px;
  font-size: 1.2em;
  line-height: 1.3;
}
.page-index__blog-card-body p {
  color: #FFF3E6;
  font-size: 0.9em;
  line-height: 1.5;
  margin-bottom: 0;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  color: #FFF3E6;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  z-index: 10;
  transition: background-color 0.3s ease;
}
.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: rgba(255, 255, 255, 0.4);
}
.page-index__blog-slider-prev {
  left: 0;
}
.page-index__blog-slider-next {
  right: 0;
}
.page-index__blog-slider-prev::before {
  content: '‹';
}
.page-index__blog-slider-next::before {
  content: '›';
}
.page-index__view-all-button-container {
  text-align: center;
  margin-top: 30px;
}

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

/* Mobile responsiveness (max-width: 768px) */
@media (max-width: 768px) {
  .page-index {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Hero Section */
  .page-index__hero-section {
    padding-top: 10px; /* Still small padding for mobile */
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Page Title (H1) */
  .page-index__page-title {
    flex-direction: column;
    margin: 15px auto 10px;
    font-size: 1.8em; /* Adjusted H1 font size for mobile */
  }
  .page-index__page-title::before,
  .page-index__page-title::after {
    width: 20px;
    height: 2px;
    margin: 10px 0;
  }
  .page-index__title-main {
    white-space: normal; /* Allow H1 to wrap on mobile */
  }

  /* Home Content */
  .page-index__home-content {
    padding: 0 15px;
    margin-bottom: 20px;
  }
  .page-index__home-content h2 {
    font-size: 1.5em;
  }
  .page-index__home-content h3 {
    font-size: 1.2em;
  }
  .page-index__wp-caption {
    padding: 0 15px;
    box-sizing: border-box;
  }
  .page-index__wp-caption img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__faq-table {
    overflow-x: auto; /* Allow table to scroll horizontally if content is too wide */
    display: block; /* Ensures overflow-x works */
    white-space: nowrap; /* Keep table content in one line */
  }
  .page-index__faq-table thead, .page-index__faq-table tbody, .page-index__faq-table tr {
    display: block;
    width: 100%;
  }
  .page-index__faq-table th, .page-index__faq-table td {
    white-space: normal; /* Allow text wrapping within cells */
    width: auto; /* Adjust width automatically */
    box-sizing: border-box;
  }

  /* CTA Buttons */
  .page-index__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 10px;
    padding: 0 15px;
    box-sizing: border-box;
  }
  .page-index__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 15px;
  }

  /* Blog Section */
  .page-index__blog-section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-index__blog-slider {
    padding: 0 15px;
  }
  .page-index__blog-slider-track {
    flex-direction: column; /* Stack blog cards vertically */
    gap: 15px;
  }
  .page-index__blog-slide {
    flex: 0 0 100%; /* Mobile 1 column */
    max-width: 100%;
  }
  .page-index__blog-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Hide navigation buttons on mobile if stacking */
  }
  .page-index__view-all-button-container {
    padding: 0 15px;
    box-sizing: border-box;
  }
}

/* General image and container rules for mobile responsiveness */
@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__home-content,
  .page-index__blog-slider {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}