/* style/index.css */
:root {
  --primary-color: #017439; /* Main brand color */
  --secondary-color: #FFFFFF; /* Auxiliary color */
  --text-dark: #333333; /* Default dark text for light backgrounds */
  --text-light: #ffffff; /* Default light text for dark backgrounds */
  --button-register: #C30808; /* Register button color */
  --button-login: #C30808; /* Login button color */
  --button-text-accent: #FFFF00; /* Text color for register/login buttons */
  --background-light: #FFFFFF; /* Light background */
  --background-dark: #017439; /* Dark background */
}

/* Base styles for the page content */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--background-light); /* Default light background, shared.css defines body */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.2;
}

.page-index__section-title--white {
  color: var(--text-light);
}

.page-index__text-block {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__text-block--white {
  color: var(--text-light);
}

/* CTA Button Base Styles */
.page-index__cta-button,
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box; /* Ensure padding doesn't increase width */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
}

.page-index__cta-button {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-index__cta-button:hover {
  background: #005f2b; /* Darker shade of primary */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-index__btn-primary--register,
.page-index__btn-primary--login {
  background: var(--button-register); /* Specific color for register/login */
  color: var(--button-text-accent); /* Specific text color */
}

.page-index__btn-primary:hover {
  background: #005f2b;
}

.page-index__btn-primary--register:hover,
.page-index__btn-primary--login:hover {
  background: #9c0606;
}

.page-index__btn-secondary {
  background: var(--background-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-index__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
}

/* Image base styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

/* --- 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); /* Ensures content is not hidden by fixed header */
  background: var(--background-dark); /* Brand color for dark background */
  color: var(--text-light);
}

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

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

.page-index__hero-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.page-index__hero-title {
  font-size: 52px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-index__hero-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-light);
}

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

.page-index__hero-buttons .page-index__cta-button {
  padding: 18px 45px;
  font-size: 20px;
  min-width: 200px;
}

/* --- Module 1: Introduction Section --- */
.page-index__introduction-section {
  padding: 80px 0;
  background: var(--background-light);
  color: var(--text-dark);
}

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

.page-index__feature-item {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__feature-item img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: brightness(0.95); /* Slightly darken images for consistency */
}

.page-index__feature-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

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

/* --- Module 2: Quick Access Section --- */
.page-index__quick-access-section {
  padding: 80px 0;
  background: var(--background-dark);
  color: var(--text-light);
}

.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}

.page-index__button-group .page-index__btn-primary {
  min-width: 220px;
  padding: 15px 25px;
  font-size: 17px;
}

/* --- Module 3: Games Section --- */
.page-index__games-section {
  padding: 80px 0;
  background: var(--background-light);
  color: var(--text-dark);
}

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

.page-index__game-card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}