/* style/index.css */

/* Base styles for page-index to ensure text contrast on dark body background */
.page-index {
  color: #F3F8FF; /* Light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 30px;
}

/* --- Module 1: Hero Slider --- */
.page-index__hero-slider {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding-top */
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.page-index__hero-slider-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  position: relative;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.page-index__hero-slider-slide {
  flex-shrink: 0;
  width: 100%;
  transition: transform 0.5s ease-in-out;
  display: none;
}

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

.page-index__hero-slider-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 4px;
}

.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;
  font-size: 24px;
  z-index: 10;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.page-index__hero-slider-prev:hover,
.page-index__hero-slider-next:hover {
  background: rgba(0, 0, 0, 0.7);
}

.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;
  transition: background-color 0.3s ease;
}

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

/* --- Module 2: Spacing (handled by margin-top/bottom on adjacent sections) --- */

/* --- Module 3: Dual Promo Section --- */
.page-index__promo-duo {
  margin-top: 30px;
  margin-bottom: 30px;
  max-width: 1250px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
  box-sizing: border-box;
}

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

.page-index__promo-duo-col {
  background: #10233F; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.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);
}

.page-index__promo-cta {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button color */
  color: #F3F8FF;
  text-align: center;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  font-weight: bold;
  font-size: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.page-index__promo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.page-index__promo-cta--alert {
  background: linear-gradient(180deg, #F2C14E 0%, #E0A800 100%); /* Gold color for alert CTA */
  color: #08162B;
  border: none;
}

.page-index__promo-cta--alert:hover {
  background: linear-gradient(180deg, #FFD700 0%, #F2C14E 100%);
}

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

.page-index__section-title h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #F3F8FF; /* Text Main */
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(79, 168, 255, 0.5); /* Glow */
}

/* --- Module 5: Long SEO Content (Fixed Height Scroll Box) --- */
.page-index__home-content {
  max-width: 900px;
  margin: 24px auto;
  height: 700px;
  padding: 10px;
  box-sizing: border-box;
  border: 5px solid #1D5FD1; /* Auxiliary color */
  border-radius: 15px;
  box-shadow: 0 0 20px #1D5FD1;
  background: #10233F; /* Card BG for content background */
  color: #AFC4E8; /* Text Secondary for general content */
}

.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; /* Custom scrollbar thumb */
  border-radius: 20px;
  border: 3px solid #1D5FD1;
}

.page-index__home-content-inner h2 {
  color: #F3F8FF; /* Text Main */
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 1.8em;
  text-shadow: 0 0 5px rgba(79, 168, 255, 0.3);
}

.page-index__home-content-inner h3 {
  color: #F3F8FF; /* Text Main */
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.4em;
}

.page-index__home-content-inner p {
  margin-bottom: 10px;
  color: #AFC4E8; /* Text Secondary */
}

.page-index__home-content-inner a {
  color: #F2C14E; /* Gold for links */
  text-decoration: none;
  font-weight: bold;
}

.page-index__home-content-inner a:hover {
  text-decoration: underline;
}

.page-index__home-content-inner ul,
.page-index__home-content-inner ol {
  margin-left: 20px;
  margin-bottom: 10px;
  color: #AFC4E8; /* Text Secondary */
}

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

.page-index__home-content-inner figure {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

.page-index__home-content-inner figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__home-content-inner figcaption {
  font-size: 0.9em;
  color: #AFC4E8;
  margin-top: 8px;
}

.page-index__table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #244D84; /* Border color */
  border-radius: 8px;
}

.page-index__home-content-inner table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Ensure table is wide enough for desktop */
}

.page-index__home-content-inner th,
.page-index__home-content-inner td {
  border: 1px solid #244D84; /* Border color */
  padding: 12px;
  text-align: left;
  color: #AFC4E8;
}

.page-index__home-content-inner th {
  background-color: #1B3357; /* Divider color for header */
  font-weight: bold;
  color: #F3F8FF;
}

.page-index__home-content-inner tr:nth-child(even) {
  background-color: rgba(27, 51, 87, 0.3); /* Slightly lighter row */
}

.page-index__quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.page-index__quick-link {
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    color: #F3F8FF;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.page-index__quick-link:hover {
    background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
}


/* --- Module 6: Latest Articles / 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: #F3F8FF; /* Text Main */
  text-transform: uppercase;
  margin-bottom: 25px;
  font-size: 2em;
  text-shadow: 0 0 8px rgba(79, 168, 255, 0.3);
}

.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;
  scrollbar-width: none; /* Firefox */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: #113B7A; /* Primary color */
  color: #F3F8FF;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background-color 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: #1D5FD1; /* Auxiliary color */
}

.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: #10233F; /* Card BG */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

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

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

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

.page-index__post-date {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #F2C14E; /* Gold */
  border: 2px solid #113B7A; /* Primary color */
  border-radius: 4px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  color: #08162B; /* Deep Navy for text on Gold */
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.page-index__post-date-day {
  display: block;
  font-weight: 700;
  font-size: 16px;
}

.page-index__post-date-month {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}

.page-index__post-item h5 {
  color: #F3F8FF; /* Text Main */
  margin: 12px 15px 6px;
  font-size: 1.1em;
  line-height: 1.4;
  text-align: left;
  flex-grow: 1;
}

.page-index__post-item p {
  color: #AFC4E8; /* Text Secondary */
  font-size: 0.9em;
  margin: 0 15px 15px;
  text-align: left;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    padding: 8px 12px;
    font-size: 20px;
  }

  .page-index__promo-duo-grid {
    gap: 15px;
  }

  .page-index__promo-cta {
    font-size: 16px;
    padding: 12px 15px;
  }

  .page-index__section-title h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
  }

  .page-index__home-content {
    height: 600px;
    margin: 20px auto;
    padding: 8px;
    border-width: 4px;
  }

  .page-index__home-content-inner {
    padding: 10px 14px;
  }

  .page-index__home-content-inner th,
  .page-index__home-content-inner td {
    padding: 10px;
  }

  .page-index__blog-slider-title {
    font-size: 1.8em;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .page-index__post-item {
    flex: 0 0 calc((100% - 30px) / 2); /* 2 cards on tablet */
  }
}

@media (max-width: 768px) {
  /* Universal image, button, and container responsiveness */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__promo-duo,
  .page-index__blog-slider {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__cta-button,
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index a[class*="btn"],
  .page-index__promo-cta,
  .page-index__quick-link {
    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;
  }

  .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;
  }

  /* --- Module 1: Hero Slider --- */
  .page-index__hero-slider {
    padding-top: 10px !important; /* Retain small top padding */
  }

  .page-index__hero-slider-prev,
  .page-index__hero-slider-next {
    width: 30px;
    height: 30px;
    font-size: 18px;
    padding: 5px;
  }

  .page-index__hero-slider-dots {
    bottom: 10px;
  }

  /* --- Module 3: Dual Promo Section --- */
  .page-index__promo-duo-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 15px;
  }

  .page-index__promo-cta {
    font-size: 16px;
    padding: 12px 15px;
    border-radius: 0 0 8px 8px;
  }

  /* --- Module 4: Decorative Main Title (H1) --- */
  .page-index__section-title h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin: 20px auto;
  }

  /* --- Module 5: Long SEO Content (Fixed Height Scroll Box) --- */
  .page-index__home-content {
    height: 60vh; /* Responsive height for mobile */
    min-height: 420px;
    max-height: 560px;
    margin: 16px 12px;
    border-width: 3px;
    padding: 5px;
  }

  .page-index__home-content-inner {
    padding: 10px;
  }

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

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

  .page-index__home-content-inner th,
  .page-index__home-content-inner td {
    padding: 8px;
    font-size: 0.9em;
  }

  .page-index__table-wrapper {
    overflow-x: auto; /* Allow horizontal scroll for tables */
    -webkit-overflow-scrolling: touch;
  }

  .page-index__home-content-inner table {
    min-width: 450px; /* Ensure table is scrollable but readable */
  }

  .page-index__quick-link {
    flex-basis: 100%;
  }

  /* --- Module 6: Latest Articles / Blog Card Slider --- */
  .page-index__blog-slider-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .page-index__post-item {
    flex: 0 0 100%; /* Single card on mobile */
  }

  .page-index__post-item h5 {
    font-size: 1em;
    margin: 10px 10px 5px;
  }

  .page-index__post-item p {
    font-size: 0.85em;
    margin: 0 10px 10px;
  }

  .page-index__post-date {
    padding: 3px 6px;
  }

  .page-index__post-date-day {
    font-size: 14px;
  }

  .page-index__post-date-month {
    font-size: 10px;
  }
}