/* style/index.css */
:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --card-bg: #111111;
  --background-color-dark: #0A0A0A; /* Assuming body background is dark from shared.css */
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --alert-color: #e74c3c;
}

.page-index {
  color: var(--text-main); /* Ensure text is light on dark background */
  background-color: var(--background-color-dark);
}

/* Module 1: Hero Slider */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, assuming body has header offset */
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__hero-slider-track {
  display: flex;
  width: 100%;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.page-index__hero-slider-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.page-index__hero-slider-slide.is-active {
  opacity: 1;
}
.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);
  max-width: 100%;
  box-sizing: border-box;
}
.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;
  max-width: 100%;
  box-sizing: border-box;
}
.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;
}
.page-index__hero-slider-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}
.page-index__hero-slider-dot.is-active {
  background: #fff;
}

/* Module 2: Spacing */
.page-index__spacing-medium {
  height: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Module 3: Promo Duo + CTA */
.page-index__promo-duo {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
.page-index__promo-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__promo-duo-col {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  padding-bottom: 20px;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__promo-duo-col img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  margin-bottom: 15px;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__promo-cta {
  display: block;
  width: calc(100% - 40px); /* Adjust for padding */
  margin: 0 20px;
  text-align: center;
  padding: 14px 20px;
  background: var(--button-gradient);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__promo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Module 4: Decorative Main Title (h1) */
.page-index__section-title {
  text-align: center;
  margin: 30px auto;
  max-width: 1250px;
  padding: 0 16px;
  box-sizing: border-box;
}
.page-index__section-title h1 {
  color: var(--secondary-color);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
  margin: 0;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Module 5: Long-form SEO Content (home_content) */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px;
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid var(--glow-color);
  border-radius: 15px;
  box-shadow: 0 0 20px var(--glow-color);
  background: rgba(17, 17, 17, 0.92); /* Darker background for readability on dark theme */
  color: var(--text-main);
}
.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; /* Example scrollbar color */
  border-radius: 20px;
  border: 3px solid var(--glow-color);
}
.page-index__home-content-inner h2 {
  color: var(--primary-color);
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.8em;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.3);
}
.page-index__home-content-inner h3 {
  color: var(--secondary-color);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.4em;
}
.page-index__home-content-inner p {
  margin-bottom: 10px;
  line-height: 1.6;
  font-size: 1.05em;
}
.page-index__home-content-inner strong.page-index__text-highlight {
  color: var(--primary-color);
}
.page-index__home-content-inner ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 10px;
  line-height: 1.6;
}
.page-index__home-content-inner li {
  margin-bottom: 5px;
}
.page-index__content-figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__content-figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__content-figure figcaption {
  color: var(--text-main);
  font-size: 0.9em;
  margin-top: 10px;
  line-height: 1.4;
}
.page-index__inline-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}
.page-index__inline-link:hover {
  text-decoration: underline;
}
.page-index__quick-links {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 20px;
  padding: 10px 0;
  background: rgba(255, 211, 107, 0.08);
  border-radius: 5px;
}
.page-index__quick-links .page-index__inline-link {
  margin: 0 8px;
}
.page-index__table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 10px;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Allow horizontal scroll on smaller screens */
  color: var(--text-main);
}
.page-index__table-wrapper th,
.page-index__table-wrapper td {
  border: 1px solid var(--border-color);
  padding: 12px;
  text-align: left;
}
.page-index__table-wrapper th {
  background-color: rgba(242, 193, 78, 0.2);
  font-weight: bold;
  color: var(--primary-color);
}

/* Module 6: Latest Articles / Blog Card Slider */
.page-index__blog-slider {
  max-width: 1250px;
  margin: 30px auto;
  padding: 20px 16px;
  box-sizing: border-box;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.page-index__blog-slider-title {
  text-align: center;
  color: var(--secondary-color);
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: 2em;
  text-shadow: 0 0 8px rgba(255, 211, 107, 0.4);
}
.page-index__blog-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
}
.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 */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #4C9BB6 var(--card-bg); /* Firefox */
}
.page-index__blog-slider-track::-webkit-scrollbar {
  height: 8px;
}
.page-index__blog-slider-track::-webkit-scrollbar-thumb {
  background-color: #4C9BB6;
  border-radius: 20px;
  border: 2px solid var(--card-bg);
}
.page-index__post-item {
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  box-sizing: border-box;
  background: var(--background-color-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.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;
}
.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}
.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: var(--primary-color);
  font-size: 0.9em;
}
.page-index__post-date-day {
  display: block;
  font-weight: 700;
  font-size: 1.1em;
}
.page-index__post-date-month {
  display: block;
  font-size: 0.8em;
  text-transform: uppercase;
}
.page-index__post-item h5 {
  text-align: center;
  color: var(--secondary-color);
  margin: 12px 8px 6px;
  font-size: 1.1em;
  line-height: 1.4;
}
.page-index__post-item p {
  text-align: center;
  color: var(--text-main);
  font-size: 0.9em;
  margin: 0 8px 12px;
  line-height: 1.5;
}
.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: var(--button-gradient);
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1.5em;
  line-height: 1;
  flex-shrink: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* General Image and Button Responsiveness */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}
.page-index a[class*="cta"],
.page-index a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-index__promo-duo-col,
.page-index__home-content-inner,
.page-index__blog-slider,
.page-index__table-wrapper {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* @media (max-width: 768px) - Mobile Specific Styles */
@media (max-width: 768px) {
  /* Module 1: Hero Slider */
  .page-index__hero-slider {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 20px;
    left: 5px;
    right: 5px;
  }
  .page-index__hero-slider-dots {
    bottom: 10px;
  }

  /* Module 3: Promo Duo */
  .page-index__promo-duo {
    padding: 0 10px;
  }
  .page-index__promo-duo-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 15px;
  }
  .page-index__promo-duo-col {
    padding-bottom: 15px;
  }
  .page-index__promo-cta {
    width: calc(100% - 30px);
    margin: 0 15px;
    padding: 12px 15px;
    font-size: 1em;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Module 4: Decorative Main Title */
  .page-index__section-title {
    margin: 20px auto;
    padding: 0 10px;
  }
  .page-index__section-title h1 {
    font-size: 1.8em; /* Adjust font size for mobile */
  }
}