/* style/lottery.css */

/* Biến CSS cục bộ cho trang Xổ số */
:root {
  --page-lottery-primary-color: #0A2463;
  --page-lottery-secondary-color: #E0B14A;
  --page-lottery-text-light: #ffffff;
  --page-lottery-text-dark: #333333;
  --page-lottery-bg-dark-card: rgba(255, 255, 255, 0.08);
  --page-lottery-border-color: rgba(255, 255, 255, 0.15);
}

/* Đảm bảo nội dung trang không bị che bởi header cố định */
.page-lottery__hero-banner {
  padding-top: 120px; /* Khoảng cách cho desktop */
}

/* Responsive padding cho mobile */
@media (max-width: 768px) {
  .page-lottery__hero-banner {
    padding-top: 100px; /* Khoảng cách cho mobile */
  }
}

/* Thiết lập màu chữ mặc định cho trang dựa trên màu nền body (var(--dark-bg-1) là màu tối) */
.page-lottery {
  color: var(--page-lottery-text-light); /* Chữ sáng trên nền tối */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-lottery__dark-bg {
  background-color: var(--page-lottery-primary-color);
  color: var(--page-lottery-text-light);
}

.page-lottery__light-bg {
  background-color: var(--page-lottery-text-light);
  color: var(--page-lottery-text-dark);
}

.page-lottery__section {
  padding: 60px 0;
  text-align: center;
}

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

.page-lottery__heading {
  font-size: 38px;
  margin-bottom: 20px;
  font-weight: 700;
  color: inherit; /* Kế thừa màu từ section */
}

.page-lottery__description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
  color: inherit;
}

.page-lottery__text-link {
  color: var(--page-lottery-secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-lottery__text-link:hover {
  color: #ffd700; /* Màu vàng sáng hơn khi hover */
}

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

/* Hero Banner Section */
.page-lottery__hero-banner {
  background: linear-gradient(135deg, var(--page-lottery-primary-color) 0%, #1a3a7c 100%);
  padding: 80px 0;
  display: flex;
  align-items: center;
  min-height: 500px;
}

.page-lottery__hero-banner .page-lottery__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 40px;
}

.page-lottery__hero-content {
  flex: 1;
}

.page-lottery__main-heading {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 25px;
  line-height: 1.2;
  color: var(--page-lottery-text-light);
}

.page-lottery__hero-description {
  font-size: 20px;
  margin-bottom: 35px;
  line-height: 1.7;
  color: var(--page-lottery-text-light);
}

.page-lottery__hero-image {
  flex: 1;
  max-width: 500px;
}

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

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

/* Buttons */
.page-lottery__btn-primary,
.page-lottery__btn-secondary,
.page-lottery__btn-tertiary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.page-lottery__btn-primary:hover {
  background: #ffd700;
  border-color: #ffd700;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(224, 177, 74, 0.4);
}

.page-lottery__btn-secondary {
  background: transparent;
  color: var(--page-lottery-secondary-color);
  border-color: var(--page-lottery-secondary-color);
}

.page-lottery__btn-secondary:hover {
  background: var(--page-lottery-secondary-color);
  color: var(--page-lottery-text-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(224, 177, 74, 0.4);
}

.page-lottery__btn-tertiary {
  background: var(--page-lottery-primary-color);
  color: var(--page-lottery-secondary-color);
  border-color: var(--page-lottery-secondary-color);
  padding: 12px 25px;
  font-size: 16px;
}

.page-lottery__btn-tertiary:hover {
  background: var(--page-lottery-secondary-color);
  color: var(--page-lottery-primary-color);
  border-color: var(--page-lottery-secondary-color);
}

.page-lottery__btn-link {
  color: var(--page-lottery-secondary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.3s ease;
  display: inline-block;
  margin-top: 15px;
}

.page-lottery__btn-link:hover {
  color: #ffd700;
  text-decoration: underline;
}

/* Grid Layouts */
.page-lottery__grid {
  display: grid;
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__grid--3-cols {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-lottery__grid--2-cols {
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

/* Cards */
.page-lottery__card {
  background-color: var(--page-lottery-bg-dark-card);
  border: 1px solid var(--page-lottery-border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--page-lottery-text-light);
}

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

.page-lottery__card-icon {
  margin-bottom: 20px;
}

.page-lottery__card-icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.page-lottery__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: inherit;
}

.page-lottery__card-text {
  font-size: 16px;
  line-height: 1.7;
  color: inherit;
}

/* Card Type specific styles */
.page-lottery__card--type {
  display: flex;
  text-align: left;
  padding: 20px;
  background-color: var(--page-lottery-bg-dark-card);
  color: var(--page-lottery-text-light);
  border: 1px solid var(--page-lottery-border-color);
}

.page-lottery__card-image-wrapper {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  margin-right: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.page-lottery__card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-lottery__card--type .page-lottery__card-title {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-lottery__card--type .page-lottery__card-text {
  font-size: 15px;
  margin-bottom: 15px;
}

/* How-To-Play Steps */
.page-lottery__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-lottery__step-item {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  color: var(--page-lottery-text-dark);
  border: 1px solid #e0e0e0;
}

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

.page-lottery__step-icon {
  margin-bottom: 20px;
}

.page-lottery__step-icon img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

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

.page-lottery__step-text {
  font-size: 16px;
  line-height: 1.7;
}

/* Promotions Section */
.page-lottery__promotions .page-lottery__heading,
.page-lottery__promotions .page-lottery__description {
  color: var(--page-lottery-text-light);
}

.page-lottery__promo-card {
  background-color: var(--page-lottery-bg-dark-card);
  border: 1px solid var(--page-lottery-border-color);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  color: var(--page-lottery-text-light);
}

.page-lottery__promo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-lottery__promo-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-lottery__promo-title {
  font-size: 24px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  color: inherit;
}

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

.page-lottery__more-promos {
  margin-top: 60px;
  text-align: center;
}

.page-lottery__more-promos p {
  font-size: 18px;
  margin-bottom: 25px;
  color: var(--page-lottery-text-light);
}

/* FAQ Section */
.page-lottery__faq .page-lottery__heading,
.page-lottery__faq .page-lottery__description {
  color: var(--page-lottery-text-dark);
}

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

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

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

.page-lottery__faq-item.active .page-lottery__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.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;
  color: var(--page-lottery-text-dark);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-lottery__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--page-lottery-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: 28px;
  height: 28px;
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  color: var(--page-lottery-secondary-color);
  transform: rotate(180deg);
}

.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-color: #f9f9f9;
  color: var(--page-lottery-text-dark);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

.page-lottery__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* Call to Action Section */
.page-lottery__cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #1a3a7c 0%, var(--page-lottery-primary-color) 100%);
}

.page-lottery__cta .page-lottery__heading,
.page-lottery__cta .page-lottery__description {
  color: var(--page-lottery-text-light);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__hero-banner .page-lottery__container {
    flex-direction: column;
    text-align: center;
  }

  .page-lottery__hero-content {
    order: 2;
  }

  .page-lottery__hero-image {
    order: 1;
    max-width: 80%;
    margin-bottom: 30px;
  }

  .page-lottery__main-heading {
    font-size: 42px;
  }

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

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

  .page-lottery__card--type {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-lottery__card-image-wrapper {
    margin-right: 0;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .page-lottery__section {
    padding: 40px 0;
  }

  .page-lottery__heading {
    font-size: 30px;
  }

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

  .page-lottery__hero-banner {
    padding: 60px 0;
    min-height: auto;
  }

  .page-lottery__main-heading {
    font-size: 32px;
  }

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

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

  .page-lottery__btn-primary,
  .page-lottery__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
  }

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

  .page-lottery__card {
    padding: 25px;
  }

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

  .page-lottery__step-item {
    padding: 25px;
  }

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

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

  .page-lottery__more-promos {
    margin-top: 40px;
  }

  .page-lottery__more-promos p {
    font-size: 16px;
  }

  .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: 24px;
    height: 24px;
    font-size: 20px;
  }

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

  .page-lottery__faq-answer p {
    font-size: 15px;
  }

  .page-lottery__cta {
    padding: 60px 0;
  }

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

  /* Mobile image adaptation */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-lottery__container,
  .page-lottery__card,
  .page-lottery__promo-card,
  .page-lottery__step-item,
  .page-lottery__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}