/* style/download.css */

:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --dark-background: #0d0d0d;
  --light-text: #ffffff;
  --dark-text: #333333;
  --light-card-bg: #ffffff;
  --section-padding-desktop: 80px 0;
  --section-padding-mobile: 40px 15px;
}

.page-download {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--light-text); /* Default text color for dark body background */
  background-color: var(--dark-background);
}

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

.page-download__section {
  padding: var(--section-padding-desktop);
  text-align: center;
}

.page-download__dark-bg {
  background-color: var(--dark-background);
  color: var(--light-text);
}

.page-download__light-bg {
  background-color: var(--light-card-bg);
  color: var(--dark-text);
}

.page-download__dark-section {
  background-color: var(--secondary-color);
  color: var(--light-text);
}

.page-download__section-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

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

/* Hero Section */
.page-download__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Assuming shared.css handles body padding-top */
  margin-top: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px; /* Adjust as needed */
}

.page-download__hero-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

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

.page-download__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--light-text);
  padding: 40px 20px;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

.page-download__hero-title {
  font-size: 52px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
  line-height: 1.2;
}

.page-download__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.5;
}

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

.page-download__btn-primary,
.page-download__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-download__btn-primary {
  background-color: var(--primary-color);
  color: var(--dark-text);
  border: 2px solid var(--primary-color);
}

.page-download__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
}

.page-download__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-download__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--dark-text);
}

/* Download Methods Section */
.page-download__download-methods .page-download__section-description {
  color: var(--light-text);
}

.page-download__method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.page-download__method-card {
  background-color: var(--light-card-bg);
  color: var(--dark-text);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-download__method-card .page-download__method-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.page-download__method-card .page-download__method-text {
  font-size: 16px;
  margin-bottom: 25px;
}

.page-download__qr-code {
  margin-bottom: 25px;
  width: 100%;
  max-width: 300px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-download__qr-code img {
  max-width: 100%;
  height: auto;
  border: 5px solid var(--primary-color);
  border-radius: 5px;
  display: block;
}

/* App Features Section */
.page-download__app-features .page-download__section-title,
.page-download__app-features .page-download__section-description {
  color: var(--light-text);
}

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

.page-download__feature-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  color: var(--light-text);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-download__feature-image {
  margin-bottom: 20px;
  width: 100%;
  max-width: 400px; /* Ensure images are not too small */
  height: auto;
  overflow: hidden;
  border-radius: 8px;
}

.page-download__feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.page-download__feature-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-download__feature-text {
  font-size: 16px;
}

/* FAQ Section */
.page-download__faq {
  background-color: var(--dark-background);
}

.page-download__faq .page-download__section-title,
.page-download__faq .page-download__section-description {
  color: var(--light-text);
}

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

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

.page-download__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  background-color: var(--light-card-bg);
  color: var(--dark-text);
}

.page-download__faq-item.active .page-download__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

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

.page-download__faq-question:hover {
  background: darken(var(--secondary-color), 5%);
  border-color: darken(var(--secondary-color), 5%);
}

.page-download__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--light-text);
}

.page-download__faq-toggle {
  font-size: 24px;
  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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-download__faq-item.active .page-download__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change to X for active state */
}

/* CTA Bottom Section */
.page-download__cta-bottom {
  background-color: var(--dark-background);
  padding: var(--section-padding-desktop);
}

.page-download__cta-bottom-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  background: rgba(var(--secondary-color), 0.8);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: var(--light-text);
}

.page-download__cta-bottom-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-download__cta-bottom-description {
  font-size: 20px;
  margin-bottom: 40px;
}

/* General Image styles (ensure images are responsive and not tiny) */
.page-download img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0; /* Ensure no unwanted border-radius */
  box-shadow: none; /* Ensure no unwanted box-shadow */
  filter: none; /* Ensure no CSS filters changing color */
}

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

  .page-download__hero-description {
    font-size: 18px;
  }

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

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

  .page-download__method-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .page-download__section {
    padding: var(--section-padding-mobile);
  }

  .page-download__container {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* HERO 主图区域 */
  .page-download__hero-section {
    min-height: 400px;
    padding-top: 0 !important; /* Fixed header offset: 0 if body has padding-top */
  }

  .page-download__hero-content {
    padding: 20px 15px;
    margin: 0 15px;
  }

  .page-download__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-download__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-download__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
    overflow: hidden;
  }

  /* 按钮与按钮容器 */
  .page-download__btn-primary,
  .page-download__btn-secondary,
  .page-download a[class*="button"],
  .page-download a[class*="btn"] {
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* 产品展示图区域 (Not applicable for download page, but included for completeness as per instructions) */
  /* .page-download__products-section { padding: 40px 15px; width: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; } */
  /* .page-download__products-container { grid-template-columns: 1fr; gap: 15px; width: 100%; max-width: 100%; overflow-x: hidden; box-sizing: border-box; } */
  /* .page-download__products-grid--small { grid-template-columns: repeat(2, 1fr); gap: 15px; width: 100%; max-width: 100%; box-sizing: border-box; } */
  /* .page-download__products-grid--large { grid-template-columns: 1fr; gap: 15px; width: 100%; max-width: 100%; box-sizing: border-box; } */
  /* .page-download__products-grid--small .page-download__product-card, .page-download__products-grid--small .page-download__product-card-image, */
  /* .page-download__products-grid--large .page-download__product-card, .page-download__products-grid--large .page-download__product-card-image { max-width: 300px; } */
  /* .page-download__products-grid--small .page-download__product-card-image img, */
  /* .page-download__products-grid--large .page-download__product-card-image img { max-width: 100%; width: 100%; height: auto; } */

  /* 通用图片与容器 */
  .page-download img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-download__section,
  .page-download__card,
  .page-download__container,
  .page-download__cta-bottom-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-download__method-card .page-download__method-title {
    font-size: 24px;
  }

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

  .page-download__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-download__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-download__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-download__faq-answer {
    padding: 0 15px;
  }
  
  .page-download__faq-item.active .page-download__faq-answer {
    padding: 15px !important;
  }

  .page-download__cta-bottom-title {
    font-size: 30px;
  }

  .page-download__cta-bottom-description {
    font-size: 16px;
  }
}