:root {
  --primary-color: #0A2463;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #121212;
  --bg-light: #f8f9fa;
  --card-bg-light: #ffffff;
  --border-color: #e0e0e0;
}

/* Base styles for the page content, considering the shared.css body background */
.page-lottery {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Inherit from body dark background */
  background-color: var(--bg-dark); /* Ensure consistency if main is not transparent */
  padding-top: 120px; /* Desktop: Adjust for fixed header */
}

/* General Container */
.page-lottery__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Styling */
.page-lottery__hero-section,
.page-lottery__content-section,
.page-lottery__faq-section,
.page-lottery__brand-section,
.page-lottery__blog-section,
.page-lottery__responsible-gaming-section {
  padding: 60px 0;
  text-align: center;
}

.page-lottery__dark-section {
  background-color: var(--primary-color); /* Dark blue background */
  color: var(--text-light); /* White text */
}

.page-lottery__light-bg {
  background-color: var(--bg-light); /* Light grey background */
  color: var(--text-dark); /* Dark text */
}

/* Titles */
.page-lottery__main-title {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-light); /* Ensure light text on dark hero */
  line-height: 1.2;
}

.page-lottery__section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 40px;
  color: inherit; /* Inherit from section, ensuring contrast */
}

.page-lottery__brand-subtitle,
.page-lottery__card-title,
.page-lottery__feature-title,
.page-lottery__blog-item-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 10px;
  color: inherit; /* Inherit from parent, ensuring contrast */
  line-height: 1.3;
}

/* Descriptions & Paragraphs */
.page-lottery__description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light); /* Ensure light text on dark hero */
}

.page-lottery__text-block p,
.page-lottery__card-text,
.page-lottery__feature-item p,
.page-lottery__blog-item-excerpt {
  font-size: 16px;
  margin-bottom: 15px;
  color: inherit; /* Inherit from section, ensuring contrast */
}

/* Images */
.page-lottery__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.page-lottery__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 15px auto;
  display: block;
}

.page-lottery__blog-image {
  width: 100%;
  height: 220px; /* Fixed height for blog images */
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  margin-bottom: 15px;
}

/* Buttons */
.page-lottery__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-lottery__cta-center {
  margin-top: 40px;
}

.page-lottery__cta-button,
.page-lottery__card-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-lottery__btn-primary {
  background: var(--secondary-color); /* Gold background */
  color: var(--primary-color); /* Dark blue text */
}

.page-lottery__btn-primary:hover {
  background: #e6c200; /* Darker gold */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-lottery__btn-secondary {
  background: transparent;
  color: var(--text-light); /* White text */
  border: 2px solid var(--text-light); /* White border */
}

.page-lottery__dark-section .page-lottery__btn-secondary {
  color: var(--text-light); /* White text on dark section */
  border-color: var(--text-light); /* White border on dark section */
}

.page-lottery__light-bg .page-lottery__btn-secondary {
  color: var(--primary-color); /* Dark blue text on light section */
  border-color: var(--primary-color); /* Dark blue border on light section */
}

.page-lottery__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Grid Layouts */
.page-lottery__grid-3-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Cards */
.page-lottery__card {
  background: var(--card-bg-light); /* White background for cards */
  color: var(--text-dark); /* Dark text for cards */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding-bottom: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-lottery__card-title,
.page-lottery__card-text {
  padding: 0 20px;
}

.page-lottery__card-button {
  margin: 20px auto 0 auto;
  width: calc(100% - 40px);
}

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

.page-lottery__feature-item {
  background: var(--card-bg-light);
  color: var(--text-dark);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
}

/* Lists */
.page-lottery__list {
  list-style-type: disc;
  padding-left: 20px;
  text-align: left;
  max-width: 800px;
  margin: 20px auto 30px auto;
  color: inherit; /* Ensure contrast */
}

.page-lottery__list li {
  margin-bottom: 10px;
  font-size: 16px;
}

/* FAQ Section */
.page-lottery__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

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

.page-lottery__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-light);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark); /* Dark text for question */
}

.page-lottery__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-lottery__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-lottery__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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(--primary-color);
  transform: rotate(45deg); /* Change to X or rotate */
}

.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 15px;
  opacity: 0;
  color: var(--text-dark); /* Dark text for answer */
}

.page-lottery__faq-item.active .page-lottery__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-lottery__faq-answer p {
  margin: 0;
}

/* Brand Section */
.page-lottery__brand-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-lottery__brand-item {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark blue */
  color: var(--text-light);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Blog Section */
.page-lottery__blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-lottery__blog-item {
  text-align: left;
}

.page-lottery__blog-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-lottery__blog-item-title {
  font-size: 20px;
  margin-top: 0;
  color: var(--primary-color); /* Dark blue title on light card */
  padding: 0 20px;
}

.page-lottery__blog-item-excerpt {
  font-size: 15px;
  padding: 0 20px;
  color: #666;
}

.page-lottery__blog-item-date {
  display: block;
  font-size: 13px;
  color: #999;
  margin-top: 10px;
  padding: 0 20px 20px 20px;
}

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

@media (max-width: 768px) {
  .page-lottery {
    padding-top: 100px !important; /* Mobile: Adjust for fixed header */
  }

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

  .page-lottery__hero-section,
  .page-lottery__content-section,
  .page-lottery__faq-section,
  .page-lottery__brand-section,
  .page-lottery__blog-section,
  .page-lottery__responsible-gaming-section {
    padding: 40px 0;
  }

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

  .page-lottery__section-title {
    font-size: 28px;
  }

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

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

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

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

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

  /* FAQ */
  .page-lottery__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-lottery__faq-question h3 {
    font-size: 15px;
    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;
  }

  /* Image responsive (general) */
  .page-lottery img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/content */
  .page-lottery__section,
  .page-lottery__card,
  .page-lottery__container,
  .page-lottery__blog-item,
  .page-lottery__feature-item,
  .page-lottery__brand-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-lottery__card,
  .page-lottery__blog-item {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-lottery__card-title,
  .page-lottery__card-text,
  .page-lottery__blog-item-title,
  .page-lottery__blog-item-excerpt,
  .page-lottery__blog-item-date {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-lottery__main-title {
    font-size: 28px;
  }
  .page-lottery__section-title {
    font-size: 24px;
  }
  .page-lottery__cta-button {
    font-size: 15px;
    padding: 10px 15px;
  }
  .page-lottery__grid-3-col,
  .page-lottery__feature-list,
  .page-lottery__brand-content,
  .page-lottery__blog-list {
    grid-template-columns: 1fr;
  }
  .page-lottery__list {
    padding-left: 15px;
  }
}