/* style/download.css */
/* body đã padding-top: var(--header-offset)；trang không được viết lại biến này */

/* General Styles */
.page-download {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #F2FFF6; /* Text Main */
    background-color: #08160F; /* Background */
}

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

.page-download__section-title {
    font-size: 2.5em;
    color: #F2FFF6; /* Text Main */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-download__description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #A7D9B8; /* Text Secondary */
}

/* Hero Section */
.page-download__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background: linear-gradient(180deg, #0A4B2C 0%, #08160F 100%); /* Deep Green to Background */
    overflow: hidden; /* Ensure no image overflow */
}

.page-download__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-download__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 15px;
}

.page-download__hero-content {
    text-align: center;
    max-width: 900px;
    margin-top: 20px;
}

.page-download__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* H1 font size clamp, not fixed large */
    color: #F2C14E; /* Gold */
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.page-download__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 500px; /* Limit button group width */
    margin-left: auto;
    margin-right: auto;
}

.page-download__btn-primary,
.page-download__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    box-sizing: border-box; /* Include padding in width calculation */
}

.page-download__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #F2FFF6; /* Text Main */
    border: 2px solid #2AD16F;
}

.page-download__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.page-download__btn-secondary {
    background: #11271B; /* Card BG */
    color: #57E38D; /* Glow */
    border: 2px solid #2E7A4E; /* Border */
}

.page-download__btn-secondary:hover {
    background: #2E7A4E; /* Border */
    color: #F2FFF6; /* Text Main */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

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

.page-download__dark-section .page-download__section-title {
    color: #F2FFF6;
}

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

.page-download__benefit-card {
    background: #08160F; /* Background */
    border: 1px solid #2E7A4E; /* Border */
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-download__benefit-icon {
    width: 100%; /* Ensure image fills card width */
    max-width: 400px; /* Max width for image */
    height: auto;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 10px;
    min-width: 200px; /* Minimum image size */
    min-height: 200px; /* Minimum image size */
}

.page-download__card-title {
    font-size: 1.5em;
    color: #F2C14E; /* Gold */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-download__card-text {
    font-size: 1em;
    color: #A7D9B8; /* Text Secondary */
}

/* Guide Section */
.page-download__guide-section {
    padding: 80px 0;
    background-color: #08160F; /* Background */
}

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

.page-download__step-card {
    background: #11271B; /* Card BG */
    border: 1px solid #2E7A4E; /* Border */
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.page-download__step-number {
    font-size: 2em;
    color: #57E38D; /* Glow */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-download__step-text {
    font-size: 1.1em;
    color: #A7D9B8; /* Text Secondary */
}

/* Video Section */
.page-download__video-section {
    padding: 80px 0;
    background-color: #08160F; /* Background */
    text-align: center;
}

.page-download__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-top: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%; /* Desktop: width: 100% must be present */
    max-width: 800px; /* Max width for video */
    margin-left: auto;
    margin-right: auto;
}

.page-download__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
    cursor: pointer; /* For JS click handling */
}

.page-download__video-cta {
    margin-top: 40px;
}

/* FAQ Section */
.page-download__faq-section {
    padding: 80px 0;
    background-color: #11271B; /* Card BG */
}

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

.page-download__faq-item {
    background: #08160F; /* Background */
    border: 1px solid #2E7A4E; /* Border */
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    color: #F2FFF6; /* Text Main */
}

.page-download__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background: #0A4B2C; /* Deep Green */
    color: #F2FFF6; /* Text Main */
    list-style: none; /* For details/summary */
    user-select: none;
    transition: background 0.3s ease;
}

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

.page-download__faq-question:hover {
    background: #13994A; /* Darker green on hover */
}

.page-download__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #F2C14E; /* Gold */
}

.page-download__faq-answer {
    padding: 20px 25px;
    background: #08160F; /* Background */
    color: #A7D9B8; /* Text Secondary */
    border-top: 1px solid #1E3A2A; /* Divider */
    font-size: 1.05em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-download__section-title {
        font-size: 2em;
    }
    .page-download__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }
}

@media (max-width: 768px) {
    .page-download {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-download__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles header offset */
    }

    .page-download__hero-content {
        margin-top: 10px;
    }

    .page-download__main-title {
        font-size: clamp(1.5em, 6vw, 2.5em);
        margin-bottom: 15px;
    }

    .page-download__description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-download__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 90%; /* Adjust max-width for buttons */
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-download__btn-primary,
    .page-download__btn-secondary {
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important; /* Ensure no overflow */
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-download__container {
        padding: 0 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-download__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-download__benefits-section,
    .page-download__guide-section,
    .page-download__video-section,
    .page-download__faq-section,
    .page-download__cta-section {
        padding: 40px 0;
    }

    .page-download__benefit-card,
    .page-download__step-card {
        padding: 25px;
    }

    .page-download__benefit-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px; /* Enforce min size */
        min-height: 200px; /* Enforce min size */
    }

    .page-download__video-wrapper {
        padding-bottom: 56.25% !important;
        height: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .page-download__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

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

    .page-download__faq-answer {
        padding: 15px 20px;
        font-size: 1em;
    }
    
    /* Ensure all images within .page-download are responsive */
    .page-download img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    /* Ensure all containing elements are responsive */
    .page-download__section,
    .page-download__card,
    .page-download__container,
    .page-download__video-section,
    .page-download__video-container,
    .page-download__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by .page-download__container */
        overflow: hidden !important;
    }
}

/* Color contrast enforcement */
.page-download__dark-section {
    background: #11271B; /* Card BG, which is dark */
    color: #F2FFF6; /* Text Main, which is light */
}

.page-download__dark-section .page-download__section-title {
    color: #F2C14E; /* Gold, also light enough for dark background */
}

.page-download__dark-section .page-download__description {
    color: #A7D9B8; /* Text Secondary, also light enough */
}