:root {
  --primary-color: #1A202C;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a;
  --bg-card-dark: rgba(255, 255, 255, 0.08);
  --border-color: #3a3a3a;
}

/* Base styles for the page-lottery */
.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Light text for dark body background */
  background-color: var(--bg-dark);
  padding-top: 120px; /* Adjust for fixed header */
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.page-lottery__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 15px;
}

.page-lottery__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

.page-lottery__paragraph {
  font-size: 17px;
  margin-bottom: 20px;
  text-align: justify;
  color: #f0f0f0;
}

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

/* Hero Section */
.page-lottery__hero-section {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #000000 100%);
  border-bottom: 4px solid var(--secondary-color);
}

.page-lottery__main-title {
  font-size: 48px;
  color: var(--secondary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.page-lottery__hero-description {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-lottery__btn-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.page-lottery__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

/* General Section Styles */
.page-lottery__intro-section, 
.page-lottery__guide-section, 
.page-lottery__responsible-gaming-section, 
.page-lottery__about-mp66-section, 
.page-lottery__final-cta-section {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

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

/* Image Styles */
.page-lottery__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__image--large {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.page-lottery__image--medium {
  width: 80%;
  max-height: 400px;
  object-fit: cover;
}

/* Grid Container for Cards */
.page-lottery__grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Card Styles */
.page-lottery__card {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-light);
}

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

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

.page-lottery__card-image--small {
  max-width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 20px auto;
  border-radius: 0;
  box-shadow: none;
}

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

.page-lottery__card-description {
  font-size: 16px;
  color: #f0f0f0;
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-lottery__card-button {
  padding: 12px 25px;
  font-size: 16px;
  margin-top: auto; /* Push button to bottom */
}

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

.page-lottery__guide-item {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-lottery__guide-step-title {
  font-size: 24px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-lottery__guide-step-description {
  font-size: 16px;
  color: #f0f0f0;
}

.page-lottery__cta-buttons--center {
  margin-top: 40px;
}

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

.page-lottery__blog-item {
  text-align: left;
  padding: 0;
  background: var(--bg-card-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-lottery__blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-bottom: 20px;
}

.page-lottery__blog-item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 10px 10px 0 0;
}

.page-lottery__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--secondary-color);
  margin: 0 20px 10px 20px;
  line-height: 1.4;
}

.page-lottery__blog-item-excerpt {
  font-size: 15px;
  color: #cccccc;
  margin: 0 20px 15px 20px;
}

.page-lottery__blog-item-date {
  font-size: 14px;
  color: #888888;
  margin: 0 20px;
  display: block;
}

/* FAQ Section */
.page-lottery__faq-list {
  margin-top: 40px;
}

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card-dark);
  border: 1px solid var(--border-color);
}

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

.page-lottery__faq-question:hover {
  background: #2b323f;
}

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-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(--secondary-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); /* Optional: rotate for 'x' effect */
}

.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 20px;
  opacity: 0;
  background: var(--bg-card-dark);
  color: #f0f0f0;
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color);
}

.page-lottery__faq-answer p {
  margin: 0;
  font-size: 16px;
  color: #f0f0f0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .page-lottery {
    padding-top: 100px !important; /* Mobile fixed header adjustment */
    font-size: 16px;
  }

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

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

  .page-lottery__main-title {
    font-size: 36px;
  }

  .page-lottery__hero-description {
    font-size: 17px;
  }

  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-lottery__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-lottery__grid-container {
    grid-template-columns: 1fr;
  }

  .page-lottery__card-image {
    height: 180px;
  }

  .page-lottery__image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-lottery__image--medium {
    width: 100%;
  }

  .page-lottery__blog-list {
    grid-template-columns: 1fr;
  }

  .page-lottery__blog-item-image {
    height: 180px;
  }

  .page-lottery__faq-question {
    padding: 15px;
  }

  .page-lottery__faq-question h3 {
    font-size: 16px;
  }

  .page-lottery__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-lottery__faq-answer {
    padding: 0 15px;
  }

  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px !important;
  }
}

/* Ensure all images are responsive by default */
.page-lottery img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Specific responsive overrides for images and containers to prevent overflow */
@media (max-width: 768px) {
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-lottery__container,
  .page-lottery__hero-section,
  .page-lottery__intro-section,
  .page-lottery__game-types-section,
  .page-lottery__guide-section,
  .page-lottery__benefits-section,
  .page-lottery__responsible-gaming-section,
  .page-lottery__blog-section,
  .page-lottery__about-mp66-section,
  .page-lottery__faq-section,
  .page-lottery__final-cta-section,
  .page-lottery__card,
  .page-lottery__blog-item,
  .page-lottery__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-lottery__cta-buttons {
    padding-left: 0;
    padding-right: 0;
  }
}