/* General styles for the page content */
.page-index {
  background-color: #08162B; /* Deep Navy from customColors */
  color: #F3F8FF; /* Text Main from customColors */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 50px;
}

.page-index__container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__section-title,
.page-index__section-subtitle {
  text-align: center;
  color: #F3F8FF;
  margin-bottom: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.page-index__section-title--decorated .page-index__title-divider,
.page-index__section-subtitle--decorated .page-index__title-divider {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #1D5FD1, transparent);
}

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

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

/* Access Links Section */
.page-index__access-links-section {
  background-color: #08162B;
  padding: 30px 0;
}

.page-index__access-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-index__btn-access-link {
  display: block;
  padding: 15px 25px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button custom color */
  color: #F3F8FF;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-access-link:hover {
  background: linear-gradient(180deg, #4FA8FF 0%, #1D5FD1 100%); /* Glow on hover */
  box-shadow: 0 6px 15px rgba(79, 168, 255, 0.5);
  transform: translateY(-2px);
}

/* Brand Intro Section */
.page-index__brand-intro {
  padding: 40px 0;
  background-color: #08162B;
}

.page-index__main-title {
  font-size: 2.8em;
  font-weight: 700;
  line-height: 1.2;
  color: #F2C14E; /* Gold from customColors */
  text-align: center;
  margin-bottom: 20px;
  max-width: 100%;
}

.page-index__intro-text {
  font-size: 1.1em;
  color: #AFC4E8; /* Text Secondary from customColors */
  text-align: justify;
  margin-bottom: 20px;
}

/* Category Lobby Section */
.page-index__category-lobby {
  padding: 50px 0;
  background-color: #08162B;
}

.page-index__category-lobby__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  justify-content: center;
}

.page-index__category-card {
  display: block;
  border: none;
  box-shadow: none;
  outline: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.page-index__category-card-link {
  display: block;
  border: none;
  box-shadow: none;
  outline: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0;
  transition: transform 0.2s ease-in-out;
}

.page-index__category-card-link:hover {
  transform: translateY(-5px);
}

.page-index__category-card-link img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Blog Slider Section */
.page-index__blog-slider-section {
  padding: 50px 0;
  background-color: #08162B;
}

.page-index__blog-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 -15px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 10px 15px;
  box-sizing: border-box;
  scrollbar-width: none; /* Firefox */
}

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

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 items visible, accounting for gap */
  scroll-snap-align: start;
  background-color: #10233F; /* Card BG from customColors */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #244D84; /* Border from customColors */
  transition: transform 0.2s ease-in-out;
}

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

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

.page-index__post-image-wrapper {
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  overflow: hidden;
}

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

.page-index__post-content {
  padding: 15px;
  position: relative;
}

.page-index__post-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #F3F8FF; /* Text Main */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__post-excerpt {
  font-size: 0.9em;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-index__post-date {
  font-size: 0.85em;
  color: #AFC4E8;
  display: block;
  text-align: right;
  border-top: 1px solid #1B3357; /* Divider from customColors */
  padding-top: 10px;
}

.page-index__blog-slider-nav {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease;
  color: #F3F8FF;
}

.page-index__blog-slider-nav:hover {
  background: linear-gradient(180deg, #4FA8FF 0%, #1D5FD1 100%);
}

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

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

.page-index__blog-slider-nav svg {
  width: 20px;
  height: 20px;
}

.page-index__view-all-posts {
  text-align: center;
  margin-top: 40px;
}

.page-index__btn-view-all {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #F3F8FF;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.page-index__btn-view-all:hover {
  background: linear-gradient(180deg, #4FA8FF 0%, #1D5FD1 100%);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__main-title {
    font-size: 2.2em;
  }
  .page-index__intro-text {
    font-size: 1em;
  }
  .page-index__category-lobby__grid {
    gap: 12px;
  }
  .page-index__post-item {
    flex: 0 0 calc(50% - 8px); /* 2 items visible */
  }
  .page-index__blog-slider-prev {
    left: 10px;
  }
  .page-index__blog-slider-next {
    right: 10px;
  }
}

@media (max-width: 849px) {
  .page-index__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    max-height: none !important;
  }
}

@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !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;
  }

  .page-index__hero-section {
    padding-top: 10px;
  }

  .page-index__main-title {
    font-size: 1.8em;
    padding: 0 10px;
  }
  .page-index__intro-text {
    font-size: 0.95em;
    padding: 0 10px;
  }

  .page-index__access-links {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 15px;
  }
  .page-index__btn-access-link {
    font-size: 16px;
    padding: 12px 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .page-index__category-card-link img {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: contain;
  }
  .page-index__blog-slider-track {
    padding: 10px 15px;
  }
  .page-index__post-item {
    flex: 0 0 85%; /* 1 item visible + partial next */
  }
  .page-index__blog-slider-prev {
    left: 0;
  }
  .page-index__blog-slider-next {
    right: 0;
  }
  .page-index__blog-slider-nav {
    width: 35px;
    height: 35px;
  }
  .page-index__blog-slider-nav svg {
    width: 18px;
    height: 18px;
  }
  .page-index__blog-slider-wrapper {
    margin: 0;
  }
  .page-index__post-title {
    font-size: 1.1em;
  }
  .page-index__post-excerpt {
    font-size: 0.85em;
  }
  .page-index__btn-view-all {
    padding: 10px 25px;
    font-size: 1em;
  }
}

@media (max-width: 549px) {
  .page-index__category-lobby__grid {
    grid-template-columns: 1fr 1fr; /* Stay 2 columns */
  }
  .page-index__post-item {
    flex: 0 0 90%; /* Slightly wider for smaller screens */
  }
}