/* style/lottery.css */
:root {
  --primary-color: #FF4500; /* Cam đỏ sôi động */
  --secondary-color: #00BFFF; /* Xanh da trời tươi sáng */
  --dark-background: #0d0d1a;
  --light-text: #ffffff;
  --dark-text: #333333;
  --card-background-dark-mode: rgba(255, 255, 255, 0.08);
  --card-background-light-mode: #ffffff;
  --border-color: #2a2a3e;
  --button-hover-dark: #cc3700;
  --button-hover-light: #0099cc;
}

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

/* 🚨 Fixed navigation bar spacing */
.page-lottery.page-content {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
}

.page-lottery__hero-section {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, #cc3700 100%);
  color: var(--light-text);
  overflow: hidden;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__hero-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-lottery__main-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-lottery__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 8px;
  font-size: 1.1em;
  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;
  max-width: 100%; /* Responsive button */
  box-sizing: border-box; /* Responsive button */
  white-space: normal; /* Responsive button */
  word-wrap: break-word; /* Responsive button */
}

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

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

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

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

.page-lottery__features-section,
.page-lottery__guide-section,
.page-lottery__brand-section,
.page-lottery__faq-section,
.page-lottery__blog-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-lottery__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--light-text);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-lottery__section-subtitle {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 60px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 800px;
  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: 40px;
}

.page-lottery__feature-card {
  background: var(--card-background-dark-mode);
  border-radius: 10px;
  padding: 30px;
  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;
  align-items: center;
  color: var(--light-text);
  border: 1px solid var(--border-color);
}

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

.page-lottery__feature-image {
  width: 100%;
  max-width: 300px; /* Ensure images are not too small but still content images */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  display: block;
}

.page-lottery__feature-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-lottery__feature-description {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

.page-lottery__guide-section {
  background: linear-gradient(135deg, var(--dark-background) 0%, #1a1a2e 100%);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: var(--light-text);
}

.page-lottery__guide-container {
  max-width: 1000px;
  margin: 0 auto;
}

.page-lottery__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.page-lottery__step-item {
  background: var(--card-background-dark-mode);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.page-lottery__step-icon {
  width: 60px;
  height: 60px;
  line-height: 60px;
  background: var(--primary-color);
  color: var(--light-text);
  border-radius: 50%;
  font-size: 2em;
  font-weight: bold;
  margin: 0 auto 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-lottery__step-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-lottery__step-description {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.7);
}

.page-lottery__cta-bottom {
  text-align: center;
  margin-top: 40px;
}

.page-lottery__brand-section {
  background-color: var(--dark-background);
  color: var(--light-text);
}

.page-lottery__brand-container {
  max-width: 1000px;
  margin: 0 auto;
}

.page-lottery__brand-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--light-text);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-lottery__brand-content p {
  font-size: 1.1em;
  margin-bottom: 25px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.page-lottery__brand-item {
  background: var(--card-background-dark-mode);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.page-lottery__brand-item h3 {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-lottery__brand-item p {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.75);
}

/* FAQ Section */
.page-lottery__faq-section {
  background-color: var(--dark-background);
}

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

.page-lottery__faq-list {
  margin-top: 40px;
}

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

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

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

.page-lottery__faq-toggle {
  font-size: 2em;
  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 {
  transform: rotate(45deg);
  color: var(--light-text);
}

.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(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid var(--border-color);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Sufficiently large value */
  padding: 20px 25px !important;
  opacity: 1;
}

/* Blog Section */
.page-lottery__blog-section {
  background-color: var(--dark-background);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: var(--light-text);
}

.page-lottery__blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-lottery__blog-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--light-text);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

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

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

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

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

.page-lottery__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  margin-bottom: 15px;
  display: block;
}

.page-lottery__blog-item-title {
  font-size: 1.3em;
  font-weight: 600;
  margin: 0 20px 10px;
  color: var(--secondary-color);
}

.page-lottery__blog-item-excerpt {
  font-size: 0.95em;
  margin: 0 20px 15px;
  color: rgba(255, 255, 255, 0.75);
}

.page-lottery__blog-item-date {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 20px;
  display: block;
}

/* 🚨 Mobile Responsive */
@media (max-width: 768px) {
  .page-lottery.page-content {
    padding-top: 100px !important; /* Mobile: Adjust based on mobile header height */
  }

  .page-lottery__hero-section {
    padding: 60px 15px;
    border-radius: 0 0 10px 10px;
  }

  .page-lottery__main-title {
    font-size: 2em;
  }

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

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

  .page-lottery__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-lottery__features-section,
  .page-lottery__guide-section,
  .page-lottery__brand-section,
  .page-lottery__faq-section,
  .page-lottery__blog-section {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-lottery__section-title,
  .page-lottery__brand-title,
  .page-lottery__blog-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-lottery__section-subtitle {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-lottery__feature-grid,
  .page-lottery__guide-steps,
  .page-lottery__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-lottery__feature-card,
  .page-lottery__step-item,
  .page-lottery__blog-item {
    padding: 20px;
  }

  .page-lottery__feature-image {
    max-width: 250px;
    height: auto !important;
    width: 100% !important;
  }

  .page-lottery__feature-title {
    font-size: 1.3em;
  }

  .page-lottery__step-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.8em;
  }

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

  .page-lottery__brand-content p,
  .page-lottery__brand-item p {
    font-size: 0.95em;
  }

  .page-lottery__brand-item h3 {
    font-size: 1.4em;
  }

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

  .page-lottery__faq-question h3 {
    font-size: 1.1em;
  }

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

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

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

  .page-lottery__blog-item-title {
    font-size: 1.1em;
    margin: 0 15px 8px;
  }

  .page-lottery__blog-item-excerpt,
  .page-lottery__blog-item-date {
    font-size: 0.9em;
    margin: 0 15px 10px;
  }
}

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

/* Ensure all containers for images are responsive */
.page-lottery__feature-card,
.page-lottery__blog-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 🚨 Mobile image specific override */
@media (max-width: 768px) {
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__hero-container,
  .page-lottery__features-container,
  .page-lottery__guide-container,
  .page-lottery__brand-container,
  .page-lottery__faq-container,
  .page-lottery__blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Smart color contrast for dark background */
.page-lottery__dark-bg {
  color: var(--light-text); /* Deep dark background requires light text */
}

.page-lottery__card {
  background: var(--card-background-dark-mode);
  color: var(--light-text);
}

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

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