/* style/download.css */

/* Custom CSS Variables for colors */
:root {
    --primary-color: #0A2342; /* Dark Blue */
    --secondary-color: #FFD700; /* Gold */
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #f8f9fa; /* Slightly off-white for sections */
    --background-dark: #0A2342;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}

/* Base styles for the page-download scope */
.page-download {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light backgrounds */
    background-color: var(--background-light); /* Default body background is light */
}

/* Section container */
.page-download__section {
    padding: 60px 20px;
    text-align: center;
}

.page-download__dark-bg {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-download__light-bg {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-download__medium-bg {
    background-color: var(--secondary-color); /* Gold background */
    color: var(--text-dark); /* Dark text on gold */
}

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

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

.page-download__section-description {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit; /* Inherit color from parent section */
}

/* Hero Section */
.page-download__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px; /* Adjust padding-bottom for content */
    /* Fixed header spacing */
    padding-top: var(--header-offset, 120px);
}

.page-download__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-download__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

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

.page-download__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-download__main-title {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-light);
}

.page-download__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.page-download__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-download__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 220px; /* Ensure button minimum width */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-download__btn-primary {
    background: var(--secondary-color);
    color: var(--text-dark);
    border: 2px solid var(--secondary-color);
}

.page-download__btn-primary:hover {
    background: #e6c200; /* Slightly darker gold */
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.page-download__btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.page-download__btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

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

.page-download__benefit-item {
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-download__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-medium);
}

.page-download__benefit-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* How to Download Steps */
.page-download__download-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.page-download__step-item {
    background: var(--text-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-light);
    text-align: center;
    color: var(--text-dark);
}

.page-download__step-title {
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-download__qr-code {
    margin: 20px auto;
    display: inline-block;
    border: 5px solid var(--secondary-color);
    border-radius: 8px;
    padding: 5px;
}

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

.page-download__step-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

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

.page-download__feature-item {
    text-align: left;
    padding: 20px;
}

.page-download__feature-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
}

.page-download__feature-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* FAQ Section */
.page-download__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

/* FAQ item card */
.page-download__faq-item.page-download__card {
    background: var(--text-light);
    color: var(--text-dark);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-light);
    border: none; /* Card already has shadow, no need for border */
}

/* FAQ default state - answer hidden */
.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 25px; /* Adjusted padding for better visual */
    opacity: 0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-download__faq-item.active .page-download__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough for content */
    padding: 20px 25px !important; /* Adjusted padding for better visual */
    opacity: 1;
    background: #f0f0f0; /* Slightly different background for expanded answer */
    border-radius: 0 0 8px 8px;
}

/* Question style */
.page-download__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px; /* Adjusted padding for better visual */
    background: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

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

.page-download__faq-question:active {
    background: #eeeeee;
}

/* Question title style */
.page-download__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 tag from blocking click event */
    color: var(--primary-color); /* Ensure good contrast */
}

/* Toggle icon */
.page-download__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-download__faq-item.active .page-download__faq-toggle {
    color: var(--secondary-color);
    transform: rotate(45deg); /* Rotate for 'x' effect, or just change text */
}

/* Card General Style */
.page-download__card {
    background: var(--text-light); /* Default white background for cards */
    color: var(--text-dark); /* Default dark text for cards */
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-light);
    padding: 25px;
    border: 1px solid var(--border-color);
}

/* Final CTA */
.page-download__cta-final {
    padding: 80px 20px;
}

/* Image styling - Ensure no filters */
.page-download img {
    /* No filter properties allowed */
    filter: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-download__main-title {
        font-size: 40px;
    }
    .page-download__section-title {
        font-size: 30px;
    }
    .page-download__hero-description,
    .page-download__section-description {
        font-size: 17px;
    }
    .page-download__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }
    .page-download__benefits-grid,
    .page-download__download-steps,
    .page-download__features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    .page-download__benefit-title,
    .page-download__step-title,
    .page-download__feature-title {
        font-size: 22px;
    }
    .page-download__faq-question h3 {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    /* Fixed header spacing for mobile */
    .page-download__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile padding-top is correct */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-download__main-title {
        font-size: 32px;
        line-height: 1.2;
    }
    .page-download__hero-description {
        font-size: 16px;
    }
    .page-download__section-title {
        font-size: 26px;
    }
    .page-download__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-download__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }
    .page-download__cta-button {
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile image adaptation */
    .page-download img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    .page-download__section,
    .page-download__card,
    .page-download__container,
    .page-download__cta-buttons,
    .page-download__download-steps,
    .page-download__benefits-grid,
    .page-download__features-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    .page-download__faq-question {
        padding: 15px 20px;
        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: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-download__faq-answer {
        padding: 0 20px;
    }
    .page-download__faq-item.active .page-download__faq-answer {
        padding: 15px 20px !important;
    }
}

/* Ensure content area images are not too small by CSS rules */
/* This rule targets any img within .page-download and prevents it from being smaller than 200px */
.page-download img:not(.shared-header img, .shared-footer img) {
    min-width: 200px; /* Enforce minimum width for content images */
    min-height: 200px; /* Enforce minimum height for content images */
    object-fit: cover; /* Maintain aspect ratio and cover space */
}