/* style/download.css */
.page-download {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background (var(--secondary-color) is #FFFFFF) */
    background-color: var(--secondary-color); /* Ensures consistency, though body handles it */
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

/* Base styles for sections */
.page-download__section {
    padding: 60px 20px;
    text-align: center;
    overflow: hidden; /* Prevent horizontal scroll */
}

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

.page-download__section-title {
    font-size: 36px;
    color: #26A9E0; /* Primary color for titles */
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.page-download__section-title--light {
    color: #FFFFFF; /* White for dark backgrounds */
}

.page-download__section-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.page-download__section-description--light {
    color: #f0f0f0; /* Lighter text for dark backgrounds */
}

/* Hero Section */
.page-download__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Blue to white gradient */
    color: #FFFFFF;
    padding-top: var(--header-offset, 120px); /* Explicitly set for hero, as per instructions */
}

.page-download__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-download__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-download__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-download__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-download__main-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-download__hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-download__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
}

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

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

.page-download__btn-secondary {
    background: #FFFFFF;
    color: #26A9E0; /* Primary color for secondary CTA */
    border: 2px solid #26A9E0;
}

.page-download__btn-secondary:hover {
    background: #f0f0f0;
    color: #2087b3;
    border-color: #2087b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* App Introduction Section */
.page-download__app-introduction {
    background-color: #f9f9f9;
}

.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;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.page-download__feature-title {
    font-size: 24px;
    color: #26A9E0;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

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

/* Key Features Section */
.page-download__key-features {
    background: #26A9E0; /* Primary color for dark background */
    color: #FFFFFF;
}

.page-download__features-display {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    flex-wrap: wrap; /* Allow wrapping */
}

.page-download__feature-image {
    flex: 1;
    min-width: 300px; /* Minimum width for image */
}

.page-download__feature-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-download__feature-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    color: #f0f0f0;
}

.page-download__feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.page-download__list-icon {
    margin-right: 10px;
    color: #FFFFFF; /* White icon on dark background */
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

/* Installation Guide Section */
.page-download__installation-guide {
    background-color: #FFFFFF;
}

.page-download__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

.page-download__guide-platform {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-download__guide-title {
    font-size: 28px;
    color: #26A9E0;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: bold;
    text-align: center;
}

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

.page-download__step-list li {
    margin-bottom: 20px;
    font-size: 16px;
    color: #555555;
}

.page-download__step-list li strong {
    color: #333333;
    font-size: 18px;
}

.page-download__btn-block {
    display: block;
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    margin-top: 20px;
}

.page-download__qr-section {
    margin-top: 60px;
    text-align: center;
}

.page-download__qr-text {
    font-size: 18px;
    color: #333333;
    margin-bottom: 20px;
}

.page-download__qr-code {
    width: 250px;
    height: 250px;
    border: 5px solid #26A9E0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: block; /* Ensure it's treated as a block for margin auto */
    margin: 0 auto; /* Center the QR code */
}

/* System Requirements Section */
.page-download__system-requirements {
    background: #26A9E0; /* Primary color for dark background */
    color: #FFFFFF;
}

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

.page-download__requirement-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-download__requirement-title {
    font-size: 22px;
    color: #FFFFFF;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-download__requirement-text {
    font-size: 16px;
    color: #f0f0f0;
}

/* Security Assurance Section */
.page-download__security-assurance {
    background-color: #f9f9f9;
}

.page-download__security-details {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    flex-wrap: wrap-reverse; /* Image below text on mobile */
}

.page-download__security-icon {
    flex: 1;
    min-width: 300px;
}

.page-download__security-icon img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-download__security-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    color: #555555;
}

.page-download__security-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

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

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

/* FAQ容器样式 */
.page-download__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger border-radius */
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Soft shadow */
}

/* FAQ默认状态 - 答案隐藏 */
.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, opacity 0.4s ease;
  padding: 0 20px; /* Adjust padding */
  opacity: 0;
  color: #555555;
  font-size: 16px;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-download__faq-item.active .page-download__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, large value for content */
  padding: 20px !important; /* Adjust padding */
  opacity: 1;
  background: #f0f8ff; /* Light blue background for active answer */
  border-top: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px; /* Match item border-radius */
}

/* 问题样式 */
.page-download__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px; /* Match item border-radius */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

.page-download__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-download__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px; /* Slightly larger font for questions */
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

/* 切换图标 */
.page-download__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: #26A9E0; /* Primary color for toggle icon */
  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: 32px; /* Larger hit area */
  height: 32px;
}

.page-download__faq-item.active .page-download__faq-toggle {
  color: #EA7C07; /* Orange color when active */
  transform: rotate(45deg); /* Rotate for minus sign effect */
}

/* Final CTA Section */
.page-download__final-cta {
    background: linear-gradient(135deg, #26A9E0, #007bff); /* Blue gradient */
    color: #FFFFFF;
    padding: 80px 20px;
}

.page-download__final-cta-content {
    max-width: 900px;
}

/* General Image Styling (for content area images) */
.page-download img {
    max-width: 100%;
    height: auto;
    display: block; /* Ensures images behave as block elements for layout */
    border-radius: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .page-download__main-title {
        font-size: 40px;
    }
    .page-download__section-title {
        font-size: 30px;
    }
    .page-download__hero-description,
    .page-download__section-description {
        font-size: 17px;
    }
    .page-download__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        min-width: unset;
    }
    .page-download__features-display,
    .page-download__security-details {
        flex-direction: column;
    }
    .page-download__feature-image,
    .page-download__security-icon {
        min-width: unset;
        width: 100%;
    }
    .page-download__guide-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-download {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-download__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-download__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-download__section {
        padding: 40px 0;
    }
    .page-download__main-title {
        font-size: 32px;
    }
    .page-download__section-title {
        font-size: 26px;
    }
    .page-download__hero-description,
    .page-download__section-description {
        font-size: 16px;
    }
    .page-download__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-download__cta-button,
    .page-download__btn-primary,
    .page-download__btn-secondary,
    .page-download a[class*="button"],
    .page-download a[class*="btn"] {
        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__feature-item,
    .page-download__guide-platform,
    .page-download__requirement-item {
        padding: 20px;
    }
    .page-download__feature-title {
        font-size: 20px;
    }
    .page-download__guide-title {
        font-size: 24px;
    }
    .page-download__requirement-title {
        font-size: 18px;
    }
    .page-download__feature-list,
    .page-download__security-list,
    .page-download__step-list {
        font-size: 15px;
    }
    .page-download__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-download__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-download__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    .page-download__faq-answer {
        padding: 0 15px;
    }
    .page-download__faq-item.active .page-download__faq-answer {
        padding: 15px !important;
    }
    /* Ensure all images in content area are responsive */
    .page-download img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-download__section,
    .page-download__card,
    .page-download__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by .page-download__container for inner content */
    }
}