/* style/download.css */

/* Ensure main content starts below the fixed header */
.page-download {
    padding-top: var(--header-offset, 120px); /* Default for desktop, adjusted by JS for mobile */
    color: #333333; /* Dark text for light body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-download__hero-section {
    position: relative;
    background-color: #0A2463; /* Dark blue background */
    color: #ffffff;
    padding: 80px 20px 40px; /* Adjusted padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden; /* To contain image if it's absolutely positioned */
}

.page-download__hero-content {
    position: relative;
    z-index: 2; /* Ensure content is above image if image is background-like */
    max-width: 800px;
    margin-bottom: 40px;
}

.page-download__hero-title {
    font-size: 3.2em;
    font-weight: bold;
    color: #E0B342; /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-download__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-download__download-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-download__btn {
    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, transform 0.2s ease;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-download__btn--primary {
    background-color: #E0B342; /* Gold */
    color: #0A2463; /* Dark blue text */
    border: 2px solid #E0B342;
}

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

.page-download__btn--secondary {
    background-color: transparent;
    color: #E0B342; /* Gold text */
    border: 2px solid #E0B342;
}

.page-download__btn--secondary:hover {
    background-color: rgba(224, 179, 66, 0.1);
    transform: translateY(-2px);
}

.page-download__hero-image {
    width: 100%;
    max-width: 1200px; /* Max width for the image container */
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.page-download__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    object-fit: cover; /* Ensures image covers area without distortion */
    object-position: center;
}

/* General Section Styling */
.page-download__section-title {
    font-size: 2.5em;
    color: #0A2463; /* Dark blue */
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
    font-weight: bold;
}

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

/* Why App Section */
.page-download__why-app-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
}

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

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

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

.page-download__feature-card img {
    width: 100%;
    max-width: 250px; /* Ensure images are not too wide in cards */
    height: auto;
    min-width: 200px; /* Minimum size for content images */
    min-height: 200px;
    object-fit: contain; /* Ensure full image is visible */
    margin-bottom: 20px;
    border-radius: 8px;
}

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

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

/* How to Download Section */
.page-download__how-to-download-section {
    padding: 60px 20px;
}

.page-download__download-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.page-download__method-card {
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

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

.page-download__step-item {
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    color: #444444;
}

.page-download__step-item::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 0;
    background-color: #E0B342;
    color: #0A2463;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9em;
}

.page-download__method-card .page-download__btn {
    display: block;
    margin: 0 auto;
    margin-top: 30px;
}

.page-download__btn--android {
    background-color: #4CAF50; /* Android green */
    color: #ffffff;
    border: 2px solid #4CAF50;
}
.page-download__btn--android:hover {
    background-color: #66BB6A;
    border-color: #66BB6A;
}

.page-download__btn--ios {
    background-color: #007AFF; /* iOS blue */
    color: #ffffff;
    border: 2px solid #007AFF;
}
.page-download__btn--ios:hover {
    background-color: #3399FF;
    border-color: #3399FF;
}

/* Pre-Installation Notes Section */
.page-download__pre-installation-section {
    padding: 60px 20px;
    background-color: #f0f4f7;
}

.page-download__notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-download__note-item {
    background-color: #ffffff;
    border-left: 5px solid #0A2463;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-download__note-title {
    font-size: 1.4em;
    color: #0A2463;
    margin-bottom: 10px;
}

.page-download__note-description {
    font-size: 0.95em;
    color: #666666;
}

/* FAQ Section */
.page-download__faq-section {
    padding: 60px 20px;
}

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

.page-download__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-download__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #0A2463;
    cursor: pointer;
    background-color: #fdfdfd;
    transition: background-color 0.3s ease;
}

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

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

.page-download__faq-item[open] .page-download__faq-toggle {
    transform: rotate(45deg);
}

.page-download__faq-answer {
    padding: 0 25px 20px;
    font-size: 1.0em;
    color: #555555;
    /* transition is handled natively by <details> or via JS if using div method */
}

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

.page-download__faq-link {
    color: #0A2463;
    text-decoration: underline;
}

.page-download__faq-link:hover {
    color: #E0B342;
}

/* Responsive Adjustments */
@media (min-width: 769px) {
    .page-download__hero-section {
        flex-direction: row;
        text-align: left;
        padding: 100px 40px;
        justify-content: space-between;
        align-items: center;
    }

    .page-download__hero-content {
        max-width: 50%;
        margin-right: 40px;
        margin-bottom: 0;
    }

    .page-download__hero-image {
        max-width: 45%;
        margin-top: 0;
    }

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

    .page-download__download-buttons {
        justify-content: flex-start;
    }

    .page-download__download-methods {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .page-download {
        padding-top: var(--header-offset, 80px); /* Adjust for smaller header on mobile */
    }

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

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

    .page-download__btn {
        width: 100%;
        min-width: unset;
    }

    .page-download__download-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

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

    .page-download__feature-card img,
    .page-download__hero-image img {
        max-width: 100%; /* Ensure images don't overflow */
        width: 100%; /* Ensure images don't overflow */
        height: auto;
        min-width: 200px;
        min-height: 200px;
    }

    /* CRITICAL: Mobile content images must not be smaller than 200px and responsive */
    .page-download img {
        max-width: 100%;
        height: auto;
        min-width: 200px; /* Ensure images are not too small */
        min-height: 200px;
    }
}

/* Ensure no filter is applied to images */
.page-download img {
    filter: none !important;
}