/* style/index.css */

/* --- Base Styles --- */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: var(--accent-color); /* Inherits from shared.css, which is #017439 */
}

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

.page-index__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #ffffff; /* Default for dark background */
}

.page-index__section-title--light {
  color: #ffffff; /* For sections with dark background */
}

.page-index__text-block {
  font-size: 18px;
  text-align: center;
  margin-bottom: 30px;
  color: #ffffff; /* Default for dark background */
}

.page-index__text-block--light {
  color: #ffffff; /* For sections with dark background */
}

/* --- Color Contrast Handling --- */
.page-index__light-bg {
  background-color: #ffffff;
  color: #333333; /* Dark text for light background */
}

.page-index__dark-bg {
  background-color: #017439; /* Primary color */
  color: #ffffff; /* Light text for dark background */
}

/* Ensure paragraph and list item colors are correct based on parent background */
.page-index__light-bg p,
.page-index__light-bg li,
.page-index__light-bg h1,
.page-index__light-bg h2,
.page-index__light-bg h3,
.page-index__light-bg h4 {
  color: #333333;
}

.page-index__dark-bg p,
.page-index__dark-bg li,
.page-index__dark-bg h1,
.page-index__dark-bg h2,
.page-index__dark-bg h3,
.page-index__dark-bg h4 {
  color: #ffffff;
}

/* --- CTA Button Base Styles --- */
.page-index__cta-button,
.page-index__quick-link-button,
.page-index__game-button,
.page-index__promotion-button,
.page-index__blog-read-more {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow word breaking */
}

.page-index__cta-button--register,
.page-index__cta-button--download {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-index__cta-button--register:hover,
.page-index__cta-button--download:hover {
  background-color: #e02020;
  border-color: #e02020;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__cta-button--view-all,
.page-index__cta-button--contact,
.page-index__cta-button--support,
.page-index__cta-button--news {
  background-color: #017439; /* Primary color */
  color: #ffffff;
  border: 2px solid #017439;
}

.page-index__cta-button--view-all:hover,
.page-index__cta-button--contact:hover,
.page-index__cta-button--support:hover,
.page-index__cta-button--news:hover {
  background-color: #005f2e;
  border-color: #005f2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Quick link buttons */
.page-index__quick-link-button {
  background-color: #C30808; /* Custom color for quick access buttons */
  color: #FFFF00; /* Custom font color */
  border: 2px solid #C30808;
}

.page-index__quick-link-button:hover {
  background-color: #e02020;
  border-color: #e02020;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Game and promotion buttons */
.page-index__game-button,
.page-index__promotion-button,
.page-index__blog-read-more {
  background-color: #017439; /* Primary color */
  color: #ffffff;
  border: 2px solid #017439;
  padding: 12px 25px;
  font-size: 16px;
  border-radius: 5px;
}

.page-index__game-button:hover,
.page-index__promotion-button:hover,
.page-index__blog-read-more:hover {
  background-color: #005f2e;
  border-color: #005f2e;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- HERO Section --- */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background: linear-gradient(135deg, #017439, #005f2e); /* Dark gradient for HERO */
  color: #ffffff;
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-index__hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-index__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #ffffff;
}

.page-index__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* For mobile responsiveness */
}

/* --- Module 1: Introduction Section --- */
.page-index__introduction-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background */
  color: #333333; /* Dark text */
}

.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__feature-item {
  text-align: center;
  padding: 25px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333; /* Dark text */
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-index__feature-item img {
  width: 100%; /* Changed from fixed width/height to fill card */
  height: 200px; /* Fixed height for consistency */
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
  object-fit: cover;
  border-radius: 5px; /* Added border-radius */
}

.page-index__feature-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #017439; /* Primary color for titles */
}

.page-index__feature-item p {
  font-size: 16px;
  color: #555555;
}

/* --- Module 2: Quick Access Section --- */
.page-index__quick-access-section {
  padding: 80px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-index__quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

/* --- Module 3: Games Section --- */
.page-index__games-section {
  padding: 80px 0;
  background-color: #f0f0f0; /* Light background */
  color: #333333; /* Dark text */
}