/* style/lottery.css */

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

/* Base styles for the lottery page */
.page-lottery {
  color: var(--rr8-text-main); /* Light text on dark body background */
  background-color: var(--rr8-background); /* Body background from shared.css will override if set */
}

.page-lottery__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
  background: var(--rr8-background);
}

.page-lottery__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.page-lottery__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(0, 0, 0, 0.5); /* Slightly darker overlay for text readability */
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%; /* Ensure content block takes full width up to max-width */
  box-sizing: border-box;
}

.page-lottery__main-title {
  color: var(--rr8-gold-color);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 100%;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.page-lottery__description {
  color: var(--rr8-text-main);
  font-size: 1.15rem;
  line-height: 1.6;
}

.page-lottery__description-small {
  color: var(--rr8-text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-lottery__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  width: 100%; /* Ensure button container takes full width up to max-width */
  box-sizing: border-box;
}

.page-lottery__btn-primary,
.page-lottery__btn-secondary,
.page-lottery__faq-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

.page-lottery__btn-primary {
  background: var(--rr8-button-gradient-start);
  background: linear-gradient(180deg, var(--rr8-button-gradient-start) 0%, var(--rr8-button-gradient-end) 100%);
  color: #ffffff; /* White text for primary button */
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(var(--rr8-button-gradient-end), 0.4);
}

.page-lottery__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--rr8-button-gradient-end), 0.6);
}

.page-lottery__btn-secondary {
  background: transparent;
  color: var(--rr8-gold-color);
  border: 2px solid var(--rr8-gold-color);
  box-shadow: 0 2px 10px rgba(var(--rr8-gold-color), 0.2);
}

.page-lottery__btn-secondary:hover {
  background: var(--rr8-gold-color);
  color: var(--rr8-background);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--rr8-gold-color), 0.4);
}

.page-lottery__section {
  padding: 80px 20px;
  background-color: var(--rr8-background);
}

.page-lottery__section--alt-bg {
  background-color: var(--rr8-deep-green);
}

.page-lottery__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%; /* Ensure container takes full width up to max-width */
  box-sizing: border-box;
}

.page-lottery__heading {
  color: var(--rr8-gold-color);
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

.page-lottery__card {
  background-color: var(--rr8-card-bg);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--rr8-border-color);
  height: 100%;
  box-sizing: border-box;
}

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

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

.page-lottery__card-title,
.page-lottery__step-title,
.page-lottery__promo-title,
.page-lottery__tip-title {
  color: var(--rr8-primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.page-lottery__card-text,
.page-lottery__step-text,
.page-lottery__promo-text,
.page-lottery__tip-text {
  color: var(--rr8-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}

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

.page-lottery__step-card {
  text-align: center;
  padding: 40px;
}

.page-lottery__step-card .page-lottery__btn-primary {
  margin-top: 20px;
  width: auto;
  align-self: center;
}

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

.page-lottery__promo-card {
  text-align: center;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.page-lottery__promo-card .page-lottery__btn-secondary {
  margin-top: 20px;
  width: auto;
  align-self: center;
}

.page-lottery__tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-lottery__tip-item {
  text-align: center;
  padding: 30px;
}

.page-lottery__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-lottery__faq-item {
  background-color: var(--rr8-card-bg);
  border-radius: 8px;
  border: 1px solid var(--rr8-border-color);
  overflow: hidden;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rr8-primary-color);
  cursor: pointer;
  list-style: none;
  position: relative;
  z-index: 1;
}

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

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

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

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

.page-lottery__faq-answer {
  padding: 0 30px 20px;
  font-size: 1rem;
  color: var(--rr8-text-secondary);
  line-height: 1.6;
}

.page-lottery__faq-answer p {
  margin-top: 0;
  margin-bottom: 15px;
}

.page-lottery__faq-link {
  color: var(--rr8-gold-color);
  text-decoration: underline;
  font-weight: 500;
}

.page-lottery__faq-link:hover {
  color: var(--rr8-primary-color);
}

.page-lottery__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--rr8-deep-green);
}

.page-lottery__cta-section .page-lottery__heading {
  margin-bottom: 30px;
}

.page-lottery__cta-section .page-lottery__description {
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-lottery__hero-content {
    padding: 30px;
  }

  .page-lottery__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-lottery__heading {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .page-lottery {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-lottery__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-lottery__hero-content {
    padding: 20px;
    gap: 15px;
  }

  .page-lottery__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-lottery__description {
    font-size: 1rem;
  }

  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-lottery__btn-primary,
  .page-lottery__btn-secondary,
  .page-lottery__faq-link,
  .page-lottery a[class*="button"],
  .page-lottery a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 1rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-lottery__section {
    padding: 50px 15px;
  }

  .page-lottery__container {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-lottery__heading {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  .page-lottery__grid,
  .page-lottery__steps-grid,
  .page-lottery__promotions-grid,
  .page-lottery__tips-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-lottery__card,
  .page-lottery__step-card,
  .page-lottery__promo-card,
  .page-lottery__tip-item,
  .page-lottery__faq-item {
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

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

  .page-lottery__card-title,
  .page-lottery__step-title,
  .page-lottery__promo-title,
  .page-lottery__tip-title {
    font-size: 1.3rem;
  }

  .page-lottery__card-text,
  .page-lottery__step-text,
  .page-lottery__promo-text,
  .page-lottery__tip-text {
    font-size: 0.95rem;
  }

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

  .page-lottery__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }

  /* Mobile image specific styles */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-lottery__card,
  .page-lottery__section,
  .page-lottery__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-lottery__main-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .page-lottery__heading {
    font-size: 1.6rem;
  }

  .page-lottery__hero-content {
    padding: 15px;
  }
}