/* style/lottery.css */
:root {
  --primary-color: #003366;
  --secondary-color: #FFCC00;
  --accent-color: #CC0000;
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --background-dark: #121212; /* From shared.css body background */
  --card-bg-dark-mode: rgba(255, 255, 255, 0.08);
  --border-color-dark-mode: rgba(255, 255, 255, 0.15);
}

.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark-bg); /* Body background is dark */
  background-color: var(--background-dark);
  padding-top: 10px; /* Adjusted for fixed header - Desktop */
}

.page-lottery h1, .page-lottery h2, .page-lottery h3, .page-lottery h4, .page-lottery h5, .page-lottery h6 {
  color: var(--secondary-color);
  margin-bottom: 1em;
  line-height: 1.2;
}

.page-lottery h1 {
  font-size: 3.2em;
  text-align: center;
  color: var(--secondary-color);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.page-lottery h2 {
  font-size: 2.5em;
  text-align: center;
  color: var(--secondary-color);
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.page-lottery h3 {
  font-size: 1.8em;
  color: var(--text-color-dark-bg);
  margin-top: 1.2em;
  margin-bottom: 0.6em;
}

.page-lottery p {
  margin-bottom: 1em;
  font-size: 1.1em;
}

.page-lottery a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-lottery a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.page-lottery__hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('[GALLERY:hero:788bet,xoso,banner,background]') no-repeat center center/cover;
  padding: 80px 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-top: 120px; /* Ensures content is below fixed header */
}

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

.page-lottery__main-title {
  font-size: 3.8em;
  margin-bottom: 0.5em;
  color: var(--secondary-color);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.page-lottery__hero-description {
  font-size: 1.3em;
  color: var(--text-color-dark-bg);
  margin-bottom: 2em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

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

.page-lottery__cta-button--primary:hover {
  background-color: #e6b800;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-lottery__cta-button--secondary {
  background-color: var(--primary-color);
  color: var(--text-color-dark-bg);
  border: 2px solid var(--secondary-color);
}

.page-lottery__cta-button--secondary:hover {
  background-color: #002244;
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-lottery__section-title {
  font-size: 2.8em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 1em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-lottery__introduction-section,
.page-lottery__game-types-section,
.page-lottery__how-to-play-section,
.page-lottery__benefits-section,
.page-lottery__faq-section,
.page-lottery__conclusion-section {
  padding: 60px 20px;
  text-align: center;
}

.page-lottery__introduction-container,
.page-lottery__game-types-container,
.page-lottery__how-to-play-container,
.page-lottery__benefits-container,
.page-lottery__faq-container,
.page-lottery__conclusion-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-lottery__introduction-section p {
  max-width: 800px;
  margin: 0 auto 2em auto;
  font-size: 1.15em;
}

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

.page-lottery__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em auto;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-lottery__image--large {
  max-width: 900px;
}

.page-lottery__grid {
  display: grid;
  gap: 30px;
  margin-top: 2em;
}

.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(350px, 1fr));
}

.page-lottery__card {
  background: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
  border-radius: 12px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 6px 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(--text-color-dark-bg);
}

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

.page-lottery__card-image {
  width: 100%;
  max-width: 400px; /* Ensure images are not too small but fit card */
  height: auto;
  border-radius: 8px;
  margin-bottom: 1.5em;
  object-fit: cover;
  aspect-ratio: 16/9;
}

.page-lottery__card-title {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 0.8em;
  text-align: center;
}

.page-lottery__card-description {
  font-size: 1em;
  margin-bottom: 1.5em;
  flex-grow: 1;
  text-align: center;
}

.page-lottery__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.page-lottery__btn-primary:hover {
  background-color: var(--accent-color);
  color: var(--text-color-dark-bg);
  transform: translateY(-2px);
}

.page-lottery__btn-primary--large {
  padding: 18px 40px;
  font-size: 1.3em;
  margin-top: 2em;
}

.page-lottery__steps-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 2em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-lottery__step-item {
  background: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
  border-radius: 10px;
  padding: 25px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-lottery__step-number {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  flex-shrink: 0;
}

.page-lottery__step-title {
  font-size: 1.4em;
  margin: 0;
  color: var(--secondary-color);
}

.page-lottery__step-item p {
  margin: 0;
  font-size: 1em;
  color: var(--text-color-dark-bg);
}

.page-lottery__feature-card {
  background: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color-dark-bg);
}

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

.page-lottery__feature-title {
  font-size: 1.4em;
  color: var(--secondary-color);
  margin-bottom: 0.5em;
}

.page-lottery__feature-card p {
  font-size: 1em;
  margin: 0;
}

/* FAQ styles */
.page-lottery__faq-list {
  margin-top: 2em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-lottery__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--card-bg-dark-mode);
  border: 1px solid var(--border-color-dark-mode);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-color-dark-bg);
  pointer-events: none;
}

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

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  color: var(--accent-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: var(--card-bg-dark-mode);
  color: var(--text-color-dark-bg);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color-dark-mode);
}

.page-lottery__faq-answer p {
  margin: 0;
  font-size: 1em;
  color: var(--text-color-dark-bg);
}

.page-lottery__conclusion-section p {
  max-width: 800px;
  margin: 0 auto 2em auto;
  font-size: 1.15em;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery h1 {
    font-size: 3em;
  }
  .page-lottery h2 {
    font-size: 2.2em;
  }
  .page-lottery__hero-section {
    min-height: 450px;
    padding-top: 100px; /* Tablet */
  }
}

@media (max-width: 768px) {
  .page-lottery {
    padding-top: 10px !important; /* Mobile - Ensures content is below fixed header */
    font-size: 16px;
    line-height: 1.6;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .page-lottery h1 {
    font-size: 2.5em;
  }
  .page-lottery h2 {
    font-size: 2em;
  }
  .page-lottery h3 {
    font-size: 1.3em;
  }

  .page-lottery__hero-section {
    padding: 60px 15px;
    min-height: 400px;
    padding-top: 80px; /* Mobile */
  }

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

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

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

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

  .page-lottery__introduction-section,
  .page-lottery__game-types-section,
  .page-lottery__how-to-play-section,
  .page-lottery__benefits-section,
  .page-lottery__faq-section,
  .page-lottery__conclusion-section {
    padding: 40px 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .page-lottery__introduction-container,
  .page-lottery__game-types-container,
  .page-lottery__how-to-play-container,
  .page-lottery__benefits-container,
  .page-lottery__faq-container,
  .page-lottery__conclusion-container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .page-lottery__image,
  .page-lottery__card-image,
  .page-lottery__feature-icon {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-lottery__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-lottery__card {
    padding: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

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

  .page-lottery__btn-primary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-lottery__btn-primary--large {
    padding: 15px 30px;
    font-size: 1.1em;
  }

  .page-lottery__steps-list {
    gap: 15px;
  }

  .page-lottery__step-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .page-lottery__step-number {
    margin-bottom: 10px;
  }

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

  .page-lottery__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-lottery__faq-question h3 {
    font-size: 1.1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-lottery__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-lottery__faq-answer {
    padding: 0 15px;
  }
  
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px !important;
  }

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

@media (max-width: 480px) {
  .page-lottery h1 {
    font-size: 2em;
  }
  .page-lottery__main-title {
    font-size: 2.2em;
  }
  .page-lottery__section-title {
    font-size: 1.8em;
  }
  .page-lottery__hero-section {
    min-height: 350px;
  }
  .page-lottery__cta-button {
    font-size: 1em;
    padding: 10px 20px;
  }
  .page-lottery__step-title {
    font-size: 1.1em;
  }
  .page-lottery__faq-question h3 {
    font-size: 1em;
  }
}