.page-index {
  background-color: #0f0000; /* Deep dark background */
  color: #f0e6e6; /* Light text for contrast */
  font-family: Arial, sans-serif; /* Example font */
  line-height: 1.6;
}

/* Module 0: Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Small top padding as body handles header offset */
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-index__hero-image {
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

/* Module 1: H1 + SEO Long Text */
.page-index__content-section {
  padding: 20px 0;
  max-width: 1250px; /* Container width */
  margin: 0 auto;
  box-sizing: border-box;
}

.page-index__page-title {
  color: #e13923; /* Red accent for H1 */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1250px;
  margin: 24px auto 30px; /* Adjusted margin */
  padding: 0 15px;
  font-weight: 700;
  line-height: 1.2; /* Prevent large titles from occupying too much space */
  letter-spacing: 0.02em;
}

.page-index__page-title::before,
.page-index__page-title::after {
  content: '';
  width: 40px;
  height: 3px;
  background-color: #e13923;
  margin: 0 14px;
  flex-shrink: 1; /* Allow lines to shrink on smaller screens */
}

.page-index__title-main {
  white-space: normal; /* Allow text to wrap */
  text-shadow: 0 0 8px rgba(225, 57, 35, 0.5); /* Subtle glow */
}

.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: #e13923; /* Red accent for subheadings */
  margin-top: 30px;
  margin-bottom: 15px;
  line-height: 1.3;
  font-weight: 600;
}

.page-index__home-content h2 {
  font-size: 1.8em;
}

.page-index__home-content h3 {
  font-size: 1.5em;
}

.page-index__home-content p {
  margin-bottom: 1em;
}

.page-index__home-content a {
  color: #2995f3; /* Blue for links */
  text-decoration: underline;
}

.page-index__home-content a:hover {
  color: #6FA3FF; /* Lighter blue on hover */
}

.page-index__home-content strong {
  color: #f0e6e6; /* Ensure strong text is visible */
}

.page-index__home-content ul {
  list-style-type: disc;
  margin: 0 0 1em 20px;
  padding: 0;
}

.page-index__home-content li {
  margin-bottom: 0.5em;
}

.page-index__wp-caption {
  margin: 25px auto;
  text-align: center;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.page-index__wp-caption-text {
  font-size: 0.9em;
  color: #ccc;
  margin-top: 10px;
}

/* Module 2: Latest Blog Section */
.page-index__blog-section {
  padding: 40px 0;
  background-color: #1a0505; /* Slightly lighter dark background for blog section */
  box-sizing: border-box;
}

.page-index__blog-section-title {
  color: #e13923;
  text-align: center;
  margin: 0 0 30px;
  font-size: 2em;
  font-weight: 700;
  line-height: 1.2;
}

.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; /* Prevent wrapping for slider */
  gap: 20px;
  transition: transform 0.4s ease;
  padding-bottom: 10px; /* Space for scrollbar if needed */
}

.page-index__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* 3 columns with 20px gap */
  max-width: calc(33.333% - 14px);
  min-width: 0; /* Important for flex items */
  background-color: #0f0000; /* Card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__blog-slide:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-index__blog-card-link {
  text-decoration: none;
  display: block;
  color: inherit;
}

.page-index__blog-card-image {
  position: relative;
  padding-top: 56%; /* 16:9 aspect ratio (9/16 = 0.5625) */
  overflow: hidden;
}

.page-index__blog-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
}

.page-index__blog-card-body {
  text-align: center;
  padding: 18px 15px;
}

.page-index__blog-card-body h5 {
  color: #e13923; /* Red accent for card titles */
  margin: 0 0 10px;
  font-size: 1.2em;
  line-height: 1.3;
  font-weight: 600;
}

.page-index__blog-card-body p {
  color: #ccc; /* Lighter text for summary */
  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(225, 57, 35, 0.7); /* Red with transparency */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: none; /* Hidden by default, shown by JS */
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: #e13923;
}

.page-index__blog-slider-prev {
  left: 0;
  margin-left: -20px; /* Offset to show part of the button */
}

.page-index__blog-slider-next {
  right: 0;
  margin-right: -20px; /* Offset to show part of the button */
}

.page-index__blog-slider-prev::before {
  content: '‹';
}

.page-index__blog-slider-next::before {
  content: '›';
}

/* View All Button */
.page-index__view-all-button-container {
  text-align: center;
  margin-top: 30px;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__view-all-button,
.page-index__btn {
  display: inline-block;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom button color */
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__view-all-button:hover,
.page-index__btn:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  transform: translateY(-2px);
}

/* General button styling for links in long text */
.page-index__home-content a.page-index__btn {
  margin-top: 15px;
  padding: 8px 20px;
}


/* Responsive styles for mobile */
@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  /* HERO 主图区域 */
  .page-index__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 长文区 */
  .page-index__page-title {
    margin: 20px auto 25px !important;
    padding: 0 15px !important;
    font-size: 1.8em; /* Adjust H1 size for mobile */
  }
  .page-index__page-title::before,
  .page-index__page-title::after {
    width: 20px;
    margin: 0 8px;
  }
  .page-index__home-content {
    padding: 0 15px !important;
    margin-bottom: 25px !important;
  }
  .page-index__home-content h2 {
    font-size: 1.6em;
  }
  .page-index__home-content h3 {
    font-size: 1.3em;
  }
  .page-index__wp-caption img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 博客区 */
  .page-index__blog-section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
  }
  .page-index__blog-slider {
    padding: 0 15px !important;
    margin-bottom: 30px !important;
  }
}