/* style/index.css */

/* General page styling */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background: #FFFFFF; /* Ensure consistency with body background */
}

.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-index a {
  color: #017439; /* Brand color for links */
  text-decoration: none;
}

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

/* Module 1: Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, relies on body padding-top for header offset */
  overflow: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

.page-index__hero-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.page-index__hero-slider-slide {
  flex: 0 0 100%;
  position: relative;
  display: none; /* Hidden by default */
}

.page-index__hero-slider-slide.is-active {
  display: block; /* Active slide */
}

.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,.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;
  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: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

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

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

/* Module 2: Spacing */
.page-index__spacing-30 {
  height: 30px;
  clear: both;
}

/* Module 3: Promo Duo + CTA */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 0 auto 30px;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__promo-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: flex-start;
}

.page-index__promo-duo-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  padding-bottom: 20px; /* Space for button */
  box-sizing: border-box;
}

.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px; /* Apply to img, not col */
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.page-index__promo-cta {
  display: block;
  width: calc(100% - 40px); /* Adjust for padding */
  max-width: 100%;
  text-align: center;
  padding: 14px 20px;
  background: #C30808; /* Alert color for CTA */
  color: #FFFF00; /* Login/Register font color */
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  margin: 0 20px; /* Center button within column */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  transition: background-color 0.3s ease;
}

.page-index__promo-cta:hover {
  background: #a80707;
  text-decoration: none;
}

/* Module 4: Decorative H1 */
.page-index__section-title {
  text-align: center;
  margin: 30px auto;
  max-width: 1250px;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #017439; /* Brand color for H1 */
  margin: 0;
  /* No fixed font-size, rely on natural flow or clamp if needed */
}

/* Module 5: Long SEO Content */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px; /* Fixed height for desktop */
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #FFFFFF; /* White border */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.1); /* Subtle shadow for contrast */
  background: rgba(255, 255, 255, 0.92); /* Slightly transparent white background */
  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: #4C9BB6; /* Light blue/green for scrollbar thumb */
  border-radius: 20px;
  border: 3px solid #FFFFFF; /* White border for thumb */
}

.page-index__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.page-index__home-content-inner h2,
.page-index__home-content-inner h3 {
  color: #017439; /* Brand color for subheadings */
  margin-top: 25px;
  margin-bottom: 15px;
  text-align: left; /* Ensure alignment */
}

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

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

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

.page-index__home-content-inner .page-index__quick-links {
  text-align: center;
  font-style: italic;
  font-size: 0.9em;
  margin-top: 20px;
  margin-bottom: 20px;
}

.page-index__home-content-inner .page-index__quick-links a {
  color: #017439;
  font-weight: bold;
}

.page-index__home-content-inner .page-index__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  padding-left: 0;
}

.page-index__home-content-inner .page-index__list li {
  margin-bottom: 8px;
}

.page-index__figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

.page-index__figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-index__figure figcaption {
  font-style: italic;
  font-size: 0.9em;
  color: #666;
  margin-top: 10px;
}

.page-index__table-container {
  overflow-x: auto; /* For responsive tables */
  margin-bottom: 20px;
}

.page-index__table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.page-index__table th,
.page-index__table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

.page-index__table th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #017439;
}

/* Module 6: Blog Card Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.page-index__blog-slider-title {
  text-align: center;
  color: #017439; /* Brand color for title */
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: 2em;
}

.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;
  padding-bottom: 10px; /* Space for scrollbar */
}

/* Hide scrollbar for aesthetic purposes, but keep functionality */
.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}
.page-index__blog-slider-track::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}
.page-index__blog-slider-track::-webkit-scrollbar-thumb:hover {
  background: #555;
}


.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #017439; /* Brand color for arrows */
  color: #FFFFFF;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #005a2e;
}

.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 cards on desktop with 20px gap */
  scroll-snap-align: start;
  box-sizing: border-box;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.2s ease-in-out;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
}

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

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

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