/* style/lottery.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1A1A1A; /* Dark Grey */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212; /* Body background from shared.css */
  --card-bg-dark: rgba(255, 255, 255, 0.08); /* Slightly transparent white for dark bg */
  --border-color-dark: rgba(255, 255, 255, 0.15);
}

.page-lottery {
  color: var(--text-light); /* Light text for dark body background */
  background-color: var(--bg-dark);
  line-height: 1.6;
  font-family: 'Arial', sans-serif;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Ensure content is not hidden by fixed header */
.page-lottery__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on shared header height */
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-bottom: 60px;
}

.page-lottery__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  z-index: 1;
  position: relative;
}

.page-lottery__main-title {
  font-size: 3.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-lottery__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-lottery__cta-button {
  display: inline-block;
  padding: 15px 40px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  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;
}

.page-lottery__btn-primary {
  background: var(--primary-color);
  color: var(--secondary-color); /* Dark text for gold button */
}

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

.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 20px rgba(0, 0, 0, 0.4);
}

.page-lottery__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-lottery__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4); /* Darken image to ensure text contrast */
  display: block;
}

.page-lottery__section {
  padding: 80px 20px;
  position: relative;
  z-index: 2;
}

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

.page-lottery__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-lottery__text-block {
  font-size: 1.1em;
  color: var(--text-light);
  margin-bottom: 20px;
  text-align: justify;
}

.page-lottery__introduction-section {
  background-color: var(--bg-dark);
}

.page-lottery__types-section {
  background-color: var(--secondary-color);
  padding-bottom: 100px;
}

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

.page-lottery__card {
  background: var(--card-bg-dark);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-light);
  border: 1px solid var(--border-color-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

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

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

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

.page-lottery__btn-small {
  display: inline-block;
  padding: 10px 25px;
  font-size: 0.9em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  background: var(--primary-color);
  color: var(--secondary-color);
  transition: background 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__btn-small:hover {
  background: #e6c200;
}

.page-lottery__guide-section {
  background-color: var(--bg-dark);
}

.page-lottery__guide-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-lottery__guide-list li {
  background: var(--card-bg-dark);
  border: 1px solid var(--border-color-dark);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.page-lottery__guide-step-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-lottery__guide-list li p {
  color: var(--text-light);
  font-size: 1.05em;
  margin-bottom: 15px;
}

.page-lottery__btn-text {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  display: inline-block;
  margin-top: 10px;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-lottery__advantages-section {
  background-color: var(--secondary-color);
}

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

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

.page-lottery__advantage-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-lottery__advantage-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-lottery__advantage-item p {
  color: var(--text-light);
  font-size: 1em;
}

.page-lottery__faq-section {
  background-color: var(--bg-dark);
}

.page-lottery__faq-list {
  margin-top: 40px;
}

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

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

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-lottery__faq-question h3 a {
  color: var(--primary-color);
  text-decoration: none;
  pointer-events: auto; /* Allow link inside h3 to be clickable */
}

.page-lottery__faq-question h3 a:hover {
  text-decoration: underline;
}

.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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-lottery__faq-item.active .page-lottery__faq-toggle {
  transform: rotate(180deg);
  color: #e6c200;
}

.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 25px;
  opacity: 0;
  color: var(--text-light);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-color-dark);
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Sufficiently large value */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(0, 0, 0, 0.3);
}

.page-lottery__faq-answer p {
  margin-bottom: 10px;
  font-size: 1em;
}

.page-lottery__faq-answer a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-lottery__faq-answer a:hover {
  text-decoration: underline;
}

.page-lottery__conclusion-section {
  padding-top: 60px;
  padding-bottom: 100px;
  background-color: var(--secondary-color);
  text-align: center;
}

.page-lottery__conclusion-section .page-lottery__cta-button {
  margin-top: 40px;
}

.text-highlight {
  color: var(--primary-color);
}

.link-no-underline {
  text-decoration: none;
  color: inherit;
}

.link-no-underline:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-lottery__main-title {
    font-size: 3em;
  }
  .page-lottery__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-lottery__hero-section {
    padding-top: 100px !important; /* Mobile: Adjust for mobile shared header */
    min-height: 400px;
    padding-bottom: 40px;
  }
  .page-lottery__main-title {
    font-size: 2.2em;
  }
  .page-lottery__hero-description {
    font-size: 1em;
  }
  .page-lottery__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-lottery__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
  }
  .page-lottery__section {
    padding: 50px 15px;
  }
  .page-lottery__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-lottery__text-block {
    font-size: 0.95em;
  }
  .page-lottery__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-lottery__card {
    padding: 20px;
  }
  .page-lottery__card-image {
    height: 180px;
  }
  .page-lottery__card-title {
    font-size: 1.3em;
  }
  .page-lottery__guide-list li {
    padding: 20px;
  }
  .page-lottery__guide-step-title {
    font-size: 1.2em;
  }
  .page-lottery__guide-list li p {
    font-size: 0.95em;
  }
  .page-lottery__advantage-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-lottery__advantage-item {
    padding: 20px;
  }
  .page-lottery__advantage-icon {
    width: 80px;
    height: 80px;
  }
  .page-lottery__advantage-title {
    font-size: 1.2em;
  }
  .page-lottery__faq-question {
    padding: 15px 20px;
  }
  .page-lottery__faq-question h3 {
    font-size: 1em;
  }
  .page-lottery__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-lottery__faq-answer {
    padding: 0 20px;
  }
  .page-lottery__faq-item.active .page-lottery__faq-answer {
    padding: 15px 20px !important;
  }
  
  /* Image and Video responsive adaptation */
  .page-lottery img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-lottery__hero-image-wrapper,
  .page-lottery__container,
  .page-lottery__card,
  .page-lottery__guide-list li,
  .page-lottery__advantage-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;
  }
  .page-lottery__hero-section .page-lottery__hero-container {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .page-lottery__main-title {
    font-size: 1.8em;
  }
  .page-lottery__section-title {
    font-size: 1.5em;
  }
  .page-lottery__card-title {
    font-size: 1.2em;
  }
  .page-lottery__guide-step-title {
    font-size: 1.1em;
  }
  .page-lottery__advantage-title {
    font-size: 1.1em;
  }
}