/* Homepage-specific CSS as mandated by the prompt, even for download.html */
@media (max-width: 1023px) {
  .page-download__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-download__hero-brand,
  .page-download__hero-jackpot {
    display: none !important;
  }
  .page-download__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-download__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-download__game-trial-topbar,
  .page-download__game-trial-bottombar {
    display: none !important;
  }
  .page-download__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-download__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-download__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-download__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-download__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-download__hero-brand,
  .page-download__hero-jackpot,
  .page-download__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-download__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-download__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-download__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-download__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-download__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* General styles for the download page */
.page-download {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background: #ffffff; /* Default body background is light, so use dark text */
}

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

.page-download__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  padding-bottom: 40px;
  background-color: #f8f8f8;
}

.page-download__hero-content {
  max-width: 800px;
  margin-bottom: 30px;
}

.page-download__hero-image-wrapper {
  width: 100%;
  max-width: 1000px; /* Example max-width */
  margin-bottom: 30px;
}

.page-download__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.page-download__main-title {
  font-size: clamp(28px, 4vw, 48px);
  color: #017439;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-download__description {
  font-size: 18px;
  color: #555;
  margin-bottom: 30px;
}

.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-download__btn-primary {
  background: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-download__btn-primary:hover {
  background: #a30606;
  border-color: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.page-download__btn-secondary {
  background: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-download__btn-secondary:hover {
  background: #005f2f;
  border-color: #005f2f;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.page-download__btn-icon {
  margin-left: 8px;
  font-size: 20px;
  line-height: 1;
}

.page-download__section-title {
  font-size: clamp(24px, 3.5vw, 40px);
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-download__section-description {
  font-size: 17px;
  color: #666;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px;
}

/* Benefits Section */
.page-download__benefits-section {
  padding: 60px 0;
  background: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-download__benefits-section .page-download__section-title {
  color: #ffffff;
}

.page-download__benefits-section .page-download__section-description {
  color: #f0f0f0;
}

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

.page-download__benefit-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.page-download__benefit-card .page-download__card-title {
  font-size: 22px;
  color: #FFFF00; /* Register/Login font color for highlight */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-download__benefit-card p {
  font-size: 16px;
  color: #f0f0f0;
}

/* Download Guide Section */
.page-download__guide-section {
  padding: 60px 0;
  background: #ffffff;
}

.page-download__platform-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  border-bottom: 2px solid #e0e0e0;
}

.page-download__tab-button {
  background: none;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  color: #666;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.page-download__tab-button:hover {
  color: #017439;
}

.page-download__tab-button--active {
  color: #017439;
  border-bottom-color: #017439;
}

.page-download__platform-content {
  display: none;
  padding: 20px 0;
}

.page-download__platform-content--active {
  display: block;
}

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

.page-download__step-item {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid #e0e0e0;
}

.page-download__step-title {
  font-size: 20px;
  color: #017439;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-download__step-item p {
  font-size: 16px;
  color: #555;
}

.page-download__qr-code-wrapper {
  text-align: center;
  margin: 20px 0;
}

.page-download__qr-code {
  width: 200px;
  height: 200px;
  border: 5px solid #ffffff;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  border-radius: 5px;
  max-width: 100%;
  height: auto;
  display: inline-block; /* to center it */
}

.page-download__btn-download {
  margin-top: 20px;
  width: auto; /* Override general btn-primary width */
}

/* Features Section */
.page-download__features-section {
  padding: 60px 0;
  background: #f0f0f0; /* Light background */
}

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

.page-download__feature-item {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

.page-download__feature-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  max-width: 100%;
}

.page-download__feature-item .page-download__card-title {
  font-size: 20px;
  color: #017439;
  margin: 20px 15px 10px;
  font-weight: 600;
}

.page-download__feature-item p {
  font-size: 16px;
  color: #555;
  padding: 0 15px 20px;
}

/* FAQ Section */
.page-download__faq-section {
  padding: 60px 0;
  background: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-download__faq-section .page-download__section-title {
  color: #ffffff;
}

.page-download__faq-section .page-download__section-description {
  color: #f0f0f0;
}

.page-download__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #208e5c; /* Lighter border for dark section */
  overflow: hidden;
  background: #006030; /* Slightly lighter than section background */
}
details.page-download__faq-item summary.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #ffffff;
}
details.page-download__faq-item summary.page-download__faq-question::-webkit-details-marker {
  display: none;
}
details.page-download__faq-item summary.page-download__faq-question:hover {
  background: #005028;
}
.page-download__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #ffffff;
}
.page-download__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFFF00; /* Highlight color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-download__faq-item .page-download__faq-answer {
  padding: 0 20px 20px;
  background: #004d26; /* Even lighter for answer background */
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}
.page-download__faq-image {
  display: block;
  margin: 40px auto 0;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}


/* Final CTA Section */
.page-download__cta-final-section {
  padding: 60px 0;
  background: #f8f8f8;
  text-align: center;
}

.page-download__btn-large {
  font-size: 20px;
  padding: 18px 35px;
  min-width: 280px;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
  .page-download__hero-image-wrapper {
    order: 1; /* Image first */
  }
  .page-download__hero-content {
    order: 2; /* Content second */
  }
}

@media (max-width: 768px) {
  /* General responsive rules for images and containers */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-download__container,
  .page-download__hero-section,
  .page-download__benefits-section,
  .page-download__guide-section,
  .page-download__features-section,
  .page-download__faq-section,
  .page-download__cta-final-section,
  .page-download__benefits-grid,
  .page-download__download-steps,
  .page-download__features-grid,
  .page-download__platform-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

  .page-download__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-download__btn-primary,
  .page-download__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 16px;
  }

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

  .page-download__section-description {
    font-size: 15px;
  }

  .page-download__benefits-grid,
  .page-download__download-steps,
  .page-download__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .page-download__tab-button {
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-download__step-title {
    font-size: 18px;
  }

  .page-download__feature-image {
    height: 200px; /* Adjust height for mobile */
  }
  
  details.page-download__faq-item summary.page-download__faq-question { padding: 15px; }
  .page-download__faq-qtext { font-size: 15px; }
  details.page-download__faq-item .page-download__faq-answer { padding: 0 15px 15px; }
}

/* Homepage-specific 768px rules (as mandated to be included) */
@media (max-width: 768px) {
  /* Placeholder for homepage promo strip, if it were present */
  .page-download__promo-strip-track {
    grid-template-columns: repeat(4,1fr); /* Ensure no horizontal scroll for 4 items */
    overflow-x:hidden;
  }
  /* Placeholder for homepage hot games, if it were present */
  .page-download__hot-games-grid {
    grid-template-columns: repeat(2,1fr); /* 2 columns for hot games */
  }
  /* Placeholder for homepage brand intro, if it were present */
  .page-download__brand-intro {
    display: block; /* Show on mobile if it was hidden on desktop */
  }
  /* Placeholder for homepage winner ticker, if it were present */
  .page-download__winner-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
  }
  /* Adjust body/main padding for fixed ticker */
  body {
    padding-bottom: 50px; /* Example height of ticker */
  }
  .page-download {
    padding-bottom: 50px; /* Ensure main content doesn't get covered */
  }
}

/* Overlay and modal styles for game trial (as mandated to be included) */
.page-download__game-trial-overlay {
  z-index: 5;
  pointer-events: auto;
  position: absolute; /* Assuming it's within a relative parent */
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.page-download__game-trial-overlay.is-hidden {
  opacity: 0 !important;
  display: none !important; /* Explicitly hide */
  pointer-events: none !important;
}
.page-download__game-trial-start {
  z-index: 6;
  pointer-events: auto;
  touch-action: manipulation;
  background: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
}
.page-download__game-trial-start:hover {
  background: #a30606;
}
.page-download__game-trial-shell {
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 10px;
  overflow: hidden;
}
.page-download__reward-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page-download__reward-modal:not([hidden]) {
  opacity: 1;
  visibility: visible;
}
.page-download__reward-modal-content {
  background: #017439;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  max-width: 500px;
  width: 100%;
  position: relative;
}
.page-download__reward-modal-title {
  font-size: 32px;
  color: #FFFF00;
  margin-bottom: 15px;
}
.page-download__reward-modal-description {
  font-size: 18px;
  margin-bottom: 30px;
}
.page-download__reward-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.page-download__reward-modal-close:hover {
  background: rgba(255,255,255,0.2);
}
.page-download__reward-modal-cta {
  background: #C30808;
  color: #FFFF00;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}
.page-download__reward-modal-cta:hover {
  background: #a30606;
}