/* style/lottery.css */

/* --- Base Styles & Layout --- */
.page-lottery {
  background-color: var(--bg, #08160F); /* Fallback to custom dark green */
  color: var(--text-main, #F2FFF6); /* Main text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-lottery__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-lottery__section-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Responsive font size for H2 */
  font-weight: bold;
  color: var(--gold, #F2C14E); /* Gold for titles */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.page-lottery__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary, #A7D9B8); /* Secondary text color */
}

.page-lottery__dark-bg {
  background-color: var(--bg, #08160F);
  color: var(--text-main, #F2FFF6);
  padding: 60px 0;
}

.page-lottery__card-bg {
  background-color: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
  padding: 60px 0;
}

.page-lottery__card {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-main, #F2FFF6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-lottery__card-title {
  font-size: 1.5em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-lottery__card-description {
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
}

/* --- Buttons --- */
.page-lottery__btn-primary,
.page-lottery__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%; /* Ensure responsiveness */
}

.page-lottery__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6; /* Text Main */
  border: 2px solid transparent;
}

.page-lottery__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 0 15px var(--glow, #57E38D);
}

.page-lottery__btn-secondary {
  background-color: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--deep-green, #0A4B2C);
}

.page-lottery__btn-secondary:hover {
  background-color: var(--deep-green, #0A4B2C);
  color: #F2FFF6;
  box-shadow: 0 0 10px rgba(42, 209, 111, 0.5);
}

/* --- Hero Section --- */
.page-lottery__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding-top: 10px; /* Small top padding as body handles header offset */
  padding-bottom: 60px;
  background-color: var(--bg, #08160F);
}

.page-lottery__hero-image-wrapper {
  width: 100%;
  max-width: 1920px; /* Max width for image */
  margin-bottom: 40px;
}

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

.page-lottery__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-lottery__hero-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
  font-weight: bold;
  color: var(--gold, #F2C14E);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-lottery__hero-description {
  font-size: 1.2em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
  line-height: 1.5;
}

.page-lottery__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- Game Types Section --- */
.page-lottery__game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 20px;
}

.page-lottery__card-button {
  margin-top: auto; /* Push button to bottom */
}

/* --- Why Choose Section --- */
.page-lottery__advantage-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-lottery__advantage-item {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  padding: 25px;
  text-align: left;
  color: var(--text-main, #F2FFF6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-lottery__advantage-title {
  font-size: 1.4em;
  color: var(--gold, #F2C14E);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-lottery__advantage-description {
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
}

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

.page-lottery__content-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- How To Play Section --- */
.page-lottery__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__step-item {
  padding: 30px;
}

.page-lottery__step-number {
  font-size: 3em;
  font-weight: bold;
  color: var(--glow, #57E38D);
  margin-bottom: 15px;
  line-height: 1;
}

.page-lottery__step-title {
  font-size: 1.6em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-lottery__step-description {
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
}

/* --- Promotions Section --- */
.page-lottery__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__promo-card {
  padding: 25px;
}

/* --- FAQ Section --- */
.page-lottery__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

.page-lottery__faq-item {
  background-color: var(--card-bg, #11271B);
  border: 1px solid var(--border, #2E7A4E);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  background-color: var(--card-bg, #11271B);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-lottery__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for Chrome */
}

.page-lottery__faq-question:hover {
  background-color: rgba(46, 122, 78, 0.2); /* Slightly lighter hover */
}

.page-lottery__faq-qtext {
  flex-grow: 1;
}

.page-lottery__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  color: var(--glow, #57E38D);
  margin-left: 15px;
}

.page-lottery__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--text-secondary, #A7D9B8);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding-top 0.3s ease-out;
}

/* For <details> tag, native behavior */
.page-lottery__faq-item[open] .page-lottery__faq-answer {
  max-height: 1000px; /* Arbitrary large value for smooth transition */
  padding-top: 10px;
}

/* For JS-controlled FAQ (if not using <details>) */
.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 1000px !important; /* Arbitrary large value for smooth transition */
  padding-top: 10px;
}

/* --- CTA Section --- */
.page-lottery__cta-section {
  padding: 80px 0;
}

.page-lottery__text-center {
  text-align: center;
}

.page-lottery__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* --- Image & Video Responsive Defaults --- */
.page-lottery img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-lottery video,
.page-lottery__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.page-lottery__video-section,
.page-lottery__video-container,
.page-lottery__video-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .page-lottery {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-lottery__container {
    padding: 0 15px;
  }

  .page-lottery__section-title {
    font-size: 2em; /* Adjust for mobile */
    margin-bottom: 30px;
  }

  .page-lottery__text-block {
    font-size: 1em;
  }

  /* Hero Section */
  .page-lottery__hero-section {
    padding-bottom: 40px;
  }

  .page-lottery__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-lottery__hero-title {
    font-size: 2.2em; /* Adjust H1 for mobile */
    margin-bottom: 15px;
  }

  .page-lottery__hero-description {
    font-size: 1.1em;
    margin-bottom: 20px;
  }

  .page-lottery__hero-cta {
    flex-direction: column;
    gap: 15px;
  }

  .page-lottery__btn-primary,
  .page-lottery__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 15px 20px;
  }

  /* General section padding */
  .page-lottery__dark-bg,
  .page-lottery__card-bg {
    padding: 40px 0;
  }

  /* Card image responsiveness */
  .page-lottery__card-image {
    height: auto; /* Allow height to adjust */
  }

  /* Image & Video Mobile Adaption */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-lottery video,
  .page-lottery__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__hero-section,
  .page-lottery__video-section,
  .page-lottery__video-container,
  .page-lottery__video-wrapper,
  .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;
    overflow: hidden !important; /* Ensure no overflow */
  }

  /* Specific padding for video section top */
  .page-lottery__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* Ensure button groups wrap on mobile */
  .page-lottery__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
}

/* Ensure no filter on images */
.page-lottery img {
  filter: none;
}