:root {
  --primary-color: #007bff;
  --secondary-color: #28a745;
  --dark-text-color: #333333;
  --light-text-color: #ffffff;
  --bg-light-gray: #f1f3f5;
  --bg-dark-blue: #007bff; /* Primary color for dark sections */
  --border-light: #e0e0e0;
}

/* Base styles for page-lottery, assuming body has a dark background from shared.css */
/* Based on body background var(--dark-bg-1), which is dark, text should be light */
.page-lottery {
  color: var(--dark-text-color); /* Default text color for the page */
  background-color: var(--bg-light-gray); /* Overall background for sections */
  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__main-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--dark-text-color);
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.3;
}

.page-lottery__section-title {
  font-size: 30px;
  font-weight: bold;
  color: var(--dark-text-color);
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.3;
}

.page-lottery__section-title .page-lottery__link-highlight,
.page-lottery__main-title .page-lottery__link-highlight {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-lottery__section-title .page-lottery__link-highlight:hover,
.page-lottery__main-title .page-lottery__link-highlight:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-lottery__section-description {
  font-size: 18px;
  color: var(--dark-text-color);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Intro Section */
.page-lottery__intro-section {
  padding: 60px 0;
  background-color: var(--bg-light-gray);
  color: var(--dark-text-color);
  /* Fixed header spacing */
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
}

.page-lottery__intro-text {
  font-size: 17px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-lottery__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-lottery__feature-item {
  background: var(--light-text-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text-color);
}

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

.page-lottery__feature-image {
  max-width: 150px; /* Ensure images are not too small, but not too big for a feature icon-like purpose */
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px; /* Added for consistency */
  min-width: 200px; /* Minimum size for all images */
  min-height: 200px; /* Minimum size for all images */
}

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

.page-lottery__feature-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark-text-color);
}

.page-lottery__cta-text {
  font-size: 18px;
  text-align: center;
  margin-top: 30px;
  font-weight: bold;
  color: var(--dark-text-color);
}

.page-lottery__cta-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.page-lottery__cta-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Game Types Section */
.page-lottery__game-types-section {
  padding: 80px 0;
  background-color: var(--bg-dark-blue); /* Dark background */
  color: var(--light-text-color); /* Light text for dark background */
}

.page-lottery__game-types-section .page-lottery__section-title {
  color: var(--light-text-color);
}

.page-lottery__game-types-section .page-lottery__section-description {
  color: var(--light-text-color);
}

.page-lottery__game-type-card {
  display: flex;
  align-items: center;
  background: var(--light-text-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  overflow: hidden;
  color: var(--dark-text-color); /* Text inside card is dark */
}

.page-lottery__game-type-card--reverse {
  flex-direction: row-reverse;
}

.page-lottery__game-type-image {
  flex: 1;
  max-width: 50%; /* Image takes half width */
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 0; /* No border-radius for image within card */
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

.page-lottery__game-type-content {
  flex: 1;
  padding: 40px;
}

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

.page-lottery__game-type-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 25px;
}

/* Promotions Section */
.page-lottery__promotions-section {
  padding: 80px 0;
  background-color: var(--bg-light-gray);
  color: var(--dark-text-color);
}

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

.page-lottery__promo-card {
  background: var(--light-text-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text-color);
}

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

.page-lottery__promo-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  display: block;
  border-radius: 8px;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

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

.page-lottery__promo-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 25px;
}

/* News Section */
.page-lottery__news-section {
  padding: 80px 0;
  background-color: var(--bg-dark-blue); /* Dark background */
  color: var(--light-text-color); /* Light text for dark background */
}

.page-lottery__news-section .page-lottery__section-title {
  color: var(--light-text-color);
}

.page-lottery__news-section .page-lottery__section-description {
  color: var(--light-text-color);
}

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

.page-lottery__news-card {
  background: var(--light-text-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--dark-text-color); /* Text inside card is dark */
}

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

.page-lottery__news-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px; /* Ensure minimum size */
}

.page-lottery__news-content {
  padding: 25px;
}

.page-lottery__news-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-lottery__news-title .page-lottery__news-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-lottery__news-title .page-lottery__news-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-lottery__news-meta {
  font-size: 14px;
  color: #666666;
  margin-bottom: 15px;
}

.page-lottery__news-summary {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.page-lottery__view-all-news {
  text-align: center;
}

/* FAQ Section */
.page-lottery__faq-section {
  padding: 80px 0;
  background-color: var(--bg-light-gray);
  color: var(--dark-text-color);
}

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

.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; /* Important for JS functionality */
  padding: 20px 15px !important; /* Important for JS functionality */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--dark-text-color);
}

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

.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: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--dark-text-color);
}

.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: #333;
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Buttons */
.page-lottery__btn-primary,
.page-lottery__btn-secondary,
.page-lottery__btn-link {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

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

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

.page-lottery__btn-link {
  background: none;
  color: var(--primary-color);
  border: 2px solid transparent;
  padding: 0;
  box-shadow: none;
  text-decoration: underline;
}

.page-lottery__btn-link:hover {
  color: var(--secondary-color);
  text-decoration: none;
  transform: none;
  box-shadow: none;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-lottery__main-title {
    font-size: 30px;
  }
  .page-lottery__section-title {
    font-size: 26px;
  }
  .page-lottery__game-type-card {
    flex-direction: column;
  }
  .page-lottery__game-type-card--reverse {
    flex-direction: column; /* Revert to column for mobile */
  }
  .page-lottery__game-type-image {
    max-width: 100%;
    width: 100%;
    min-width: unset;
  }
  .page-lottery__game-type-content {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .page-lottery__intro-section {
    padding-top: 100px !important; /* Mobile: Adjust based on actual header height */
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-lottery__container {
    padding: 0 15px;
  }
  .page-lottery__main-title {
    font-size: 26px;
    margin-bottom: 20px;
  }
  .page-lottery__intro-text {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-lottery__section-title {
    font-size: 22px;
    margin-bottom: 20px;
  }
  .page-lottery__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-lottery__feature-item {
    padding: 20px;
  }
  .page-lottery__feature-image {
    max-width: 120px;
  }
  .page-lottery__feature-title {
    font-size: 18px;
  }
  .page-lottery__feature-description {
    font-size: 14px;
  }
}