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

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

.page-download__section {
    padding: 60px 0;
    text-align: center;
}

.page-download__section-title {
    font-size: 2.5em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-download__section-description {
    font-size: 1.1em;
    color: #555555;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Hero Section */
.page-download__hero-section {
    position: relative;
    padding: 100px 0 60px; /* Adjusted to allow for header offset */
    padding-top: var(--header-offset, 120px);
    background-color: #017439;
    color: #ffffff;
    overflow: hidden;
}

.page-download__hero-section .page-download__container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    text-align: left;
}

.page-download__hero-content {
    flex: 1;
    max-width: 600px;
}

.page-download__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-download__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

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

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

.page-download__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-download__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-download__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #ffffff;
}

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

.page-download__btn-register {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-download__btn-register:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-download__hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 600px;
}

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

/* Why Download Section */
.page-download__why-download .page-download__section-title {
    color: #017439;
}

.page-download__why-download .page-download__section-description {
    color: #555555;
}

.page-download__grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-download__feature-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-download__feature-icon {
    width: 100%; /* Ensure image fills container */
    height: auto;
    max-height: 250px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-download__feature-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
}

.page-download__feature-text {
    color: #666666;
    font-size: 1em;
}

/* How to Download Section */
.page-download__how-to-download {
    background-color: #f9f9f9;
    color: #333333;
}

.page-download__how-to-download .page-download__section-title {
    color: #017439;
}

.page-download__how-to-download .page-download__section-description {
    color: #555555;
}

.page-download__download-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

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

.page-download__guide-title {
    font-size: 1.8em;
    color: #017439;
    margin-bottom: 25px;
    text-align: center;
}

.page-download__guide-list {
    list-style-type: decimal;
    padding-left: 25px;
    margin-bottom: 30px;
    color: #444444;
}

.page-download__guide-list li {
    margin-bottom: 10px;
    font-size: 1.05em;
}

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

.page-download__guide-qr-code {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 20px auto 30px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.page-download__btn-full-width {
    width: 100%;
    display: block;
    margin-top: 20px;
}

/* App Features Section */
.page-download__app-features {
    background-color: #017439;
    color: #ffffff;
}

.page-download__app-features .page-download__section-title {
    color: #ffffff;
}

.page-download__app-features .page-download__section-description {
    color: #f0f0f0;
}

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

.page-download__feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-download__feature-card-title {
    font-size: 1.6em;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-download__feature-card-text {
    color: #f0f0f0;
    margin-bottom: 20px;
}

.page-download__feature-card-link {
    display: inline-block;
    color: #FFFF00; /* Register/Login font color for accent */
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #FFFF00;
    padding-bottom: 5px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.page-download__feature-card-link:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* System Requirements Section */
.page-download__system-requirements .page-download__section-title {
    color: #017439;
}

.page-download__system-requirements .page-download__section-description {
    color: #555555;
}

.page-download__requirements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.page-download__requirement-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.page-download__requirement-title {
    font-size: 1.8em;
    color: #017439;
    margin-bottom: 20px;
}

.page-download__requirement-list {
    list-style-type: disc;
    padding-left: 25px;
    color: #444444;
}

.page-download__requirement-list li {
    margin-bottom: 10px;
}

.page-download__note-text {
    margin-top: 40px;
    font-style: italic;
    color: #666666;
}

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

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

.page-download__faq-section .page-download__section-description {
    color: #f0f0f0;
}

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

.page-download__faq-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-download__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.page-download__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-download__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-download__faq-item.active .page-download__faq-toggle {
    transform: rotate(0deg); /* '+' becomes '-' */
}

.page-download__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    color: #f0f0f0;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-download__faq-item.active .page-download__faq-answer {
    max-height: 1000px !important; /* Ensure it expands sufficiently */
    padding: 15px 25px;
}

.page-download__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
}

/* Final CTA Section */
.page-download__cta-final .page-download__section-title {
    color: #017439;
}

.page-download__cta-final .page-download__section-description {
    color: #555555;
}

.page-download__cta-final .page-download__cta-buttons {
    justify-content: center;
    margin-top: 40px;
}

/* Image sizing and responsiveness */
.page-download img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: none; /* Ensure no CSS filter is applied */
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-download__hero-title {
        font-size: 2.8em;
    }
    .page-download__hero-description {
        font-size: 1.2em;
    }
    .page-download__hero-section .page-download__container {
        flex-direction: column;
        text-align: center;
    }
    .page-download__hero-content,
    .page-download__hero-image-wrapper {
        max-width: 100%;
        justify-content: center;
    }
    .page-download__cta-buttons {
        justify-content: center;
    }
    .page-download__download-guide,
    .page-download__requirements-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-download {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-download__section {
        padding: 40px 0;
    }
    .page-download__section-title {
        font-size: 2em;
    }
    .page-download__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-download__hero-title {
        font-size: 2.2em;
    }
    .page-download__hero-description {
        font-size: 1em;
    }
    .page-download__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-download__btn-primary,
    .page-download__btn-secondary,
    .page-download__btn-register,
    .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-buttons,
    .page-download__button-group,
    .page-download__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .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-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }
    .page-download img,
    .page-download video,
    .page-download__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    /* Content area images should not be smaller than 200px */
    .page-download__feature-icon {
        min-width: 200px;
        min-height: 200px;
        object-fit: cover;
    }
    .page-download__guide-qr-code {
        min-width: 200px;
        min-height: 200px;
        object-fit: contain;
    }
    .page-download__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-download__faq-answer {
        padding: 0 20px;
    }
    .page-download__faq-item.active .page-download__faq-answer {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .page-download__hero-title {
        font-size: 1.8em;
    }
    .page-download__section-title {
        font-size: 1.8em;
    }
    .page-download__cta-buttons {
        flex-direction: column;
    }
}