/* =========================================================
   FAYADH WEBSITE — DOWNLOAD THE APP
   Green call-to-action panel: title, text, store buttons
   (light version) and a QR code card on wide screens.
========================================================= */


/* =========================================================
   1. SECTION & PANEL
========================================================= */

.download {
    background: var(--white);
}

.download-panel {
    position: relative;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;

    gap: 48px;

    padding: 64px;

    overflow: hidden;

    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);

    border-radius: 28px;
}


/* Soft decorative circles (purely visual). */

.download-panel::before,
.download-panel::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.download-panel::before {
    width: 420px;
    height: 420px;

    top: -180px;
    inset-inline-end: -120px;

    background: rgba(255, 255, 255, 0.06);
}

.download-panel::after {
    width: 260px;
    height: 260px;

    bottom: -150px;
    inset-inline-start: 30%;

    background: var(--secondary-tint);
}

/* Content above the decorations. */

.download-content,
.download-qr-card {
    position: relative;
    z-index: 1;
}


/* =========================================================
   2. CONTENT
========================================================= */

.download-title {
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 800;
    line-height: 1.2;
}

html[dir="rtl"] .download-title {
    line-height: 1.4;
}

.download-text {
    max-width: 560px;

    margin-top: 14px;

    color: rgba(255, 255, 255, 0.82);

    font-size: 17px;
    line-height: 1.7;
}

/* Which stores have the app (set by js/components/store-links.js). */

.download-availability {
    margin-top: 12px;

    display: flex;
    align-items: center;

    gap: 8px;

    color: var(--white);

    font-size: 15px;
    font-weight: 700;
}

.download-availability::before {
    content: "";

    width: 8px;
    height: 8px;

    flex-shrink: 0;

    background: var(--secondary);

    border-radius: 50%;

    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.download-availability[hidden] {
    display: none;
}

.download-content .store-buttons {
    margin-top: 32px;
}


/* =========================================================
   3. QR CODE CARD
   Shown only on wide screens (people scan it with a phone).
   Starts hidden; js/components/download-qr.js reveals it
   once the code is drawn.
========================================================= */

.download-qr-card {
    padding: 20px 20px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 12px;

    background: var(--white);

    border-radius: 20px;

    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.download-qr-card[hidden] {
    display: none;
}

/* One QR code per store that has the app (one or two). */

.download-qr-list {
    display: flex;

    gap: 18px;
}

.download-qr-item {
    margin: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 6px;
}

.download-qr {
    width: 168px;
    height: 168px;

    color: var(--heading);
}

.download-qr-card.is-double .download-qr {
    width: 128px;
    height: 128px;
}

.download-qr-store {
    color: var(--text);

    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 700;
}

.download-qr svg {
    display: block;

    width: 100%;
    height: 100%;
}

.download-qr-label {
    color: var(--heading);

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   4. RESPONSIVE
========================================================= */

/* Same breakpoint as QR_BREAKPOINT in js/config.js. */

@media (max-width: 860px) {

    .download-panel {
        grid-template-columns: 1fr;

        padding: 48px 28px;

        text-align: center;
    }

    .download-text {
        margin-inline: auto;
    }

    .download-availability {
        justify-content: center;
    }

    .download-content .store-buttons {
        justify-content: center;
    }

    /* No QR on phones and tablets: they download directly. */
    .download-qr-card,
    .download-qr-card[hidden] {
        display: none;
    }

}

@media (max-width: 520px) {

    .download-panel {
        padding: 40px 20px;

        border-radius: 22px;
    }

}
