/* style/lottery.css */
:root {
  --primary-color: #007BFF;
  --secondary-color: #FFC107;
  --text-color-light: #ffffff;
  --text-color-dark: #333333;
  --bg-dark: #121212; /* From shared.css body background */
  --card-bg-dark-alpha: rgba(255, 255, 255, 0.1);
  --border-color-dark: rgba(255, 255, 255, 0.2);
  --shadow-dark: rgba(0, 0, 0, 0.3);
}

.page-lottery {
  color: var(--text-color-light); /* Main text color for dark body background */
  background-color: var(--bg-dark); /* Ensure main content area also respects dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  padding-bottom: 60px; /* General bottom padding */
}

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

/* Fixed Navigation Bar Spacing */
.page-lottery__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, #001f4d, #003366); /* Dark blue gradient for hero */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-lottery__hero-title {
  font-size: 3.2em;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-color-light);
  text-shadow: 0 4px 8px var(--shadow-dark);
}

.page-lottery__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

.page-lottery__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap; /* For mobile responsiveness */
}

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow-dark);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-lottery__cta-button--primary {
  background: var(--primary-color);
  color: var(--text-color-light);
}

.page-lottery__cta-button--primary:hover {
  background: #0056b3;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-dark);
}

.page-lottery__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--text-color-dark); /* Ensure contrast with yellow */
}

.page-lottery__cta-button--secondary:hover {
  background: #e0a800;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-dark);
}

.page-lottery__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px var(--shadow-dark);
  margin-top: 30px;
}

.page-lottery__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 60px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-lottery__introduction-section,
.page-lottery__game-types-section,
.page-lottery__how-to-play-section,
.page-lottery__tips-section,
.page-lottery__security-section,
.page-lottery__promotions-section,
.page-lottery__faq-section,
.page-lottery__final-cta-section {
  padding: 40px 0;
}

.page-lottery__feature-list,
.page-lottery__steps-list,
.page-lottery__tips-list,
.page-lottery__security-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-lottery__feature-item,
.page-lottery__step-item,
.page-lottery__tips-item,
.page-lottery__security-item {
  background: var(--card-bg-dark-alpha);
  border: 1px solid var(--border-color-dark);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px var(--shadow-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-lottery__feature-item:hover,
.page-lottery__step-item:hover,
.page-lottery__tips-item:hover,
.page-lottery__security-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

.page-lottery__feature-heading,
.page-lottery__step-heading,
.page-lottery__tips-heading,
.page-lottery__security-heading {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: bold;
}

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

.page-lottery__game-card,
.page-lottery__promo-card {
  background: var(--card-bg-dark-alpha);
  border: 1px solid var(--border-color-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-lottery__game-card:hover,
.page-lottery__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

.page-lottery__game-image,
.page-lottery__promo-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 1px solid var(--border-color-dark);
}

.page-lottery__game-card-title,
.page-lottery__promo-card-title {
  font-size: 1.4em;
  color: var(--secondary-color);
  padding: 15px 20px 0;
  font-weight: bold;
}

.page-lottery__game-card-description,
.page-lottery__promo-card-description {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 20px 20px;
  flex-grow: 1; /* Ensure description takes available space */
}

.page-lottery__game-card-link,
.page-lottery__promo-card-link {
  display: block;
  text-align: center;
  background: var(--primary-color);
  color: var(--text-color-light);
  padding: 12px 20px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border-radius: 0 0 10px 10px;
}

.page-lottery__game-card-link:hover,
.page-lottery__promo-card-link:hover {
  background: #0056b3;
}

.page-lottery__tips-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow-dark);
  margin-top: 40px;
}

.page-lottery__security-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow-dark);
  margin-top: 40px;
}

.page-lottery__final-cta-section {
  text-align: center;
  padding-bottom: 80px;
}

/* FAQ styles */
.page-lottery__faq-section {
  padding: 60px 0;
}

.page-lottery__faq-list {
  max-width: 900px;
  margin: 0 auto;
  margin-top: 30px;
}

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color-dark);
  box-shadow: 0 2px 10px var(--shadow-dark);
}

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--card-bg-dark-alpha);
  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);
}

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-color-light);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

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

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* A common way to show 'minus' from a plus */
}

.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 25px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter background for answer */
  color: rgba(255, 255, 255, 0.8);
}

/* Ensure padding and max-height are large enough and use !important for active state */
.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__hero-title {
    font-size: 2.8em;
  }
  .page-lottery__section-title {
    font-size: 2em;
  }
  .page-lottery__feature-list,
  .page-lottery__game-grid,
  .page-lottery__promo-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-lottery {
    padding-bottom: 40px;
  }
  .page-lottery__container {
    padding: 0 15px;
  }
  
  /* Mobile padding-top for fixed header */
  .page-lottery__hero-section {
    padding-top: 100px !important; /* Mobile: Adjust based on actual header height */
    padding-bottom: 40px;
  }

  .page-lottery__hero-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-lottery__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-lottery__cta-group {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 15px; /* Ensure buttons don't touch edges */
  }
  .page-lottery__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 25px;
    font-size: 1em;
    box-sizing: border-box !important;
  }

  .page-lottery__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    padding-top: 40px;
  }

  .page-lottery__introduction-section,
  .page-lottery__game-types-section,
  .page-lottery__how-to-play-section,
  .page-lottery__tips-section,
  .page-lottery__security-section,
  .page-lottery__promotions-section,
  .page-lottery__faq-section,
  .page-lottery__final-cta-section {
    padding: 30px 0;
  }

  .page-lottery__feature-list,
  .page-lottery__steps-list,
  .page-lottery__tips-list,
  .page-lottery__security-list,
  .page-lottery__game-grid,
  .page-lottery__promo-grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
  }

  .page-lottery__feature-item,
  .page-lottery__step-item,
  .page-lottery__tips-item,
  .page-lottery__security-item,
  .page-lottery__game-card,
  .page-lottery__promo-card {
    padding: 20px;
    border-radius: 8px;
  }

  .page-lottery__feature-heading,
  .page-lottery__step-heading,
  .page-lottery__tips-heading,
  .page-lottery__security-heading {
    font-size: 1.3em;
  }

  .page-lottery__game-card-title,
  .page-lottery__promo-card-title {
    font-size: 1.2em;
    padding: 12px 15px 0;
  }

  .page-lottery__game-card-description,
  .page-lottery__promo-card-description {
    padding: 8px 15px 15px;
  }

  .page-lottery__game-card-link,
  .page-lottery__promo-card-link {
    padding: 10px 15px;
    border-radius: 0 0 8px 8px;
  }

  /* Image responsiveness */
  .page-lottery img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-lottery__hero-image,
  .page-lottery__tips-image,
  .page-lottery__security-image,
  .page-lottery__game-image,
  .page-lottery__promo-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px;
  }
  .page-lottery__game-image,
  .page-lottery__promo-image {
    height: 180px; /* Adjust height for mobile */
  }

  /* FAQ mobile styles */
  .page-lottery__faq-list {
    margin-top: 20px;
  }
  .page-lottery__faq-item {
    border-radius: 6px;
  }
  .page-lottery__faq-question {
    padding: 15px 20px;
  }
  .page-lottery__faq-question h3 {
    font-size: 1em;
  }
  .page-lottery__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-lottery__faq-answer {
    padding: 0 20px;
  }
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px 20px !important;
  }
}