/* Base styles for the page */
.page-index {
  background-color: #0f0000;
  color: #f0e6e6;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* General link styling */
.page-index a {
  color: #2995f3;
  text-decoration: none;
}

.page-index a:hover {
  text-decoration: underline;
}

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

.page-index__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

/* Page Title (H1) Section */
.page-index__page-title {
  color: #e13923;
  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); /* Clamp for responsive H1 size */
}

.page-index__page-title::before,
.page-index__page-title::after {
  content: '';
  width: 40px;
  height: 3px;
  background-color: #e13923;
  margin: 0 14px;
}

/* Home Content Section (SEO Long-form) */
.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: #e13923;
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-index__home-content p {
  margin-bottom: 12px;
}

.page-index__home-content ul,
.page-index__home-content ol {
  margin-bottom: 12px;
  padding-left: 20px;
}

.page-index__home-content li {
  margin-bottom: 5px;
}

.page-index__home-content strong {
  color: #ffffff;
}

.page-index__wp-caption {
  text-align: center;
  margin: 20px auto;
  max-width: 800px; /* Limit max width of figure */
}

.page-index__wp-caption img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-index__wp-caption-text {
  font-style: italic;
  font-size: 0.9em;
  color: #ddd;
  margin-top: 8px;
}

/* Primary Button Style */
.page-index__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  transition: background 0.3s ease;
  margin-top: 20px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  text-decoration: none;
}

/* Blog Section */
.page-index__blog-section {
  padding: 40px 0;
  background-color: #0f0000;
}

.page-index__blog-section-title {
  color: #e13923;
  text-align: center;
  margin: 0 0 24px;
  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); /* 3 columns with 20px gap */
  max-width: calc(33.333% - 14px);
  min-width: 0;
  background-color: #1a0505;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.page-index__blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.page-index__blog-card-link:hover .page-index__blog-card-body h5 {
  text-decoration: underline;
}

.page-index__blog-card-image {
  position: relative;
  padding-top: 56%; /* Approx 800x450 aspect ratio */
  overflow: hidden;
}

.page-index__blog-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-index__blog-card-body {
  text-align: center;
  padding: 14px 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__blog-card-body h5 {
  color: #e13923;
  margin: 0 0 8px;
  font-size: 1.2em;
}

.page-index__blog-card-body p {
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 10px;
}

.page-index__blog-card-date {
  font-size: 0.8em;
  color: #888;
  margin-top: auto;
}

.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);
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.5em;
  line-height: 1;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: rgba(225, 57, 35, 0.9);
}

.page-index__blog-slider-prev {
  left: 0;
}

.page-index__blog-slider-next {
  right: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-index__blog-slide {
    flex: 0 0 calc(50% - 10px); /* 2 columns for tablets */
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  /* Hero Section Mobile */
  .page-index__hero-section {
    padding-top: 10px;
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* Page Title Mobile */
  .page-index__page-title {
    font-size: 1.8em; /* Adjust H1 size for mobile */
    margin-top: 16px;
    margin-bottom: 10px;
  }
  .page-index__page-title::before,
  .page-index__page-title::after {
    width: 20px;
    height: 2px;
    margin: 0 8px;
  }

  /* Home Content Mobile */
  .page-index__home-content {
    padding: 0 15px;
    margin-bottom: 20px;
  }
  .page-index__home-content h2,
  .page-index__home-content h3 {
    font-size: 1.4em;
    margin-top: 18px;
    margin-bottom: 10px;
  }
  .page-index__home-content p,
  .page-index__home-content li {
    font-size: 15px;
  }
  .page-index__wp-caption img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  /* Blog Section Mobile */
  .page-index__blog-section-title {
    font-size: 1.6em;
    margin-bottom: 18px;
  }
  .page-index__blog-slider {
    padding: 0 15px;
  }
  .page-index__blog-slider-track {
    flex-wrap: wrap; /* Allow cards to wrap */
    justify-content: center;
    gap: 15px;
    transform: translateX(0) !important; /* Reset transform for wrapping */
  }
  .page-index__blog-slide {
    flex: 0 0 100%; /* 1 column for mobile */
    max-width: 100%;
    margin-bottom: 15px;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: none; /* Hide slider arrows on mobile if cards wrap */
  }

  /* General Image & Container Mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .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 Mobile */
  .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-left: 15px;
    padding-right: 15px;
    margin: 10px auto !important;
  }
  .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;
    align-items: center;
  }
}