/* style/index.css */

/* Variables */
:root {
  --primary-color: #E44D26;
  --secondary-color: #333333;
  --text-color-light-bg: #333333;
  --text-color-dark-bg: #ffffff;
  --background-color-light: #f4f4f4; /* Body background from shared.css */
  --card-bg-light: #ffffff;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Base styles for the page content */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-light-bg); /* Default text color for light body background */
  background-color: var(--background-color-light); /* Ensure consistency with body bg */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

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

.page-index__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

.page-index__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__text-block--light {
  color: rgba(255, 255, 255, 0.9);
}

/* CTA Buttons */
.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-align: center; /* Ensure text is centered for responsiveness */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

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

.page-index__cta-button--primary:hover {
  background: #d44220;
  border-color: #d44220;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--shadow-color);
}

.page-index__cta-button--secondary {
  background: var(--card-bg-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
  margin-left: 20px;
}

.page-index__cta-button--secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--shadow-color);
}

/* Generic buttons for modules */
.page-index__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-color);
  color: var(--text-color-dark-bg);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  background: #d44220;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--card-bg-light);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-index__btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__btn-link:hover {
  color: #d44220;
  text-decoration: underline;
}

/* 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 spacing */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-color-dark-bg);
  overflow: hidden; /* Ensure content doesn't overflow */
}

.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%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  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.2;
  color: var(--text-color-dark-bg);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-index__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

.page-index__hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}


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

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

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

.page-index__link-card {
  background: var(--primary-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: var(--text-color-dark-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  background: #d44220;
}

.page-index__link-card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-index__link-card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-color-dark-bg);
}

.page-index__link-card-description {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.5;
}


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

.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(--card-bg-light);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__game-card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__game-card-title {
  font-size: 24px;
  font-weight: bold;
  margin: 20px 15px 10px;
  color: var(--secondary-color);
}

.page-index__game-card-title a {
  color: inherit;
  text-decoration: none;
}

.page-index__game-card-title a:hover {
  color: var(--primary-color);
}

.page-index__game-card-description {
  font-size: 15px;
  padding: 0 20px 20px;
  flex-grow: 1; /* Allow description to take up available space */
}