/* style/lottery.css */

/* Custom Colors */
:root {
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
}

.page-lottery {
  font-family: Arial, sans-serif;
  color: var(--color-text-main); /* Default text color for the page */
  background-color: var(--color-background);
}

.page-lottery__section {
  padding: 60px 0;
  position: relative;
}

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

/* Hero Section */
.page-lottery__hero-section {
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, body handles header offset */
  background-color: var(--color-deep-green);
  overflow: hidden;
}

.page-lottery__hero-image-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-bottom: 30px;
}

.page-lottery__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-lottery__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-lottery__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: bold;
  color: var(--color-gold);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.page-lottery__description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 30px;
}

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

.page-lottery__btn-primary,
.page-lottery__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__btn-primary {
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  border: 2px solid transparent;
}

.page-lottery__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

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

.page-lottery__btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-text-main);
  box-shadow: 0 5px 15px rgba(17, 168, 78, 0.4);
}

.page-lottery__btn-center {
  margin: 20px auto 0 auto;
}

/* Section Titles and Text Blocks */
.page-lottery__section-title {
  font-size: 2.5rem;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.3;
}

.page-lottery__text-block {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 25px;
  text-align: justify;
}

/* Image Content */
.page-lottery__image-content {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 12px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

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

.page-lottery__card {
  background-color: var(--color-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--color-border);
  min-height: 450px; /* Ensure cards have some minimum height */
}

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

.page-lottery__card-title {
  font-size: 1.5rem;
  color: var(--color-text-main);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-lottery__card-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  flex-grow: 1;
  margin-bottom: 20px;
}

.page-lottery__card-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-button-gradient);
  color: var(--color-text-main);
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__card-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Benefits List */
.page-lottery__benefits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-lottery__benefits-item {
  background-color: var(--color-card-bg);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
}

.page-lottery__benefits-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  display: inline-block;
  min-width: 64px; /* Ensure icons are not smaller than 200px (this is an exception for small decorative icons) */
  min-height: 64px;
}

.page-lottery__benefits-heading {
  font-size: 1.4rem;
  color: var(--color-text-main);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-lottery__benefits-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* How to Play Steps */
.page-lottery__steps-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-lottery__steps-item {
  background-color: var(--color-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  position: relative;
  padding-left: 70px; /* Space for step number */
}

.page-lottery__steps-item::before {
  content: 'Bước ' counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 20px;
  top: 30px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--color-gold);
  background-color: var(--color-deep-green);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-gold);
}

.page-lottery__steps-heading {
  font-size: 1.4rem;
  color: var(--color-text-main);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-lottery__steps-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* Tips List */
.page-lottery__tips-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-lottery__tips-item {
  background-color: var(--color-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
}

.page-lottery__tips-heading {
  font-size: 1.4rem;
  color: var(--color-text-main);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-lottery__tips-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

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

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

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--color-text-main);
  cursor: pointer;
  background-color: var(--color-deep-green);
  border-bottom: 1px solid var(--color-border);
  list-style: none; /* For details/summary */
}

.page-lottery__faq-question::-webkit-details-marker {
  display: none;
}

.page-lottery__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-gold);
  transition: transform 0.3s ease;
}

.page-lottery__faq-item[open] .page-lottery__faq-toggle {
  transform: rotate(45deg);
}

.page-lottery__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  background-color: var(--color-card-bg);
}

/* Call to Action Section */
.page-lottery__call-to-action {
  text-align: center;
  background-color: var(--color-deep-green);
  padding: 80px 0;
}

.page-lottery__call-to-action .page-lottery__section-title {
  color: var(--color-gold);
  margin-bottom: 25px;
}

.page-lottery__call-to-action .page-lottery__text-block {
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--color-text-secondary);
}

/* Responsive Design */
@media (min-width: 769px) {
  .page-lottery__steps-list {
    counter-reset: step-counter;
    grid-template-columns: repeat(2, 1fr);
  }
  .page-lottery__steps-item:nth-child(odd) {
    margin-right: 15px;
  }
  .page-lottery__steps-item:nth-child(even) {
    margin-left: 15px;
  }
}

@media (min-width: 1024px) {
  .page-lottery__steps-list {
    grid-template-columns: repeat(4, 1fr);
  }
  .page-lottery__steps-item {
    margin: 0 !important;
  }
}

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

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

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

  .page-lottery__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-lottery__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-lottery__cta-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;
  }

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

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

  .page-lottery__card-grid,
  .page-lottery__benefits-list,
  .page-lottery__steps-list,
  .page-lottery__tips-list {
    gap: 20px;
  }

  .page-lottery__card,
  .page-lottery__benefits-item,
  .page-lottery__steps-item,
  .page-lottery__tips-item {
    padding: 20px;
  }

  .page-lottery__card-title,
  .page-lottery__benefits-heading,
  .page-lottery__steps-heading,
  .page-lottery__tips-heading {
    font-size: 1.3rem;
  }

  .page-lottery__card-text,
  .page-lottery__benefits-text,
  .page-lottery__steps-text,
  .page-lottery__tips-text {
    font-size: 0.95rem;
  }

  .page-lottery__steps-item {
    padding-left: 60px;
  }

  .page-lottery__steps-item::before {
    left: 15px;
    top: 20px;
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }

  .page-lottery__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

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

  /* Mobile image specific styles */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

  /* Reset padding for hero image wrapper to ensure full width */
  .page-lottery__hero-image-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .page-lottery__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-lottery__benefits-icon {
    width: 48px; /* Maintain minimum size for content images */
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}