/* style/download.css */
/* 🚨 Body background is default white. Text color should be dark. */
.page-download {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #ffffff; /* Default background is white */
}

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

/* 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;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(135deg, #26A9E0, #80d3f4); /* Gradient using primary color */
    color: #ffffff;
    overflow: hidden; /* Ensure content 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;
    z-index: 2; /* Ensure content is above image */
}

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

.page-download__hero-description {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 800px;
    color: #f0f0f0;
}

.page-download__hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    width: 100%; /* Ensure container takes full width for wrapping */
    max-width: 600px;
}

.page-download__btn-primary,
.page-download__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Include padding in width */
}

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

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

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

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

.page-download__btn-download--small {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
}

.page-download__hero-image {
    width: 100%;
    max-width: 600px; /* Limit image size within hero */
    margin-top: 20px;
}

.page-download__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: contain; /* Ensure image fits well */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    filter: none; /* Ensure no filter is applied */
}

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

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

/* Benefits Section */
.page-download__benefits-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

.page-download__benefit-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-download__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-download__benefit-title {
    font-size: 22px;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-download__benefit-item p {
    font-size: 16px;
    color: #555555;
}

/* Guide Section */
.page-download__guide-section {
    padding: 80px 0;
    background: #26A9E0; /* Primary brand color as background */
    color: #ffffff;
}

.page-download__guide-steps {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-download__guide-platform {
    background: rgba(255, 255, 255, 0.15); /* Slightly transparent white on blue */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    min-width: 300px;
    max-width: 45%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-download__platform-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #ffffff;
}

.page-download__qr-code {
    margin-bottom: 25px;
    display: inline-block; /* Center the QR code */
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
}

.page-download__qr-code img {
    width: 100%;
    height: auto;
    max-width: 200px; /* Keep QR code readable size */
    display: block;
    margin: 0 auto;
    object-fit: contain;
    filter: none; /* Ensure no filter is applied */
}

.page-download__guide-list {
    list-style-type: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
    counter-reset: my-awesome-counter;
}

.page-download__guide-list li {
    margin-bottom: 10px;
    font-size: 16px;
    color: #f0f0f0;
    position: relative;
    padding-left: 30px;
}

.page-download__guide-list li strong {
    color: #ffffff;
}

.page-download__guide-list li:before {
    content: counter(my-awesome-counter) ". ";
    counter-increment: my-awesome-counter;
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #ffffff;
}

/* Features Section */
.page-download__features-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.page-download__features-content {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-download__features-text {
    flex: 1;
    min-width: 300px;
}

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

.page-download__feature-list li {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    color: #333333;
}

.page-download__feature-list li:before {
    content: '✅';
    position: absolute;
    left: 0;
    font-size: 20px;
    line-height: 1;
}

.page-download__features-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-download__features-image img {
    width: 100%;
    height: auto;
    max-width: 600px;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    filter: none; /* Ensure no filter is applied */
}

/* FAQ Section */
.page-download__faq-section {
    padding: 80px 0;
    background-color: #f0f8ff; /* Light blue background for FAQ */
}

.page-download__faq-list {
    max-width: 900px;
    margin: 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.05);
}

/* 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;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-download__faq-item.active .page-download__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px !important;
    opacity: 1;
    background: #ffffff; /* White background for answer */
    border-radius: 0 0 8px 8px;
}

/* Vấn đề FAQ */
.page-download__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #ffffff;
    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;
}

.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;
}

/* Tiêu đề câu hỏi */
.page-download__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
}

/* Biểu tượng chuyển đổi */
.page-download__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Primary brand color for toggle */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Ngăn biểu tượng chặn sự kiện click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-download__faq-item.active .page-download__faq-toggle {
    color: #EA7C07; /* Login/Download color when active */
    transform: rotate(45deg); /* Sử dụng rotate cho hiệu ứng '-' */
}


/* --------------------------------------------------- */
/* 🚨 Responsive Design for Mobile (max-width: 768px) */
/* --------------------------------------------------- */
@media (max-width: 768px) {
    .page-download__container {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fixed Header Offset for Mobile */
    .page-download__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

    .page-download__hero-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        margin-bottom: 30px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding to container of buttons */
    }

    /* 🚨 Mobile Button Responsive Adaption */
    .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: 12px 20px !important;
        font-size: 16px !important;
    }
    
    .page-download__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }

    .page-download__hero-image img {
        border-radius: 8px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* General Section Styling */
    .page-download__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    /* Benefits Section */
    .page-download__benefits-section {
        padding: 50px 0;
    }

    .page-download__benefit-item {
        padding: 25px;
    }

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

    /* Guide Section */
    .page-download__guide-section {
        padding: 50px 0;
    }

    .page-download__guide-steps {
        flex-direction: column;
        gap: 30px;
    }

    .page-download__guide-platform {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 25px 15px;
    }

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

    .page-download__qr-code {
        max-width: 180px;
        width: 100%;
        padding: 8px;
        margin: 0 auto 20px;
    }

    .page-download__qr-code img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-download__guide-list li {
        font-size: 15px;
    }
    
    .page-download__btn-download--small {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 20px !important;
        font-size: 15px !important;
    }

    /* Features Section */
    .page-download__features-section {
        padding: 50px 0;
    }

    .page-download__features-content {
        flex-direction: column;
        gap: 30px;
    }

    .page-download__features-text,
    .page-download__features-image {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .page-download__features-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-download__feature-list li {
        font-size: 16px;
        padding-left: 25px;
    }

    .page-download__feature-list li:before {
        font-size: 18px;
    }

    /* FAQ Section */
    .page-download__faq-section {
        padding: 50px 0;
    }

    .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;
    }
    
    /* 🚨 Mobile image responsive adaptation */
    .page-download img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-download__section,
    .page-download__card,
    .page-download__container,
    .page-download__benefits-section,
    .page-download__guide-section,
    .page-download__features-section,
    .page-download__faq-section,
    .page-download__hero-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding for content sections to prevent edge-to-edge content */
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-download__benefits-section .page-download__container,
    .page-download__guide-section .page-download__container,
    .page-download__features-section .page-download__container,
    .page-download__faq-section .page-download__container {
        padding-left: 0;
        padding-right: 0;
    }
    .page-download__guide-platform {
        padding-left: 15px;
        padding-right: 15px;
    }
}