/* style/download.css */
.page-download {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light background */
  background-color: var(--background-color, #f5f5f5);
}

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

.page-download__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-download__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

.page-download__text-center {
  text-align: center;
}

.page-download__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  text-align: center;
  font-weight: bold;
  color: inherit; /* Inherit color from parent section (dark/light bg) */
}

.page-download__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit; /* Inherit color from parent section (dark/light bg) */
}

/* Hero Section */
.page-download__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-download__hero-content {
  z-index: 1;
  max-width: 800px;
  margin-bottom: 40px;
}

.page-download__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
  color: #ffffff; /* Explicitly white for dark hero background */
}

.page-download__hero-description {
  font-size: 1.3em;
  margin-bottom: 30px;
  color: #ffffff; /* Explicitly white for dark hero background */
}

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

.page-download__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.1;
}

.page-download__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Buttons */
.page-download__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-download__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}

.page-download__btn-primary:hover {
  background-color: #d16b06;
  transform: translateY(-2px);
}

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

.page-download__btn-secondary:hover {
  background-color: #e0f4ff;
  transform: translateY(-2px);
}

.page-download__large-btn {
  padding: 18px 35px;
  font-size: 1.1em;
}

.page-download__full-width-btn {
  width: 100%;
  max-width: 400px; /* Limit width on desktop for better appearance */
  margin: 20px auto 0 auto;
  display: block;
}

/* Benefits Section */
.page-download__benefits-section {
  padding: 80px 20px;
}

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

.page-download__benefit-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-download__benefit-card:hover {
  transform: translateY(-5px);
}

.page-download__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #26A9E0;
  font-weight: bold;
}

.page-download__benefit-card p {
  font-size: 1em;
  line-height: 1.7;
  flex-grow: 1;
}

/* Guide Sections */
.page-download__android-guide-section,
.page-download__ios-guide-section {
  padding: 80px 20px;
}

.page-download__flex-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-download__flex-container--reverse {
  flex-direction: row-reverse;
}

.page-download__guide-content {
  flex: 1;
}

.page-download__guide-image-wrapper {
  flex: 1;
  min-width: 300px; /* Ensure image has some base width */
}

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

.page-download__guide-steps {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-download__step-item {
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-download__android-guide-section .page-download__step-item {
  background-color: rgba(255, 255, 255, 0.1); /* Light background for dark section steps */
  color: #ffffff;
}

.page-download__android-guide-section .page-download__step-title {
  color: #ffffff;
}

.page-download__ios-guide-section .page-download__step-item {
  background-color: #f8f8f8;
  color: #333333;
}

.page-download__ios-guide-section .page-download__step-title {
  color: #26A9E0;
}

.page-download__step-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-download__step-item p {
  font-size: 1em;
  line-height: 1.6;
}

/* Games Section */
.page-download__games-section {
  padding: 80px 20px;
}

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

.page-download__game-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-download__games-section .page-download__card-title {
  color: #ffffff;
}

.page-download__games-section .page-download__game-card p {
  color: #f0f0f0;
  flex-grow: 1;
}

.page-download__games-image-wrapper {
  margin-top: 40px;
  text-align: center;
}

.page-download__games-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0 auto;
}

/* FAQ Section */
.page-download__faq-section {
  padding: 80px 20px;
}

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

.page-download__faq-item {
  background-color: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
  list-style: none; /* For details/summary */
}

.page-download__faq-question::-webkit-details-marker {
  display: none;
}

.page-download__faq-qtext {
  flex-grow: 1;
}

.page-download__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-download__faq-item[open] .page-download__faq-toggle {
  transform: rotate(45deg);
}

.page-download__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
  background-color: #f8f8f8;
}

/* CTA Section */
.page-download__cta-section {
  padding: 80px 20px;
}

.page-download__cta-section .page-download__section-title,
.page-download__cta-section .page-download__section-description {
  color: #ffffff;
}

.page-download__cta-section .page-download__hero-buttons {
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-download__hero-title {
    font-size: 2.8em;
  }

  .page-download__section-title {
    font-size: 2em;
  }

  .page-download__flex-container {
    flex-direction: column;
  }

  .page-download__flex-container--reverse {
    flex-direction: column;
  }

  .page-download__guide-image-wrapper {
    order: -1; /* Image first on mobile for reversed sections */
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-download__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-download__hero-title {
    font-size: 2.2em;
  }

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

  .page-download__section-title {
    font-size: 1.8em;
  }

  .page-download__section-description {
    font-size: 1em;
  }

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

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

  .page-download__benefits-section,
  .page-download__android-guide-section,
  .page-download__ios-guide-section,
  .page-download__games-section,
  .page-download__faq-section,
  .page-download__cta-section {
    padding: 40px 15px;
  }

  /* Mobile image responsive adaptation */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__hero-section,
  .page-download__benefits-section,
  .page-download__android-guide-section,
  .page-download__ios-guide-section,
  .page-download__games-section,
  .page-download__faq-section,
  .page-download__cta-section,
  .page-download__hero-buttons,
  .page-download__cta-section .page-download__hero-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  .page-download__guide-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important; /* Remove specific padding to avoid double */
  }

  .page-download__guide-steps {
    margin-bottom: 20px;
  }

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

  .page-download__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

  .page-download__faq-answer {
    padding: 10px 20px 15px;
  }
}

@media (max-width: 480px) {
  .page-download__hero-title {
    font-size: 1.8em;
  }

  .page-download__section-title {
    font-size: 1.5em;
  }

  .page-download__hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
}