/* ===== Download Page Styles ===== */

/* --- Hero --- */
.download-main {
    padding-top: 80px; /* header height offset */
}

.dl-hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a3a6e 100%);
    padding: 80px 0 64px;
    text-align: center;
    color: #fff;
}

.dl-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #e2e8f0;
}

.dl-hero-title {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.dl-hero-sub {
    font-size: 18px;
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.dl-stats {
    display: inline-flex;
    align-items: center;
    gap: 32px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 20px 40px;
}

.dl-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dl-stat-num {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.dl-stat-label {
    font-size: 13px;
    color: #94a3b8;
}

.dl-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.15);
}

/* --- Sticky Platform Tabs --- */
.platform-tabs-wrap {
    position: sticky;
    top: 80px; /* below fixed header */
    z-index: 900;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.platform-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.platform-tabs::-webkit-scrollbar {
    display: none;
}

.ptab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.ptab:hover {
    background: var(--bg-gray);
    color: var(--text-dark);
}

.ptab.active {
    background: var(--primary-blue);
    color: #fff;
}

.ptab i {
    font-size: 16px;
}

/* --- Download Section --- */
.dl-section {
    padding-top: 48px;
}

/* Quick Start Banner */
.quickstart-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-blue-light), #f0f4ff);
    border: 1px solid #c7d9f0;
    border-radius: 16px;
    padding: 20px 28px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.qs-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.qs-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.qs-num {
    width: 26px;
    height: 26px;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.qs-arrow {
    color: var(--primary-blue);
    font-size: 13px;
}

.qs-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
    transition: gap 0.2s;
}

.qs-link:hover {
    gap: 10px;
}

/* Platform Section */
.platform-section {
    margin-bottom: 60px;
}

.platform-section.hidden {
    display: none;
}

.platform-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dark);
}

.platform-title i {
    color: var(--primary-blue);
}

.platform-desc {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.7;
}

.secondary-title {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-gray);
    border-top: 1px solid #e2e8f0;
    padding-top: 32px;
}

/* Client Card Grids */
.client-primary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 16px;
}

.client-secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

/* Client Card */
.client-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    position: relative;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.client-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-featured {
    border-color: #c7d9f0;
    background: linear-gradient(145deg, #fff 0%, #f8faff 100%);
}

.card-archived {
    background: #fafafa;
    border-color: #e2e8f0;
}

.card-archived:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Badges */
.card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-primary {
    background: #fef3c7;
    color: #92400e;
}

.badge-new {
    background: #dcfce7;
    color: #166534;
}

.badge-archived {
    background: #fff7ed;
    color: #9a3412;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

/* Card Header */
.client-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.client-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.client-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.client-tagline {
    font-size: 13px;
    color: var(--text-gray);
}

.client-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    flex: 1;
}

/* Feature chips */
.client-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.client-features span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-gray);
    border-radius: 999px;
    padding: 4px 12px;
    color: var(--text-dark);
}

.client-features span i {
    color: #22c55e;
    font-size: 11px;
}

/* Download Buttons */
.dl-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.btn-pulse {
    animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(30, 71, 123, 0.4); }
    70%  { box-shadow: 0 0 0 8px rgba(30, 71, 123, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 71, 123, 0); }
}

.btn-outline-dark {
    background: transparent;
    border: 1.5px solid #cbd5e1;
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-dark:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--bg-blue-light);
}

/* System requirements */
.sysreq {
    font-size: 12px;
    color: var(--text-light);
}

/* GitHub link in card */
.github-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-gray);
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.github-link a {
    color: var(--text-gray);
    transition: color 0.2s;
}

.github-link a:hover {
    color: var(--primary-blue);
}

/* Platform note */
.platform-note {
    display: flex;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dark);
}

.platform-note i {
    color: #f59e0b;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* iOS Notice */
.ios-notice {
    display: flex;
    gap: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.7;
}

.ios-notice i {
    color: #f97316;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.ios-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-blue);
    font-weight: 600;
    margin-top: 6px;
}

/* iOS Tutorial */
.ios-tutorial {
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 32px;
    margin-top: 40px;
}

.ios-tutorial h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ios-tutorial h3 i {
    color: var(--primary-blue);
}

.ios-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ios-step {
    display: flex;
    gap: 16px;
}

.ios-step-num {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ios-step strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.ios-step p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

/* Linux CLI */
.linux-cli-section {
    margin-top: 40px;
    padding: 32px;
    background: var(--bg-gray);
    border-radius: 20px;
}

.linux-cli-section h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.linux-cli-section h3 i {
    color: var(--primary-blue);
}

.linux-cli-section p {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.code-terminal {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #30363d;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    font-size: 13px;
    color: #8b949e;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #484f58;
}

.terminal-body {
    padding: 20px 24px;
    font-size: 13px;
    line-height: 1.8;
    color: #c9d1d9;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    margin: 0;
}

.t-comment {
    color: #8b949e;
}

/* Reset code element styles inside dark terminal blocks */
.terminal-body code,
.terminal-body code span {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* FAQ Section */
.faq-section {
    background: var(--bg-gray);
    padding: 80px 0;
    margin-top: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item[open] {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
    color: var(--text-dark);
    transition: background 0.15s;
}

.faq-question:hover {
    background: var(--bg-gray);
}

.faq-question::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: var(--text-gray);
    transition: transform 0.2s;
}

details[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: none;
    overflow: visible;
    padding: 16px 24px 24px;
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.75;
    transition: none;
    border-top: 1px solid #f1f5f9;
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 20px;
    margin: 8px 0;
    list-style: disc;
}

.faq-answer ol {
    list-style: decimal;
}

.faq-answer li {
    margin-bottom: 6px;
}

.faq-answer a {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* CTA Section */
.dl-cta {
    padding: 80px 0;
}

.dl-cta-inner {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2a5cad 100%);
    border-radius: 24px;
    padding: 64px;
    text-align: center;
    color: #fff;
}

.dl-cta-inner h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.dl-cta-inner p {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 36px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .download-main {
        padding-top: 64px;
    }

    .platform-tabs-wrap {
        top: 64px;
    }

    .dl-hero-title {
        font-size: 32px;
    }

    .dl-stats {
        gap: 20px;
        padding: 16px 24px;
        flex-wrap: wrap;
    }

    .client-primary-grid {
        grid-template-columns: 1fr;
    }

    .client-secondary-grid {
        grid-template-columns: 1fr;
    }

    .quickstart-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .dl-cta-inner {
        padding: 40px 24px;
    }

    .dl-cta-inner h2 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .dl-hero {
        padding: 48px 0 40px;
    }

    .dl-hero-title {
        font-size: 30px;
    }

    .dl-hero-sub {
        font-size: 15px;
    }

    .platform-title {
        font-size: 24px;
    }

    .ptab {
        padding: 8px 14px;
        font-size: 14px;
    }

    .ios-tutorial {
        padding: 20px;
    }

    .linux-cli-section {
        padding: 20px;
    }
}
