/* style/lottery.css */
.page-lottery {
  font-family: 'Arial', sans-serif;
  color: #ffffff; /* Default text color for dark body background */
  line-height: 1.6;
}

/* Header offset for main content */
.page-lottery__hero-section {
  padding-top: var(--header-offset, 120px);
}

/* Sections */
.page-lottery__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  text-align: center;
  color: #ffffff;
  font-weight: bold;
}

.page-lottery__section-text {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

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

/* Background colors */
.page-lottery__dark-bg {
  background-color: #0a0a0a;
  color: #ffffff;
}

.page-lottery__light-bg {
  background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
  color: #ffffff;
}

/* Hero Section */
.page-lottery__hero-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  gap: 40px;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.page-lottery__hero-content {
  flex: 1;
  max-width: 600px;
  text-align: left;
  z-index: 1;
}

.page-lottery__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

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

.page-lottery__hero-buttons {
  display: flex;
  gap: 20px;
}

.page-lottery__hero-image-wrapper {
  flex: 1;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.page-lottery__hero-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.page-lottery__btn-primary,
.page-lottery__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
}

.page-lottery__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-lottery__btn-primary:hover {
  background-color: #1e87b7;
  border-color: #1e87b7;
}

.page-lottery__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-lottery__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Special Login Button Color */
a[href*="login.html"].page-lottery__btn-primary,
a[href*="login.html"].page-lottery__btn-secondary,
a[href*="redirect?plink_id="][class*="login"],
a[href*="redirect?plink_id="][class*="dang-nhap"] {
  background-color: #EA7C07;
  border-color: #EA7C07;
  color: #ffffff;
}

a[href*="login.html"].page-lottery__btn-primary:hover,
a[href*="login.html"].page-lottery__btn-secondary:hover,
a[href*="redirect?plink_id="][class*="login"]:hover,
a[href*="redirect?plink_id="][class*="dang-nhap"]:hover {
  background-color: #c06506;
  border-color: #c06506;
}

.page-lottery__inline-link {
  color: #26A9E0;
  text-decoration: underline;
  font-weight: bold;
}

.page-lottery__inline-link:hover {
  color: #1e87b7;
}

/* About Xổ số Section */
.page-lottery__about-xoso .page-lottery__section-title,
.page-lottery__about-xoso .page-lottery__section-text {
  color: #ffffff;
}

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

.page-lottery__feature-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff;
}

.page-lottery__feature-card:hover {
  transform: translateY(-10px);
}

.page-lottery__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px;
}

.page-lottery__card-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: #26A9E0;
}

.page-lottery__card-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* Types of Xổ số Section */
.page-lottery__types-of-xoso .page-lottery__section-title,
.page-lottery__types-of-xoso .page-lottery__section-text {
  color: #ffffff;
}

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

.page-lottery__xoso-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff;
}

.page-lottery__xoso-card:hover {
  transform: translateY(-10px);
}

.page-lottery__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px;
}

/* How to Play Section */
.page-lottery__how-to-play .page-lottery__section-title,
.page-lottery__how-to-play .page-lottery__section-text {
  color: #ffffff;
}

.page-lottery__steps-list {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
  margin-top: 40px;
}

.page-lottery__step-item {
  background: rgba(255, 255, 255, 0.05); /* Lighter background for steps */
  margin-bottom: 20px;
  padding: 25px;
  border-radius: 10px;
  position: relative;
  padding-left: 80px;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.page-lottery__step-item::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #26A9E0;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
}

.page-lottery__step-title {
  font-size: 1.6em;
  margin-bottom: 10px;
  color: #26A9E0;
}

.page-lottery__step-description {
  font-size: 1.1em;
  color: #f0f0f0;
}

/* Tips Section */
.page-lottery__tips-section .page-lottery__section-title,
.page-lottery__tips-section .page-lottery__section-text {
  color: #ffffff;
}

.page-lottery__tips-list {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 40px auto 0 auto;
}

.page-lottery__tip-item {
  background: rgba(255, 255, 255, 0.08); /* Slightly lighter background */
  margin-bottom: 15px;
  padding: 20px;
  border-radius: 8px;
  font-size: 1.1em;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-lottery__tip-item strong {
  color: #26A9E0;
}

/* Promotions Section */
.page-lottery__promotions-section .page-lottery__section-title,
.page-lottery__promotions-section .page-lottery__section-text {
  color: #ffffff;
}

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

.page-lottery__promo-card {
  background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-lottery__promo-card:hover {
  transform: translateY(-10px);
}

.page-lottery__promo-card .page-lottery__card-image {
  height: 220px;
  object-fit: cover;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px;
}

.page-lottery__promo-card .page-lottery__card-title {
  color: #26A9E0;
  font-size: 1.6em;
  margin-bottom: 10px;
}

.page-lottery__promo-card .page-lottery__card-text {
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-lottery__faq-section .page-lottery__section-title {
  color: #ffffff;
}

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

.page-lottery__faq-item {
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter background */
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background-color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

.page-lottery__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-lottery__faq-qtext {
  flex-grow: 1;
  color: #26A9E0;
}

.page-lottery__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: #ffffff;
}

.page-lottery__faq-item[open] .page-lottery__faq-toggle {
  content: '−';
}

.page-lottery__faq-answer {
  padding: 15px 25px 25px 25px;
  font-size: 1.1em;
  color: #f0f0f0;
  background-color: rgba(255, 255, 255, 0.03);
}

/* Hide default details marker */
.page-lottery__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-lottery__faq-item summary {
  list-style: none;
}

/* CTA Section */
.page-lottery__cta-section .page-lottery__section-title,
.page-lottery__cta-section .page-lottery__section-text {
  color: #ffffff;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-lottery__hero-section {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
  }

  .page-lottery__hero-content,
  .page-lottery__hero-image-wrapper {
    max-width: 100%;
  }

  .page-lottery__hero-title {
    font-size: 2.8em;
  }

  .page-lottery__hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-lottery__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }
  .page-lottery__section-title {
    font-size: 2em;
  }

  .page-lottery__hero-title {
    font-size: 2.2em;
  }

  .page-lottery__hero-description {
    font-size: 1em;
  }

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

  .page-lottery__btn-primary,
  .page-lottery__btn-secondary,
  .page-lottery a[class*="button"],
  .page-lottery a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-lottery__cta-buttons,
  .page-lottery__button-group,
  .page-lottery__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column;
  }

  .page-lottery__container,
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__xoso-card,
  .page-lottery__promo-card,
  .page-lottery__feature-card,
  .page-lottery__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-lottery__feature-icon,
  .page-lottery__card-image {
    min-width: unset; /* Allow images to scale down */
    min-height: unset;
  }

  .page-lottery__step-item {
    padding-left: 20px;
    padding-right: 15px;
  }

  .page-lottery__step-item::before {
    position: static;
    transform: none;
    margin-bottom: 10px;
    display: inline-flex;
    margin-right: 10px;
  }

  .page-lottery__step-title {
    font-size: 1.4em;
  }

  .page-lottery__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

  .page-lottery__faq-answer {
    padding: 10px 20px 20px 20px;
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .page-lottery__hero-title {
    font-size: 1.8em;
  }

  .page-lottery__section-title {
    font-size: 1.8em;
  }
}