/* General styles for the main content area */
.page-content.page-index {
  background-color: #140C0C; /* Defined background color */
  color: #FFF1E8; /* Main text color for dark background */
  font-family: 'Lato', sans-serif; /* Example font */
  box-sizing: border-box;
}

/* Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  max-width: 1200px; /* Content max width */
  margin: 0 auto;
  box-sizing: border-box;
}
.page-index__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Slight rounded corners for aesthetic */
  overflow: hidden;
}

/* Service Grid Section */
.page-index__service-section {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  box-sizing: border-box;
}
.page-index__service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* Desktop: 4 columns */
  gap: 16px;
  width: 100%;
}
.page-index__service-item {
  min-width: 0;
  background-color: #2A1212; /* Card BG */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.page-index__service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.page-index__service-link {
  display: block;
  text-decoration: none;
}
.page-index__service-item img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* Long Content Section */
.page-index__content-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 15px;
  box-sizing: border-box;
}
.page-index__page-title {
  text-align: center;
  color: #F3C54D; /* Gold color for main title */
  margin: 30px 0 25px;
  font-size: clamp(24px, 3.5vw, 42px); /* H1 size constraint */
  font-weight: 700;
  line-height: 1.2;
}
.page-index__home-content {
  color: #FFF1E8; /* Main text color */
  line-height: 1.7;
  font-size: 16px;
}
.page-index__home-content h2 {
  color: #F3C54D; /* Gold for H2 */
  margin: 28px 0 12px;
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 600;
}
.page-index__home-content h3 {
  color: #F3C54D; /* Gold for H3 */
  margin: 24px 0 10px;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 600;
}
.page-index__home-content p {
  margin-bottom: 1em;
}
.page-index__home-content a {
  color: #FFB04A; /* Link color from button gradient start */
  text-decoration: none;
  font-weight: 500;
}
.page-index__home-content a:hover {
  text-decoration: underline;
}
.page-index__home-content strong {
  color: #F3C54D; /* Highlight strong text with Gold */
}
.page-index__home-content ul,
.page-index__home-content ol {
  margin-bottom: 1em;
  padding-left: 20px;
}
.page-index__home-content li {
  margin-bottom: 0.5em;
}
.page-index__home-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background-color: #2A1212; /* Card BG for table */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 8px;
  overflow: hidden; /* For rounded corners */
}
.page-index__home-content th,
.page-index__home-content td {
  border: 1px solid #6A1E1E; /* Border color */
  padding: 12px 15px;
  vertical-align: top;
  text-align: left;
  color: #FFF1E8; /* Text Main color */
}
.page-index__home-content th {
  background-color: #7E0D0D; /* Deep Red for table headers */
  font-weight: 600;
  color: #FFF1E8;
}

.page-index__figure {
  margin: 20px 0;
  text-align: center;
}
.page-index__figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
.page-index__figure figcaption {
  font-size: 14px;
  color: #BBB;
  margin-top: 8px;
}

/* Partner Section */
.page-index__partner-section {
  max-width: 1200px;
  margin: 40px auto 60px;
  padding: 0 15px;
  text-align: center;
  box-sizing: border-box;
}
.page-index__partner-title {
  color: #F3C54D; /* Gold for partner title */
  font-size: clamp(20px, 2.8vw, 32px);
  margin-bottom: 15px;
  font-weight: 600;
}
.page-index__partner-description {
  color: #FFF1E8;
  font-size: 16px;
  line-height: 1.6;
}

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

/* Media Queries for Mobile */
@media (max-width: 768px) {
  /* Hero Section Mobile */
  .page-index__hero-section {
    padding-top: 10px; /* Ensure small top padding */
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Service Grid Section Mobile (2x2) */
  .page-index__service-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }
  .page-index__service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columns on mobile */
    gap: 12px;
  }
  .page-index__service-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Long Content Section Mobile */
  .page-index__content-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }
  .page-index__page-title {
    font-size: clamp(20px, 6vw, 32px); /* Adjust H1 size for mobile */
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .page-index__home-content {
    font-size: 15px;
    line-height: 1.6;
  }
  .page-index__home-content h2 {
    font-size: clamp(18px, 5vw, 28px);
    margin: 20px 0 10px;
  }
  .page-index__home-content h3 {
    font-size: clamp(16px, 4.5vw, 24px);
    margin: 18px 0 8px;
  }
  .page-index__home-content table {
    display: block; /* Make table scrollable or stack */
    overflow-x: auto; /* Enable horizontal scrolling for tables */
    white-space: nowrap; /* Prevent content from wrapping */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    border-radius: 0; /* Remove rounded corners for full scroll */
  }
  .page-index__home-content table th,
  .page-index__home-content table td {
    white-space: normal; /* Allow text to wrap within cells */
  }
  .page-index__figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Partner Section Mobile */
  .page-index__partner-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
    margin: 30px auto 40px;
  }
  .page-index__partner-title {
    font-size: clamp(18px, 5vw, 28px);
  }
  .page-index__partner-description {
    font-size: 15px;
  }

  /* Universal image and container responsive styles for mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container { /* General containers */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons (if any) - applying general button responsive rules */
  .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;
    margin-bottom: 10px; /* Add some space between stacked buttons */
  }
  .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; /* Allow buttons to wrap */
    gap: 10px; /* Space between buttons if they wrap */
    display: flex; /* Ensure flex context for wrap */
    flex-direction: column; /* Stack buttons vertically on mobile */
  }
}