/* style/download.css */

/* Base styles for the download page */
.page-download {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background from shared.css */
}

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

.page-download__dark-section {
    background-color: #017439; /* Brand primary color for dark sections */
    color: #ffffff;
    padding: 60px 0;
}

.page-download__light-bg {
    background-color: #ffffff; /* Auxiliary color for light sections */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-download__section-title {
    font-size: 2.5em;
    color: inherit; /* Inherit from parent section */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-download__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.8;
}

/* Hero Section */
.page-download__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #017439 0%, #004d2c 100%); /* Gradient for hero */
}

.page-download__hero-content {
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.page-download__hero-title {
    font-size: 3.2em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #FFFF00; /* Register/Login font color for emphasis */
}

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

.page-download__download-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.page-download__btn-primary {
    background-color: #C30808; /* Specific color for Register/Login/Download */
    color: #FFFF00; /* Specific font color for Register/Login/Download */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
}

.page-download__btn-primary:hover {
    background-color: #a30606;
    transform: translateY(-3px);
}

.page-download__btn-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
}

.page-download__qr-code-wrapper {
    margin-top: 30px;
    text-align: center;
}

.page-download__qr-text {
    font-size: 1.1em;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-download__qr-code {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 5px solid #ffffff;
}

.page-download__hero-image-wrapper {
    position: absolute;
    bottom: -50px; /* Adjust as needed */
    right: 5%;
    width: 40%;
    max-width: 600px;
    z-index: 0;
    opacity: 0.8;
    display: none; /* Hidden on desktop, shown on larger screens */
}

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

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

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

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

.page-download__feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
}

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

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

/* Guide Section */
.page-download__guide-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 15px;
}

.page-download__tab-button {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-download__tab-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.page-download__tab-button--active {
    background-color: #ffffff;
    color: #017439;
    font-weight: bold;
}

.page-download__tab-content {
    display: none;
}

.page-download__tab-content--active {
    display: block;
}

.page-download__guide-subtitle {
    font-size: 2em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
}

.page-download__guide-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.page-download__guide-list li {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-download__guide-step-title {
    font-size: 1.6em;
    color: #FFFF00;
    margin-bottom: 15px;
}

.page-download__guide-step-text {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 25px;
    max-width: 700px;
}

.page-download__guide-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
}

.page-download__btn-center {
    display: block;
    width: fit-content;
    margin: 40px auto 0 auto;
}

/* App Features Section (Large Cards) */
.page-download__features-grid--large {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-download__feature-card--large {
    padding: 0; /* Remove padding to make image fill */
    overflow: hidden;
    color: #333333;
    text-align: left;
}

.page-download__feature-card--large .page-download__feature-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 12px 12px 0 0;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
}

.page-download__feature-card--large .page-download__feature-title {
    padding: 0 25px;
    color: #017439;
    font-size: 1.6em;
}

.page-download__feature-card--large .page-download__feature-text {
    padding: 0 25px 25px 25px;
    color: #555555;
    font-size: 1em;
}

/* System Requirements Section */
.page-download__requirements-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.page-download__requirement-item {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex: 1;
    min-width: 280px;
    max-width: 45%;
    text-align: center;
}

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

.page-download__requirement-list {
    list-style: none;
    padding: 0;
}

.page-download__requirement-list li {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 10px;
}

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

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

.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-color: #ffffff;
    color: #017439;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.page-download__faq-question:hover {
    background-color: #f0f0f0;
}

.page-download__faq-title {
    margin: 0;
    font-size: 1.2em;
    color: inherit;
}

.page-download__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-download__faq-item.active .page-download__faq-toggle {
    transform: rotate(45deg); /* Plus sign becomes cross */
}

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

.page-download__faq-item.active .page-download__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px;
}

.page-download__faq-answer p {
    margin: 0;
    font-size: 1em;
    color: inherit;
}


/* Final CTA Section */
.page-download__cta-section {
    text-align: center;
    padding: 80px 0;
}

.page-download__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.page-download__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    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, transform 0.3s ease;
    border: 2px solid #017439;
}

.page-download__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #004d2c;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (min-width: 1024px) {
    .page-download__hero-section {
        flex-direction: row;
        text-align: left;
        padding: 100px 0;
        justify-content: space-between;
    }
    .page-download__hero-content {
        padding-left: 5%;
        max-width: 50%;
        text-align: left;
    }
    .page-download__hero-title {
        font-size: 3.8em;
    }
    .page-download__hero-image-wrapper {
        display: block; /* Show hero image on larger screens */
        position: relative;
        bottom: 0;
        right: 0;
        width: 45%;
        opacity: 1;
    }
    .page-download__qr-code-wrapper {
        text-align: left;
    }
}


@media (max-width: 768px) {
    .page-download__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-download__hero-title {
        font-size: 2.5em;
    }

    .page-download__hero-description {
        font-size: 1em;
    }

    .page-download__download-options {
        flex-direction: column;
        align-items: center;
    }

    .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 !important;
        padding-right: 15px !important;
    }

    .page-download__qr-code {
        width: 200px;
        height: 200px;
    }

    .page-download__section-title {
        font-size: 2em;
    }

    .page-download__section-description {
        font-size: 0.95em;
    }

    .page-download__features-grid,
    .page-download__features-grid--large {
        grid-template-columns: 1fr;
    }

    .page-download__feature-icon {
        width: 60px;
        height: 60px;
        min-width: 200px !important; /* Enforce min image size */
        min-height: 200px !important; /* Enforce min image size */
    }

    .page-download__feature-card--large .page-download__feature-image {
        height: 200px; /* Adjust height for mobile */
        min-width: 200px !important; /* Enforce min image size */
        min-height: 200px !important; /* Enforce min image size */
    }

    .page-download__guide-list li {
        padding: 20px;
    }

    .page-download__guide-step-title {
        font-size: 1.4em;
    }

    .page-download__guide-step-text {
        font-size: 0.95em;
    }

    .page-download__guide-image {
        min-width: 200px !important; /* Enforce min image size */
        min-height: 200px !important; /* Enforce min image size */
    }

    .page-download__requirements-grid {
        flex-direction: column;
    }

    .page-download__requirement-item {
        max-width: 100%;
    }

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

    /* All images responsive for mobile */
    .page-download img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}