/* style/index-featured-games.css */

/* Custom Colors */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-bg: #C30808;
  --login-button-bg: #C30808;
  --register-login-font: #FFFF00;
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
  --bg-light-gray: #f9f9f9;
}

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

/* Container for consistent spacing */
.page-index-featured-games__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Section titles */
.page-index-featured-games__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

/* Text blocks */
.page-index-featured-games__text-block {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 30px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* HERO Section */
.page-index-featured-games__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  /* Fixed Header Offset */
  padding-top: var(--header-offset, 120px);
  background: linear-gradient(135deg, var(--primary-color), #00A652); /* A slightly lighter green for gradient */
  color: var(--text-light);
}

.page-index-featured-games__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-featured-games__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-index-featured-games__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

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

.page-index-featured-games__hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.2;
}

.page-index-featured-games__hero-description {
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 40px;
  color: var(--text-light);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index-featured-games__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 180px; /* Ensure buttons have a minimum width */
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-featured-games__cta-button.page-index-featured-games__btn-register {
  background: var(--register-button-bg);
  color: var(--register-login-font);
  border: 2px solid var(--register-button-bg);
}

.page-index-featured-games__cta-button.page-index-featured-games__btn-register:hover {
  background: #E03F3F; /* Slightly darker red */
  border-color: #E03F3F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-index-featured-games__cta-button.page-index-featured-games__btn-login {
  background: var(--login-button-bg);
  color: var(--register-login-font);
  border: 2px solid var(--login-button-bg);
}

.page-index-featured-games__cta-button.page-index-featured-games__btn-login:hover {
  background: #E03F3F; /* Slightly darker red */
  border-color: #E03F3F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Feature Cards (Overview Section) */
.page-index-featured-games__feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index-featured-games__card {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-dark);
}

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

.page-index-featured-games__card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%;
  display: block;
}

.page-index-featured-games__card-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index-featured-games__card p {
  font-size: 16px;
  color: var(--text-dark);
}

/* Game Category Sections */
.page-index-featured-games__section.page-index-featured-games__game-category {
  padding: 80px 0;
}

.page-index-featured-games__game-content {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-top: 50px;
}

.page-index-featured-games__game-content--reverse {
  flex-direction: row-reverse;
}

.page-index-featured-games__game-image {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  max-width: 50%; /* Image takes half width */
  height: auto;
  display: block;
}

.page-index-featured-games__game-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-index-featured-games__game-details {
  flex: 1;
  color: var(--text-dark);
}

.page-index-featured-games__dark-bg .page-index-featured-games__game-details {
  color: var(--text-light);
}

.page-index-featured-games__game-details p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 25px;
}

.page-index-featured-games__game-features {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-index-featured-games__game-features li {
  font-size: 17px;
  margin-bottom: 10px;
  position: relative;
  padding-left: 30px;
}

.page-index-featured-games__game-features li::before {
  content: '✅';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 20px;
  top: 0;
}

.page-index-featured-games__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-index-featured-games__dark-bg .page-index-featured-games__section-title {
  color: var(--text-light);
}

.page-index-featured-games__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-featured-games__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Getting Started Section */
.page-index-featured-games__getting-started {
  padding-bottom: 80px;
}

.page-index-featured-games__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: left;
}

.page-index-featured-games__step-item {
  background: rgba(255, 255, 255, 0.1); /* Light background for steps on dark section */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: var(--text-light);
}

.page-index-featured-games__step-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--register-login-font); /* Using yellow for step titles */
  margin-bottom: 15px;
}

.page-index-featured-games__step-item p {
  font-size: 16px;
  line-height: 1.6;
}

/* FAQ Section */
.page-index-featured-games__faq {
  padding: 80px 0;
  background-color: var(--bg-light-gray);
}

.page-index-featured-games__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

/* FAQ容器样式 */
.page-index-featured-games__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-index-featured-games__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-index-featured-games__faq-item.active .page-index-featured-games__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--secondary-color); /* White background for answer */
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-index-featured-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index-featured-games__faq-question:hover {
  background: var(--bg-light-gray);
  border-color: #d0d0d0;
}

.page-index-featured-games__faq-question:active {
  background: #eeeeee;
}