/* ============================================================
   Download page
   ============================================================ */

.downloadPage {
    padding: 3.5rem 0 5rem;
}

/* ---- Hero ---- */
.downloadHero {
    max-width: 640px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.downloadHero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1F2D3D;
}

.downloadHero p {
    margin: 1rem 0 0;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #5a6b7b;
}

/* ---- Platform cards ---- */
.platformGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 920px;
    margin: 0 auto;
}

.platformCard {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(31, 45, 61, .06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.platformCard:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(31, 45, 61, .1);
}

.platformCard__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #B93939 0%, #7F0000 100%);
    box-shadow: 0 8px 18px rgba(185, 57, 57, .28);
}

.platformCard__icon svg {
    fill: #fff;
}

.platformCard h2 {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #1F2D3D;
}

.versionChip {
    font-size: .78rem;
    font-weight: 600;
    color: #B93939;
    background: rgba(185, 57, 57, .1);
    padding: .2rem .65rem;
    border-radius: 999px;
    line-height: 1.6;
}

.platformCard__desc {
    margin: .8rem 0 0;
    color: #5a6b7b;
    line-height: 1.6;
}

/* Body is pushed to the bottom so both cards' actions line up */
.platformCard__body {
    margin-top: auto;
    padding-top: 1.75rem;
}

/* ---- Mobile: store badges ---- */
.storeBadges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.storeBadge {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .15s ease, opacity .15s ease;
}

.storeBadge:hover {
    opacity: .88;
    transform: translateY(-2px);
}

.ghostLink {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.35rem;
    color: #B93939;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease;
}

.ghostLink svg {
    fill: currentColor;
}

.ghostLink:hover {
    color: #7F0000;
    text-decoration: none;
}

/* ---- Desktop: OS segmented switch ---- */
.osSwitch {
    display: flex;
    gap: 4px;
    padding: 5px;
    margin-bottom: 1.5rem;
    background: #f3f4f6;
    border-radius: 14px;
}

.os-tab {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem .4rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #5a6b7b;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.os-tab svg {
    fill: #5a6b7b;
    transition: fill .18s ease;
}

.os-tab:hover {
    color: #1F2D3D;
}

.os-tab:hover svg {
    fill: #1F2D3D;
}

.os-tab.active {
    background: #fff;
    color: #B93939;
    box-shadow: 0 2px 8px rgba(31, 45, 61, .12);
}

.os-tab.active svg {
    fill: #B93939;
}

/* ---- Desktop: panels ---- */
.os-panel {
    display: none;
}

.os-panel.active {
    display: block;
    animation: dlFadeIn .25s ease;
}

@keyframes dlFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}

/* ---- Primary download button ---- */
.downloadBtn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: #B93939;
    color: #fff;
    text-decoration: none;
    transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.downloadBtn:hover {
    background: #7F0000;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(127, 0, 0, .25);
}

.downloadBtn svg {
    flex-shrink: 0;
    fill: #fff;
}

.downloadBtn__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
    text-align: left;
}

.downloadBtn__label {
    font-size: 1.1rem;
    font-weight: 700;
}

.downloadBtn__sub {
    max-width: 100%;
    overflow: hidden;
    font-size: .8rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: .82;
}

/* ---- Secondary format pills ---- */
.formatPills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.1rem;
}

.formatPills__label {
    margin-right: .15rem;
    font-size: .85rem;
    color: #8a96a3;
}

.formatPill {
    padding: .35rem .85rem;
    border: 1px solid #e6e8ec;
    border-radius: 999px;
    background: #f7f8fa;
    color: #1F2D3D;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.formatPill:hover {
    background: #B93939;
    border-color: #B93939;
    color: #fff;
    text-decoration: none;
}

.osNote {
    margin: 1.1rem 0 0;
    font-size: .85rem;
    color: #8a96a3;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .downloadPage {
        padding: 2rem 0 3rem;
    }

    .downloadHero {
        margin-bottom: 2.5rem;
    }

    .downloadHero h1 {
        font-size: 2rem;
    }

    .downloadHero p {
        font-size: 1.05rem;
    }

    .platformGrid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .platformCard {
        padding: 1.75rem;
    }
}
