/* style/download.css */

/* Base styles for the download page */
.page-download {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background: var(--secondary-color); /* #FFFFFF */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* Container for consistent content width */
.page-download__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

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

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

/* 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, #a0d8f0); /* Gradient with primary color */
    color: #ffffff; /* White text for dark/gradient background */
    overflow: hidden; /* Ensure image doesn't overflow */
}

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

.page-download__hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-download__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    line-height: 1.5;
    color: #f0f0f0;
}

.page-download__hero-image {
    width: 100%;
    max-width: 800px; /* Limit image width */
    margin-top: 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 30px rgba(0, 0, 0, 0.2);
}

/* CTA Buttons */
.page-download__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for primary CTA */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* For mobile responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-download__cta-button:hover {
    background: #d86c06;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-download__btn-primary {
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
}

.page-download__btn-primary:hover {
    background: #1e87bb;
}

.page-download__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
    margin-left: 15px;
}

.page-download__btn-secondary:hover {
    background: #f0f0f0;
    color: #1e87bb;
    border-color: #1e87bb;
}

/* Advantages Section */
.page-download__advantages-section {
    padding: 80px 0;
    background: var(--secondary-color); /* White background */
}

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

.page-download__advantage-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.page-download__advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-download__advantage-card img {
    width: 100%;
    height: auto;
    max-width: 250px; /* Smaller images for cards */
    margin: 0 auto 20px auto;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

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

.page-download__advantage-card p {
    font-size: 16px;
    color: #555555;
}

/* How to Download Section */
.page-download__how-to-download-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary color background */
    color: #ffffff; /* White text */
}

.page-download__how-to-download-section .page-download__section-title,
.page-download__how-to-download-section .page-download__section-description {
    color: #ffffff;
}

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

.page-download__platform-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    color: #333333; /* Dark text for light card background */
}

.page-download__platform-card .page-download__card-title {
    color: #26A9E0;
    margin-bottom: 25px;
}

.page-download__download-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.page-download__download-steps li {
    margin-bottom: 15px;
    font-size: 17px;
    line-height: 1.5;
    position: relative;
    padding-left: 30px;
}

.page-download__download-steps li:last-child {
    margin-bottom: 0;
}

.page-download__download-steps li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    background: #26A9E0;
    color: #ffffff;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 2px;
}

.page-download__download-steps {
    counter-reset: step-counter;
}

.page-download__qr-code {
    margin: 20px auto 30px auto;
    text-align: center;
}

.page-download__qr-code img {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
    border: 5px solid #e0e0e0;
    border-radius: 8px;
    object-fit: contain;
}

.page-download__qr-code p {
    font-size: 15px;
    color: #555555;
}

/* Features Section */
.page-download__features-section {
    padding: 80px 0;
    background: var(--secondary-color);
}

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

.page-download__feature-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-download__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-download__feature-item img {
    width: 100%;
    height: 250px; /* Fixed height for feature images */
    object-fit: cover;
    display: block;
}

.page-download__feature-item .page-download__card-title {
    padding: 20px 20px 0 20px;
    color: #26A9E0;
    font-size: 22px;
}

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

/* FAQ Section */
.page-download__faq-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary color background */
    color: #ffffff; /* White text */
}

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

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

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

/* 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;
    opacity: 0;
    background: #f9f9f9;
    color: #333333;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-download__faq-item.active .page-download__faq-answer {
    max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.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;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #333333;
}

.page-download__faq-item.active .page-download__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #26A9E0;
}

.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;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
    color: #26A9E0;
}

/* 切换图标 */
.page-download__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    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: 32px;
    height: 32px;
}

.page-download__faq-item.active .page-download__faq-toggle {
    color: #26A9E0;
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Final CTA Section */
.page-download__cta-final-section {
    padding: 80px 0;
    text-align: center;
    background: var(--secondary-color);
}

.page-download__cta-final-section .page-download__cta-button {
    margin: 0 10px 20px 10px; /* Adjust margin for multiple buttons */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-download__hero-content h1 {
        font-size: 40px;
    }
    .page-download__hero-description {
        font-size: 18px;
    }
    .page-download__section-title {
        font-size: 32px;
    }
    .page-download__platform-card {
        padding: 25px;
    }
    .page-download__download-platforms {
        grid-template-columns: 1fr; /* Stack platforms on smaller screens */
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .page-download {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
        font-size: 16px;
        line-height: 1.6;
    }
    .page-download__container {
        padding: 0 15px;
    }
    .page-download__hero-section {
        padding: 40px 15px;
    }
    .page-download__hero-container {
        flex-direction: column;
        gap: 20px;
    }
    .page-download__hero-content h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-download__hero-description {
        font-size: 16px;
        margin-bottom: 20px;
    }
    .page-download__hero-image {
        margin-top: 20px;
    }
    .page-download__hero-image img {
        border-radius: 8px;
    }

    /* All images in content area must be responsive */
    .page-download img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-download__advantages-section, 
    .page-download__how-to-download-section, 
    .page-download__features-section, 
    .page-download__faq-section, 
    .page-download__cta-final-section {
        padding: 50px 0;
    }
    .page-download__section-title {
        font-size: 28px;
        margin-top: 40px;
    }
    .page-download__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Card layouts */
    .page-download__advantages-grid,
    .page-download__features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-download__advantage-card,
    .page-download__feature-item {
        padding: 25px;
        border-radius: 10px;
    }
    .page-download__advantage-card img {
        
        margin-bottom: 15px;
    }
    .page-download__card-title {
        font-size: 20px;
    }
    .page-download__feature-item img {
        height: 200px; /* Adjust fixed height for mobile */
    }

    /* Download steps */
    .page-download__download-steps li {
        font-size: 16px;
        padding-left: 25px;
    }
    .page-download__download-steps li::before {
        width: 22px;
        height: 22px;
        font-size: 13px;
    }
    .page-download__qr-code img {
        
    }

    /* FAQ */
    .page-download__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-download__faq-question h3 {
        font-size: 16px;
        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;
    }

    /* Buttons responsive */
    .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__cta-final-section .page-download__cta-button {
        margin: 10px 0;
    }
    .page-download__btn-secondary {
        margin-left: 0;
    }
    .page-download__cta-final-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .page-download__cta-final-section .page-download__section-description {
        padding: 0 15px;
    }
}

/* Ensure all content containers are responsive on mobile */
@media (max-width: 768px) {
    .page-download__section,
    .page-download__card,
    .page-download__container,
    .page-download__advantages-grid,
    .page-download__download-platforms,
    .page-download__features-grid,
    .page-download__faq-list,
    .page-download__cta-final-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by .page-download__container for consistency */
    }
    .page-download__how-to-download-section,
    .page-download__faq-section {
        /* Ensure these sections also have appropriate padding on mobile */
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
}