/* style/lottery.css */

/* Base styles for the lottery page */
.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Light text for dark body background */
  background-color: #000000; /* Ensure this matches body background from shared.css */
}

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

.page-lottery__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-lottery__section--introduction {
  background-color: #1a1a1a;
}

.page-lottery__section--game-types {
  background-color: #0d0d0d;
}

.page-lottery__section--guide {
  background-color: #0056b3; /* Primary brand color */
  color: #ffffff;
}

.page-lottery__section--promotions {
  background-color: #1a1a1a;
}

.page-lottery__section--why-choose {
  background-color: #0056b3; /* Primary brand color */
  color: #ffffff;
}

.page-lottery__section--faq {
  background-color: #0d0d0d;
}

.page-lottery__section-title {
  font-size: 36px;
  color: #ffc107; /* Accent color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-lottery__paragraph {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-lottery__paragraph--highlight {
  font-weight: bold;
  color: #ffc107;
  font-size: 18px;
}

/* Hero Section */
.page-lottery__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  margin-top: 100px; /* Adjust for fixed header */
}

.page-lottery__hero-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: 500px; /* Fixed height for desktop hero */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-lottery__hero-image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.page-lottery__hero-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text contrast */
}

.page-lottery__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 20px;
}

.page-lottery__hero-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: #ffc107;
  line-height: 1.2;
}

.page-lottery__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-lottery__hero-btn {
  display: inline-block;
  background-color: #ffc107; /* Accent color */
  color: #000000; /* Dark text for light button */
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid #ffc107;
}

.page-lottery__hero-btn:hover {
  background-color: #e0a800;
  transform: translateY(-3px);
}

/* Feature Cards */
.page-lottery__feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-lottery__feature-card {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent background */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-lottery__feature-card:hover {
  transform: translateY(-10px);
  background-color: rgba(255, 255, 255, 0.1);
}

.page-lottery__feature-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

.page-lottery__card-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
}

.page-lottery__card-description {
  font-size: 16px;
  color: #e0e0e0;
}

/* Game Type Grid */
.page-lottery__game-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__game-card {
  background-color: rgba(255, 255, 255, 0.08); /* Darker transparent background */
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #0056b3; /* Primary color border */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-lottery__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-lottery__game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-lottery__game-card .page-lottery__card-title {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #ffc107;
  padding: 0 20px;
  text-align: center;
}

.page-lottery__game-card .page-lottery__card-description {
  font-size: 15px;
  color: #e0e0e0;
  padding: 0 20px;
  text-align: center;
  flex-grow: 1;
}

.page-lottery__btn-small {
  display: inline-block;
  background-color: #ffc107;
  color: #000000;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  margin: 20px auto;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 2px solid #ffc107;
}

.page-lottery__btn-small:hover {
  background-color: #e0a800;
  transform: translateY(-2px);
}

/* Guide Steps */
.page-lottery__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__step-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-lottery__step-icon {
  width: 60px;
  height: 60px;
  background-color: #ffc107;
  color: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin: 0 auto 20px auto;
}

.page-lottery__step-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
}

.page-lottery__step-description {
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.page-lottery__btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #ffc107;
  padding: 12px 25px;
  border: 2px solid #ffc107;
  border-radius: 25px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-lottery__btn-secondary:hover {
  background-color: #ffc107;
  color: #000000;
}

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

.page-lottery__promo-card {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-lottery__promo-card:hover {
  transform: translateY(-10px);
  background-color: rgba(255, 255, 255, 0.1);
}

.page-lottery__promo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

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

.page-lottery__advantage-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-lottery__advantage-item img {
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

.page-lottery__advantage-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 10px;
}

.page-lottery__advantage-description {
  font-size: 16px;
  color: #e0e0e0;
}

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

/* FAQ容器样式 */
.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* FAQ default state - answer 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;
  color: #e0e0e0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter background for answer */
  border-radius: 0 0 5px 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Question style */
.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.1); /* Darker background for question */
  border: 1px solid rgba(255, 255, 255, 0.2);
  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: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.page-lottery__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

/* Question title style */
.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #ffc107; /* Accent color for question text */
  pointer-events: none; /* Prevent h3 from blocking click events */
}

/* Toggle icon */
.page-lottery__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  color: #ffc107;
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__hero-title {
    font-size: 40px;
  }
  .page-lottery__hero-description {
    font-size: 18px;
  }
  .page-lottery__section-title {
    font-size: 30px;
  }
  .page-lottery__paragraph {
    font-size: 16px;
  }
  .page-lottery__hero-container {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .page-lottery__hero-section {
    margin-top: 80px; /* Adjust for fixed header on mobile */
  }
  .page-lottery__hero-container {
    height: 350px;
  }
  .page-lottery__hero-content {
    padding: 15px;
  }
  .page-lottery__hero-title {
    font-size: 32px;
  }
  .page-lottery__hero-description {
    font-size: 16px;
  }
  .page-lottery__hero-btn {
    padding: 12px 25px;
    font-size: 16px;
  }
  .page-lottery__section {
    padding: 40px 0;
  }
  .page-lottery__section-title {
    font-size: 26px;
    margin-bottom: 30px;
  }
  .page-lottery__paragraph {
    font-size: 15px;
    padding: 0 15px;
  }
  .page-lottery__feature-cards,
  .page-lottery__game-type-grid,
  .page-lottery__guide-steps,
  .page-lottery__promo-grid,
  .page-lottery__advantages-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-lottery__feature-card,
  .page-lottery__game-card,
  .page-lottery__step-item,
  .page-lottery__promo-card,
  .page-lottery__advantage-item {
    padding: 25px;
  }
  .page-lottery__card-title,
  .page-lottery__step-title,
  .page-lottery__advantage-title {
    font-size: 20px;
  }
  .page-lottery__card-description,
  .page-lottery__step-description,
  .page-lottery__advantage-description {
    font-size: 15px;
  }

  /* FAQ Mobile Specifics */
  .page-lottery__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-lottery__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px); /* Adjust width for toggle */
  }
  .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;
  }

  /* Mobile image handling */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__hero-section,
  .page-lottery__hero-image,
  .page-lottery__hero-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-lottery__hero-image img {
    filter: brightness(0.6); /* Slightly less dark on mobile */
  }
}