.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--secondary-color); /* Matches body background from shared.css */
}

.page-lottery__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); /* Ensure content is below fixed header */
  background: #017439; /* Primary color for dark background */
  color: #ffffff;
}

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

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

.page-lottery__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

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

.page-lottery__hero-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #FFFF00; /* Register and Login Font Color */
}

.page-lottery__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #C30808; /* Login/Register Color */
  color: #FFFF00; /* Register and Login Font Color */
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-lottery__cta-button:hover {
  background: darken(#C30808, 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-lottery__cta-button--large {
  padding: 18px 50px;
  font-size: 1.3em;
}

.page-lottery__section {
  padding: 80px 20px;
}

.page-lottery__introduction {
  background-color: #FFFFFF;
  color: #333333;
}

.page-lottery__game-types {
  background-color: #017439;
  color: #ffffff;
}

.page-lottery__benefits {
  background-color: #FFFFFF;
  color: #333333;
}

.page-lottery__how-to-play {
  background-color: #017439;
  color: #ffffff;
}

.page-lottery__faq {
  background-color: #FFFFFF;
  color: #333333;
}

.page-lottery__cta-final {
  background-color: #017439;
  color: #ffffff;
}

.page-lottery__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-lottery__center-content {
  text-align: center;
}

.page-lottery__section-title {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  color: inherit; /* Inherits color from parent section */
}

.page-lottery__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

.page-lottery__image-wrapper {
  text-align: center;
  margin: 40px 0;
}

.page-lottery__image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-lottery__card {
  background: #ffffff; /* Card background */
  color: #333333; /* Card text color */
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-lottery__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #017439; /* Primary color for card titles */
}

.page-lottery__card-image {
  margin-bottom: 15px;
  height: 200px; /* Fixed height for image consistency */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-lottery__card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Ensure image fits without cropping */
  border-radius: 5px;
}

.page-lottery__card-description {
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-lottery__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: #C30808; /* Login/Register Color */
  color: #FFFF00; /* Register and Login Font Color */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-lottery__btn-primary:hover {
  background: darken(#C30808, 10%);
}

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

.page-lottery__feature-item {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.page-lottery__feature-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-lottery__feature-icon {
  margin-bottom: 20px;
  height: 150px; /* Fixed height for icon consistency */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-lottery__feature-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.page-lottery__feature-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #017439;
}

.page-lottery__feature-description {
  font-size: 1em;
  color: #555555;
}

.page-lottery__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-lottery__step-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  position: relative;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-lottery__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #C30808; /* Register/Login color for steps */
  color: #FFFF00; /* Register and Login Font Color */
  border-radius: 50%;
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.page-lottery__step-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #FFFF00; /* Register and Login Font Color */
}

.page-lottery__step-description {
  font-size: 1em;
  color: #f0f0f0;
}

.page-lottery__center-button {
  text-align: center;
  margin-top: 50px;
}

/* FAQ styles */
.page-lottery__faq-list {
  margin-top: 40px;
}

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-lottery__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;
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Ensure enough space for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

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

.page-lottery__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-lottery__faq-question:active {
  background: #eeeeee;
}

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: #333333;
}

.page-lottery__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-lottery__faq-item.active .page-lottery__faq-toggle {
  color: #017439;
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

.page-lottery__dark-bg {
  color: #ffffff;
  background: #017439;
}

.page-lottery__light-bg {
  color: #333333;
  background: #ffffff;
}

.page-lottery__cta-final .page-lottery__section-title {
  color: #FFFF00; /* Register and Login Font Color */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__hero-title {
    font-size: 2.5em;
  }
  .page-lottery__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-lottery__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-lottery__hero-title {
    font-size: 2em;
  }
  .page-lottery__hero-description {
    font-size: 1em;
  }
  .page-lottery__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-lottery__cta-button--large {
    padding: 15px 35px;
    font-size: 1.1em;
  }
  
  .page-lottery__section {
    padding: 40px 15px;
  }
  
  .page-lottery__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  
  .page-lottery__text-block {
    font-size: 0.95em;
  }
  
  .page-lottery__grid-cards, .page-lottery__grid-features, .page-lottery__steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .page-lottery__card, .page-lottery__feature-item, .page-lottery__step-item {
    padding: 20px;
  }
  
  .page-lottery__card-title, .page-lottery__feature-title, .page-lottery__step-title {
    font-size: 1.3em;
  }
  
  .page-lottery__card-image, .page-lottery__feature-icon {
    height: 180px;
  }

  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__cta-buttons,
  .page-lottery__button-group,
  .page-lottery__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .page-lottery__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-lottery__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-lottery__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-lottery__faq-answer {
    padding: 0 15px;
  }
  
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px !important;
  }
}