/* Base styles for page-download */
.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Text Main from custom colors, for dark body background */
  background-color: var(--deep-navy); /* Body background from shared.css */
}

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

.page-download__section {
  padding: 40px 0;
}

.page-download__dark-section {
  background-color: #08162B; /* Deep Navy from custom colors */
  color: #F3F8FF;
}

.page-download__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #F2C14E; /* Gold from custom colors for titles */
  line-height: 1.2;
}

.page-download__description, .page-download__text-block {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #AFC4E8; /* Text Secondary from custom colors */
}

.page-download__keyword {
  color: #F2C14E; /* Gold for keywords */
  font-weight: bold;
}

/* Buttons */
.page-download__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.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: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-download__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button from custom colors */
  color: #F3F8FF; /* Text Main for button text */
  border: none;
  box-shadow: 0 4px 15px rgba(17, 59, 122, 0.4);
}

.page-download__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 59, 122, 0.6);
}

.page-download__btn-secondary {
  background: #10233F; /* Card BG for secondary button */
  color: #F2C14E; /* Gold for secondary button text */
  border: 2px solid #244D84; /* Border from custom colors */
}

.page-download__btn-secondary:hover {
  transform: translateY(-2px);
  background: #1B3357; /* Divider for hover */
  color: #F3F8FF;
}

/* Hero Section */
.page-download__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-download__hero-image-wrapper {
  margin-bottom: 30px;
}

.page-download__hero-image {
  display: block;
  margin: 0 auto;
  border-radius: 15px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-download__main-title {
  font-size: 48px;
  font-weight: 800;
  color: #F2C14E; /* Gold for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

/* Why Download Section */
.page-download__why-download {
  background-color: #08162B;
}

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

.page-download__card {
  background-color: #10233F; /* Card BG from custom colors */
  border: 1px solid #244D84; /* Border from custom colors */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: #F3F8FF;
}

.page-download__card-title {
  font-size: 24px;
  font-weight: 700;
  color: #F2C14E; /* Gold for card titles */
  margin-bottom: 15px;
}

.page-download__card-text {
  font-size: 16px;
  color: #AFC4E8; /* Text Secondary */
}

/* How to Download Section */
.page-download__how-to-download {
  background-color: #08162B;
}

.page-download__download-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.page-download__step-card {
  background-color: #10233F;
  border: 1px solid #244D84;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.page-download__step-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-download__step-title {
  font-size: 28px;
  font-weight: 700;
  color: #F2C14E;
  margin-bottom: 20px;
}

.page-download__step-list {
  list-style: decimal;
  padding-left: 20px;
  color: #AFC4E8;
  font-size: 16px;
}

.page-download__step-list li {
  margin-bottom: 10px;
}

.page-download__note-block {
  background-color: #10233F;
  border: 1px solid #244D84;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  max-width: 900px;
  margin: 0 auto;
}

.page-download__note-title {
  font-size: 28px;
  font-weight: 700;
  color: #F2C14E;
  margin-bottom: 20px;
  text-align: center;
}

.page-download__note-list {
  list-style: disc;
  padding-left: 25px;
  color: #AFC4E8;
  font-size: 16px;
}

.page-download__note-list li {
  margin-bottom: 8px;
}

/* Featured Games Section */
.page-download__featured-games {
  background-color: #08162B;
}

.page-download__featured-games-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  margin: 0 auto 30px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-download__game-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.page-download__game-list li {
  background-color: #10233F;
  border: 1px solid #244D84;
  border-radius: 8px;
  padding: 12px 25px;
  font-size: 17px;
  font-weight: 600;
  color: #F3F8FF;
  transition: background-color 0.3s ease;
}

.page-download__game-list li:hover {
  background-color: #1B3357;
}

.page-download__game-list li a {
  color: #F2C14E;
  text-decoration: none;
}

.page-download__game-list li a:hover {
  text-decoration: underline;
}

/* Promotions Section */
.page-download__promotions {
  background-color: #08162B;
}

.page-download__promo-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  margin: 0 auto 30px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-download__promo-list {
  list-style: disc;
  padding-left: 25px;
  color: #AFC4E8;
  font-size: 17px;
  max-width: 800px;
  margin: 30px auto 40px;
}

.page-download__promo-list li {
  margin-bottom: 10px;
}

/* FAQ Section */
.page-download__faq-section {
  background-color: #08162B;
}

.page-download__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

details.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #244D84; /* Border from custom colors */
  overflow: hidden;
  background: #10233F; /* Card BG from custom colors */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

details.page-download__faq-item summary.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #F3F8FF;
}

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: #1B3357; /* Divider for hover */
}

.page-download__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F2C14E; /* Gold for FAQ questions */
}

.page-download__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E; /* Gold for toggle icon */
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
}

details.page-download__faq-item .page-download__faq-answer {
  padding: 0 25px 25px;
  background: #08162B; /* Deep Navy for answer background */
  border-radius: 0 0 10px 10px;
  color: #AFC4E8; /* Text Secondary for answers */
  font-size: 16px;
}

/* Call to Action Section */
.page-download__call-to-action {
  padding-top: 60px;
  padding-bottom: 80px;
}

/* --- Responsive Styles --- */

/* Mobile/Tablet (max-width: 1023px) - Homepage specific CSS, as per instruction to include */
@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;
  }
}

/* Desktop (min-width: 1024px) - Homepage specific CSS, as per instruction to include */
@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;
  }
}

/* Mobile (max-width: 768px) - Specific for download page and general responsive rules */
@media (max-width: 768px) {
  .page-download__section-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  .page-download__description, .page-download__text-block {
    font-size: 16px;
    margin-bottom: 20px;
    padding: 0 10px;
  }

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

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

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

  .page-download__features-grid,
  .page-download__download-steps-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-download__card {
    padding: 25px;
  }

  .page-download__card-title {
    font-size: 20px;
  }

  .page-download__step-card {
    padding: 25px;
  }

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

  .page-download__step-list,
  .page-download__note-list {
    font-size: 15px;
  }

  .page-download__note-block {
    padding: 25px;
  }

  .page-download__note-title {
    font-size: 22px;
  }

  .page-download__game-list {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-download__game-list li {
    width: 100%;
    text-align: center;
  }

  .page-download__promo-list {
    font-size: 15px;
    padding-left: 20px;
  }

  details.page-download__faq-item summary.page-download__faq-question {
    padding: 15px 20px;
  }

  .page-download__faq-qtext {
    font-size: 16px;
  }

  .page-download__faq-toggle {
    font-size: 24px;
    width: 24px;
    margin-left: 15px;
  }

  details.page-download__faq-item .page-download__faq-answer {
    padding: 0 20px 20px;
  }

  /* General image and container responsive rules */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__hero-section,
  .page-download__why-download,
  .page-download__how-to-download,
  .page-download__featured-games,
  .page-download__promotions,
  .page-download__faq-section,
  .page-download__call-to-action {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Homepage specific rules as per prompt - for completeness, even if not directly used by this page */
  .page-download__promo-strip-track { /* This class would be homepage specific */
    grid-template-columns: repeat(4,1fr);
    overflow-x:hidden;
  }
  .page-download__hot-games-grid { /* This class would be homepage specific */
    grid-template-columns:repeat(2,1fr);
  }
  /* Ensure no horizontal scroll */
  .page-download {
    overflow-x: hidden;
  }
}