/* style/index-how-to-play.css */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-btn-bg: #C30808;
  --login-btn-bg: #C30808;
  --register-login-font: #FFFF00;
  --body-bg: #FFFFFF; /* From shared.css */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
}

.page-index-how-to-play {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Body is light, so use dark text */
  background-color: var(--body-bg);
}

.page-index-how-to-play__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(180deg, var(--primary-color) 0%, #1a8f55 100%); /* Gradient background for visual appeal */
  color: var(--text-color-light);
  overflow: hidden;
}

.page-index-how-to-play__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.page-index-how-to-play__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-index-how-to-play__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease-in-out;
}

.page-index-how-to-play__hero-image img:hover {
  transform: scale(1.03);
}

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

.page-index-how-to-play__hero-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--register-login-font); /* Use special font color for title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index-how-to-play__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
}

.page-index-how-to-play__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-index-how-to-play__cta-button {
  display: inline-block;
  padding: 16px 45px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-how-to-play__btn-register {
  background: var(--register-btn-bg);
  color: var(--register-login-font);
  border: 2px solid var(--register-login-font);
}

.page-index-how-to-play__btn-register:hover {
  background: #a30606; /* darken(var(--register-btn-bg), 10%) manually calculated */
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-index-how-to-play__btn-login {
  background: var(--login-btn-bg);
  color: var(--register-login-font);
  border: 2px solid var(--register-login-font);
}

.page-index-how-to-play__btn-login:hover {
  background: #a30606; /* darken(var(--login-btn-bg), 10%) manually calculated */
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-index-how-to-play__section {
  padding: 80px 0;
  background-color: var(--body-bg);
}

.page-index-how-to-play__section:nth-of-type(even) {
  background-color: #f8f8f8;
}

.page-index-how-to-play__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-index-how-to-play__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.page-index-how-to-play__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.page-index-how-to-play__sub-title {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 25px;
}

.page-index-how-to-play__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-color-dark);
}

.page-index-how-to-play__highlight {
  color: var(--primary-color);
  font-weight: bold;
}

.page-index-how-to-play__image-wrapper {
  margin: 40px 0;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-index-how-to-play__image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-index-how-to-play__ordered-list,
.page-index-how-to-play__unordered-list {
  list-style-type: none;
  padding: 0;
  margin: 30px 0;
}

.page-index-how-to-play__list-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-how-to-play__list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-index-how-to-play__list-item-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.page-index-how-to-play__list-item p {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-color-dark);
}

.page-index-how-to-play__list-item a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-index-how-to-play__list-item a:hover {
  color: #005f2e; /* darken(var(--primary-color), 10%) manually calculated */
}

.page-index-how-to-play__cta-group {
  text-align: center;
  margin-top: 50px;
}

.page-index-how-to-play__btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-how-to-play__btn-primary:hover {
  background: #005f2e; /* darken(var(--primary-color), 10%) manually calculated */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-index-how-to-play__faq-list {
  margin-top: 40px;
}

.page-index-how-to-play__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-index-how-to-play__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index-how-to-play__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-index-how-to-play__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--primary-color);
}

.page-index-how-to-play__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index-how-to-play__faq-item.active .page-index-how-to-play__faq-toggle {
  transform: rotate(45deg); /* Change from + to X */
  color: var(--register-btn-bg); /* Use a more striking color for active toggle */
}

.page-index-how-to-play__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 25px;
  opacity: 0;
  background: #f9f9f9;
  border-top: 1px solid #eee;
  border-radius: 0 0 8px 8px;
}

.page-index-how-to-play__faq-item.active .page-index-how-to-play__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  background: #f9f9f9;
}

.page-index-how-to-play__faq-answer p {
  margin: 0;
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-color-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index-how-to-play__hero-title {
    font-size: 2.8em;
  }
  .page-index-how-to-play__hero-description {
    font-size: 1.2em;
  }
  .page-index-how-to-play__section-title {
    font-size: 2.2em;
  }
  .page-index-how-to-play__sub-title {
    font-size: 1.6em;
  }
}

@media (max-width: 768px) {
  .page-index-how-to-play__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index-how-to-play__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-index-how-to-play__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-index-how-to-play__hero-image {
    margin-bottom: 20px;
    border-radius: 8px;
  }
  .page-index-how-to-play__hero-cta-group {
    flex-direction: column;
    gap: 15px;
  }
}