/* style/lottery.css */
:root {
  --primary-color: #FFD700; /* Vàng */
  --secondary-color: #1A2E44; /* Xanh đậm */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #000000; /* Body background from shared.css */
  --card-bg-dark: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.2);
}

.page-lottery {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Body background is dark, so text is light */
  line-height: 1.6;
  background-color: var(--background-dark);
  /* 🚨 Fixed Navbar Spacing */
  padding-top: 120px; /* Desktop: Adjust based on shared header height */
}

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

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

.page-lottery__hero-section {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #0A1C2E 100%);
  position: relative;
  overflow: hidden;
}

.page-lottery__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('[GALLERY:background:td88,xoso,hero-pattern]') no-repeat center center/cover;
  opacity: 0.1;
  z-index: 0;
}

.page-lottery__hero-section .page-lottery__container {
  position: relative;
  z-index: 1;
}

.page-lottery__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.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: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

.page-lottery__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-lottery__intro-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

.page-lottery__text-block {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 30px;
  text-align: justify;
  color: var(--text-light);
}

.page-lottery__image-full-width {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.page-lottery__games-section {
  padding: 80px 0;
}

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

.page-lottery__game-card {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-lottery__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

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

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

.page-lottery__card-description {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-lottery__card-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-lottery__card-button:hover {
  background: #e0bb00;
}

.page-lottery__guide-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

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

.page-lottery__step-item {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-lottery__step-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

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

.page-lottery__step-description {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-lottery__step-button {
  display: inline-block;
  padding: 10px 25px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-lottery__step-button:hover {
  background: #e0bb00;
}

.page-lottery__promo-section {
  padding: 80px 0;
}

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

.page-lottery__promo-card {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-lottery__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

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

.page-lottery__why-choose-section {
  padding: 80px 0;
  background-color: var(--background-dark);
}

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

.page-lottery__feature-item {
  background: var(--card-bg-dark);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-lottery__feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
}

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

.page-lottery__feature-description {
  font-size: 16px;
  color: var(--text-light);
  flex-grow: 1;
}

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

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

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

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

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

.page-lottery__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

.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(--primary-color);
}

.page-lottery__faq-toggle {
  font-size: 28px;
  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;
  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(--primary-color);
}

.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: rgba(255, 255, 255, 0.05);
  border-radius: 0 0 5px 5px;
  border: 1px solid var(--border-color);
  border-top: none;
  color: var(--text-light);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
}

.page-lottery__conclusion-section {
  padding: 80px 0;
  text-align: center;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-lottery__main-title {
    font-size: 42px;
  }
  .page-lottery__section-title {
    font-size: 34px;
  }
}

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

  .page-lottery__hero-section {
    padding: 80px 0;
  }

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

  .page-lottery__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

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

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

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

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

  .page-lottery__games-section, .page-lottery__guide-section, .page-lottery__promo-section, .page-lottery__why-choose-section, .page-lottery__faq-section, .page-lottery__conclusion-section {
    padding: 60px 0;
  }

  .page-lottery__game-grid, .page-lottery__guide-steps, .page-lottery__promo-grid, .page-lottery__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  .page-lottery__step-icon {
    width: 80px;
    height: 80px;
  }

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

  .page-lottery__feature-icon {
    width: 70px;
    height: 70px;
  }

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

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

  .page-lottery__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }

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

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

  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px !important;
  }
  
  /* 🚨 All images responsive on mobile */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-lottery__container,
  .page-lottery__game-card,
  .page-lottery__step-item,
  .page-lottery__promo-card,
  .page-lottery__feature-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;
  }
}

@media (max-width: 480px) {
  .page-lottery__main-title {
    font-size: 30px;
  }
  .page-lottery__section-title {
    font-size: 24px;
  }
  .page-lottery__cta-button {
    padding: 10px 20px;
    font-size: 15px;
  }
  .page-lottery__faq-question h3 {
    font-size: 15px;
  }
  .page-lottery__faq-toggle {
    font-size: 22px;
  }
}