/* style/lottery.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-light: #f8f9fa;
  --background-dark: #0d0d0d; /* Assuming --dark-bg-1 from shared.css is similar to this for contrast */
  --card-background: #ffffff;
  --border-color: #e0e0e0;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
}

.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default for dark body background */
  background-color: var(--background-dark); /* Assume body background is dark */
}

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

.page-lottery__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-light); /* Default for dark background sections */
}

.page-lottery__main-title {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: var(--text-light);
}

.page-lottery__text-block {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

.page-lottery__highlight {
  font-weight: bold;
  color: var(--secondary-color);
}

/* Sections */
.page-lottery__intro-section {
  padding: 120px 0 60px; /* Desktop padding-top for fixed header */
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
}

.page-lottery__types-section,
.page-lottery__promotions-section {
  padding: 60px 0;
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-lottery__tips-section,
.page-lottery__news-section {
  padding: 60px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-lottery__faq-section {
  padding: 60px 0;
  background-color: var(--background-light);
  color: var(--text-dark);
}

/* Text colors for light background sections */
.page-lottery__types-section .page-lottery__section-title,
.page-lottery__types-section .page-lottery__text-block,
.page-lottery__promotions-section .page-lottery__section-title,
.page-lottery__promotions-section .page-lottery__text-block,
.page-lottery__faq-section .page-lottery__section-title,
.page-lottery__faq-section strong {
  color: var(--text-dark);
}

/* CTA Button */
.page-lottery__cta-button {
  display: block;
  width: fit-content;
  margin: 30px auto 0;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-light);
}

.page-lottery__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid transparent;
}

.page-lottery__btn-primary:hover {
  background: var(--secondary-color);
  box-shadow: 0 6px 16px var(--shadow-medium);
  transform: translateY(-2px);
}

.page-lottery__btn-secondary {
  background: var(--card-background);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 20px;
  font-size: 16px;
  margin-top: 20px;
}

.page-lottery__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 4px 10px var(--shadow-light);
  transform: translateY(-1px);
}

/* Image styles */
.page-lottery__image-wrapper {
  text-align: center;
  margin-bottom: 40px;
}

.page-lottery__image-content {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 auto;
}

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

.page-lottery__type-card,
.page-lottery__promo-card,
.page-lottery__news-card {
  background: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-light);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark); /* Default for light background cards */
  text-decoration: none; /* For news cards which are links */
}

.page-lottery__type-card:hover,
.page-lottery__promo-card:hover,
.page-lottery__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-medium);
}

.page-lottery__card-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-lottery__card-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-lottery__news-card .page-lottery__card-title {
  color: var(--primary-color);
}

.page-lottery__news-card .page-lottery__card-text {
  color: var(--text-dark);
}

.page-lottery__news-date {
  font-size: 14px;
  color: #666666;
  margin-top: 10px;
}

/* Tips Section */
.page-lottery__tip-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-lottery__tip-item {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark bg */
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: var(--text-light);
}

.page-lottery__tip-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-lottery__tip-description {
  font-size: 16px;
  line-height: 1.7;
}

.page-lottery__tip-description a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-lottery__tip-description a:hover {
  text-decoration: underline;
}

/* FAQ Section */
.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;
  padding: 0 15px;
  opacity: 0;
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Ensure it expands fully */
  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: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

.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: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
}

.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: var(--primary-color);
  transform: rotate(45deg); /* Change '+' to 'x' or similar for active */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__main-title {
    font-size: 40px;
  }

  .page-lottery__section-title {
    font-size: 32px;
  }

  .page-lottery__text-block {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-lottery__intro-section {
    padding: 100px 0 40px; /* Mobile padding-top for fixed header */
  }

  .page-lottery__main-title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .page-lottery__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .page-lottery__text-block {
    font-size: 15px;
  }

  .page-lottery__cta-button {
    padding: 12px 25px;
    font-size: 16px;
  }

  .page-lottery__type-grid,
  .page-lottery__promo-grid,
.page-lottery__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-lottery__type-card,
  .page-lottery__promo-card,
  .page-lottery__news-card {
    padding: 20px;
  }

  .page-lottery__card-title {
    font-size: 20px;
  }

  .page-lottery__card-text {
    font-size: 15px;
  }

  .page-lottery__tip-item {
    padding: 20px;
  }

  .page-lottery__tip-title {
    font-size: 19px;
  }

  .page-lottery__tip-description {
    font-size: 15px;
  }

  .page-lottery__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-lottery__faq-question h3 {
    font-size: 15px;
    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;
  }

  /* Mobile image adaptation */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-lottery__intro-section,
  .page-lottery__types-section,
  .page-lottery__tips-section,
  .page-lottery__promotions-section,
  .page-lottery__news-section,
  .page-lottery__faq-section,
  .page-lottery__container,
  .page-lottery__type-card,
  .page-lottery__promo-card,
  .page-lottery__news-card,
  .page-lottery__tip-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}