/* General Styles */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #FFF3E6);
  background-color: var(--bg-color, #0D0E12);
}

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

.page-index__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--primary-color, #FF8C1A);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-top: 20px;
}

.page-index__section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary-color, #FFA53A);
  margin: 10px auto 0;
  border-radius: 2px;
}

.page-index__main-title {
  font-size: 3em;
  font-weight: 800;
  color: var(--text-main, #FFF3E6);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 20px;
  line-height: 1.2;
}

.page-index__intro-text {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: var(--text-main, #FFF3E6);
}

.page-index__brand-link {
  color: var(--primary-color, #FF8C1A);
  text-decoration: none;
  font-weight: bold;
}

.page-index__brand-link:hover {
  text-decoration: underline;
}

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

/* Hero Section */
.page-index__hero-section {
  padding-top: 10px; /* Aligns with shared body padding-top */
  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 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1250px;
  margin: 0 auto;
  padding: 30px 12px;
  box-sizing: border-box;
}

.page-index__btn-access-link {
  display: block;
  padding: 15px 20px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #FFF3E6;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-access-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-color, #FFB04D);
}

/* Brand Intro Section */
.page-index__brand-intro {
  max-width: 1250px;
  margin: 0 auto;
  padding: 20px 12px;
  box-sizing: border-box;
}

/* Category Lobby Section */
.page-index__category-lobby {
  padding: 60px 0;
  background-color: var(--background-color, #0D0E12);
}

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

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

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

/* Features Section */
.page-index__features-section {
  padding: 60px 0;
  background-color: var(--card-bg-color, #17191F);
}

.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-index__feature-item {
  text-align: center;
  padding: 20px;
  background-color: var(--background-color, #0D0E12);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #A84F0C);
  height: 100%; /* Ensure equal height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.page-index__feature-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  min-width: 200px;
  min-height: 200px;
  width: 200px;
  height: 200px;
}

.page-index__feature-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--primary-color, #FF8C1A);
  margin-bottom: 15px;
}

.page-index__feature-item p {
  color: var(--text-main, #FFF3E6);
  font-size: 0.95em;
  flex-grow: 1;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 0;
  background-color: var(--background-color, #0D0E12);
}

.page-index__promo-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-main, #FFF3E6);
  font-size: 1.1em;
}

.page-index__promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-index__promo-card {
  background-color: var(--card-bg-color, #17191F);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #A84F0C);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__promo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-index__promo-card h3 {
  font-size: 1.3em;
  color: var(--primary-color, #FF8C1A);
  padding: 15px 20px 10px;
  margin: 0;
}

.page-index__promo-card p {
  color: var(--text-main, #FFF3E6);
  padding: 0 20px 15px;
  font-size: 0.95em;
  flex-grow: 1;
}

.page-index__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
  color: #FFF3E6;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  margin: 0 20px 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px var(--glow-color, #FFB04D);
}

.page-index__center-button-wrapper {
  text-align: center;
  margin-top: 50px;
}

/* Blog Slider Section */
.page-index__blog-slider {
  padding: 60px 0;
  background-color: var(--card-bg-color, #17191F);
}

.page-index__slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 40px;
}

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

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

.page-index__post-item {
  flex: 0 0 calc(33.333% - 11px); /* 3 cards + 2 gaps */
  scroll-snap-align: start;
  background-color: var(--background-color, #0D0E12);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #A84F0C);
  position: relative;
  min-width: 300px;
}

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

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

.page-index__image-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary-color, #FF8C1A);
  color: #FFF3E6;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 600;
  z-index: 1;
}

.page-index__post-title {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--primary-color, #FF8C1A);
  padding: 15px 20px 10px;
  margin: 0;
}

.page-index__post-excerpt {
  font-size: 0.9em;
  color: var(--text-main, #FFF3E6);
  padding: 0 20px 15px;
  flex-grow: 1;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background-color: var(--primary-color, #FF8C1A);
  color: #FFF3E6;
  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 5px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease;
}

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

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

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background-color: var(--secondary-color, #FFA53A);
}

/* About Us Section */
.page-index__about-us-section {
  padding: 60px 0;
  background-color: var(--background-color, #0D0E12);
}

.page-index__about-content {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-index__about-text {
  flex: 1;
  color: var(--text-main, #FFF3E6);
}

.page-index__about-text p {
  margin-bottom: 20px;
  font-size: 1.05em;
}

.page-index__about-image {
  flex: 0 0 500px;
  max-width: 500px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #A84F0C);
}

.page-index__about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-index__btn-secondary {
  display: inline-block;
  background: #FFF3E6;
  color: var(--primary-color, #FF8C1A);
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--primary-color, #FF8C1A);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-secondary:hover {
  background: var(--primary-color, #FF8C1A);
  color: #FFF3E6;
  transform: translateY(-2px);
}

/* Contact Section */
.page-index__contact-section {
  padding: 60px 0;
  background-color: var(--card-bg-color, #17191F);
}

.page-index__contact-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--text-main, #FFF3E6);
  font-size: 1.1em;
}

.page-index__contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-index__contact-info-card {
  background-color: var(--background-color, #0D0E12);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #A84F0C);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__contact-info-title {
  font-size: 1.5em;
  color: var(--primary-color, #FF8C1A);
  margin-bottom: 15px;
}

.page-index__contact-info-card p {
  color: var(--text-main, #FFF3E6);
  font-size: 1em;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-index__main-title {
    font-size: 2.5em;
  }
  .page-index__features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-index__post-item {
    flex: 0 0 calc(50% - 8px); /* 2 cards + 1 gap */
  }
  .page-index__about-content {
    flex-direction: column;
    text-align: center;
  }
  .page-index__about-image {
    flex: none;
    max-width: 100%;
  }
  .page-index__about-text {
    text-align: center;
  }
  .page-index__btn-secondary {
    margin-top: 20px;
  }
  .page-index__contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@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,
  .page-index__hero-section,
  .page-index__access-links,
  .page-index__brand-intro,
  .page-index__category-lobby,
  .page-index__features-section,
  .page-index__promotions-section,
  .page-index__blog-slider,
  .page-index__about-us-section,
  .page-index__contact-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-index__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-index__intro-text {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* Module 1: Hero Banner */
  .page-index__hero-section {
    padding-top: 10px;
  }

  /* Module 2: Three Access Buttons */
  .page-index__access-links {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding: 20px 15px;
  }

  .page-index__btn-access-link {
    padding: 12px 15px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Module 4: Game Lobby Entrance */
  .page-index__category-lobby__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

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

  /* Module 5: Blog Card Slider */
  .page-index__slider-wrapper {
    margin-top: 30px;
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 30px;
    height: 30px;
    top: calc(50% + 10px); /* Adjust to avoid overlaying scrollbar */
  }

  .page-index__post-item {
    flex: 0 0 85% !important; /* Single card visible */
    min-width: unset;
  }

  .page-index__features-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .page-index__promo-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .page-index__about-content {
    gap: 20px;
  }

  .page-index__contact-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    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__center-button-wrapper {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 549px) {
  .page-index__category-lobby__grid {
    grid-template-columns: 1fr 1fr !important;
  }
}