/* ============================================================
   Aurora Design System – Affiliate Page (Indigo/Cyan theme)
   ============================================================ */

/* ===== Page Container ===== */
.affiliate-page {
    max-width: 1160px;
    padding: 130px 20px 20px;
}

/* ============================================================
   NAVBAR (reuse index navbar styles)
   ============================================================ */
.navbar {
    background: rgba(6,8,15,0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--aurora-border);
    padding: 14px 0;
    transition: var(--aurora-transition);
    z-index: 1050;
}

.navbar.scrolled {
    background: rgba(6,8,15,0.95);
    box-shadow: 0 4px 30px rgba(99,102,241,0.22);
}

.navbar .nav-link {
    color: var(--aurora-text-muted) !important;
    font-weight: 500;
    font-size: 15px;
    transition: var(--aurora-transition);
    position: relative;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--aurora-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--aurora-text) !important;
}

.navbar .nav-link:hover::after {
    width: 60%;
}

.navbar-brand img {
    height: 38px;
    transition: var(--aurora-transition);
}

.navbar-brand:hover img {
    filter: drop-shadow(0 0 12px rgba(99,102,241,0.55));
}

.navbar-toggler {
    border-color: var(--aurora-border);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* ============================================================
   HERO
   ============================================================ */
.affiliate-hero {
    text-align: center;
    padding: 20px 0 54px;
    margin-bottom: 50px;
    position: relative;
}

.affiliate-hero::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 240px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.7), rgba(6,182,212,0.7), transparent);
}

.affiliate-hero h1 {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 20px auto 18px;
    line-height: 1.1;
    max-width: 760px;
}

.affiliate-hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #c7d2fe 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}

.affiliate-hero h1 span {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25em;
}

.affiliate-hero-lead {
    font-size: 18px;
    color: var(--aurora-text-muted);
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.75;
}

.affiliate-hero-lead strong {
    color: #fff;
}

/* ===== Meta Chips (shared with legal pages) ===== */
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(15,23,42,0.55);
    border: 1px solid var(--aurora-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--aurora-text-muted);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(15,23,42,0.3);
    transition: var(--aurora-transition);
}

.meta-chip i {
    color: var(--aurora-secondary);
    font-size: 14px;
}

.meta-chip:hover {
    border-color: var(--aurora-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99,102,241,0.25);
}

/* ===== Primary & Outline Buttons (indigo/cyan theme) ===== */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #06b6d4 100%);
    background-size: 200% auto;
    border: none;
    font-weight: 700;
    border-radius: var(--aurora-radius-sm);
    transition: var(--aurora-transition);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(99,102,241,0.4);
    color: #fff;
}

.btn-outline-light {
    border: 1px solid var(--aurora-border);
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--aurora-radius-sm);
    color: var(--aurora-text);
    background: var(--aurora-surface);
    backdrop-filter: blur(12px);
    transition: var(--aurora-transition);
}

.btn-outline-light:hover {
    background: rgba(99,102,241,0.18);
    border-color: var(--aurora-border-hover);
    color: #e0e7ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99,102,241,0.28);
}

.affiliate-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.affiliate-section {
    padding: 20px 0 50px;
}

.affiliate-section.section-alt {
    border-radius: 28px;
    padding: 40px 30px;
    margin-bottom: 10px;
}

/* ===== Benefit Cards ===== */
.affiliate-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.affiliate-card {
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius);
    padding: 28px 26px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.affiliate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--aurora-radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0), rgba(6,182,212,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: var(--aurora-transition);
    pointer-events: none;
}

.affiliate-card:hover {
    transform: translateY(-6px);
    border-color: var(--aurora-border-hover);
    box-shadow: 0 24px 64px rgba(99,102,241,0.2), 0 0 40px rgba(6,182,212,0.1);
}

.affiliate-card:hover::before {
    background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(6,182,212,0.4));
}

.affiliate-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99,102,241,0.85), rgba(6,182,212,0.75));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(99,102,241,0.35);
}

.affiliate-card-icon i {
    font-size: 22px;
    color: #fff;
}

.affiliate-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--aurora-text);
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.affiliate-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--aurora-text-muted);
    margin: 0;
}

/* ===== Steps ===== */
.affiliate-steps {
    max-width: 720px;
    margin: 0 auto 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.affiliate-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    background: rgba(15,23,42,0.55);
    border: 1px solid var(--aurora-border);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.affiliate-step:hover {
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 8px 24px rgba(99,102,241,0.14);
    transform: translateX(4px);
}

.affiliate-step .step-num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99,102,241,0.9), rgba(6,182,212,0.8));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}

.affiliate-step strong {
    display: block;
    font-size: 15px;
    color: var(--aurora-text);
    margin-bottom: 2px;
}

.affiliate-step span:last-child {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: var(--aurora-text-muted);
}

/* ===== CTA Box ===== */
.affiliate-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 30px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(6,182,212,0.12));
    border: 1px solid rgba(99,102,241,0.3);
    flex-wrap: wrap;
}

.affiliate-cta-box > div {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 240px;
}

.affiliate-cta-box > div > i {
    font-size: 28px;
    color: #fbbf24;
    flex-shrink: 0;
}

.affiliate-cta-box strong {
    display: block;
    font-size: 17px;
    color: #fff;
    margin-bottom: 2px;
}

.affiliate-cta-box span:last-child {
    font-size: 14px;
    color: var(--aurora-text-muted);
    line-height: 1.6;
}

.affiliate-cta-box .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== FAQ (reuse support accordion) ===== */
.affiliate-page .faq-item {
    margin-bottom: 12px;
    padding: 16px;
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.affiliate-page .faq-item:hover {
    border-color: var(--aurora-border-hover);
    box-shadow: 0 8px 24px rgba(99,102,241,0.16);
    transform: translateY(-2px);
}

.affiliate-page .faq-item.active {
    border-color: rgba(99,102,241,0.4);
    background: rgba(15,23,42,0.75);
}

.affiliate-page .faq-question {
    font-weight: 700;
    color: var(--aurora-primary-light);
    margin-bottom: 0;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    user-select: none;
    transition: color 0.3s ease;
}

.affiliate-page .faq-question:hover {
    color: #fff;
}

.affiliate-page .faq-chevron {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    opacity: 0.6;
    flex-shrink: 0;
}

.affiliate-page .faq-item.active .faq-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--aurora-secondary);
}

.affiliate-page .faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.affiliate-page .faq-answer > p {
    overflow: hidden;
    min-height: 0;
    padding-top: 0;
    margin-top: 0;
}

.affiliate-page .faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.affiliate-page .faq-item.active .faq-answer > p {
    padding-top: 10px;
}

.affiliate-page .faq-item p {
    color: var(--aurora-text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================
   PROMO BANNERS (125x125 + 468x60)
   ============================================================ */
.banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.banner-card {
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--aurora-border);
    border-radius: var(--aurora-radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 22px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--aurora-radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99,102,241,0), rgba(6,182,212,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: var(--aurora-transition);
    pointer-events: none;
}

.banner-card:hover {
    border-color: var(--aurora-border-hover);
    box-shadow: 0 24px 64px rgba(99,102,241,0.18), 0 0 40px rgba(6,182,212,0.1);
    transform: translateY(-4px);
}

.banner-card:hover::before {
    background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(6,182,212,0.4));
}

.banner-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border-radius: 14px;
    background: rgba(6,10,20,0.6);
    border: 1px dashed rgba(148,163,184,0.22);
    min-height: 150px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.banner-card:hover .banner-preview {
    border-color: rgba(99,102,241,0.45);
    background: rgba(10,14,28,0.7);
}

.banner-preview a {
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(15,23,42,0.6);
    line-height: 0;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.banner-preview a:hover {
    transform: scale(1.04);
    box-shadow: 0 20px 50px rgba(99,102,241,0.35);
}

.banner-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

.banner-info h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
    color: var(--aurora-text);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.banner-size {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    background: rgba(6,182,212,0.14);
    border: 1px solid rgba(6,182,212,0.32);
    color: #67e8f9;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0;
}

.banner-info > p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--aurora-text-muted);
    margin-bottom: 16px;
}

/* Code box + copy button */
.banner-code-box {
    position: relative;
}

.banner-code {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    padding: 14px 16px;
    padding-right: 110px;
    border-radius: 12px;
    background: rgba(6,10,20,0.75);
    border: 1px solid rgba(148,163,184,0.2);
    color: #a5b4fc;
    font-family: 'Courier New', Consolas, Menlo, monospace;
    font-size: 12px;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.banner-code:focus {
    border-color: rgba(99,102,241,0.55);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}

.btn-copy {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(99,102,241,0.4);
    background: linear-gradient(135deg, rgba(99,102,241,0.8), rgba(6,182,212,0.7));
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--aurora-transition);
    white-space: nowrap;
}

.btn-copy i {
    font-size: 13px;
}

.btn-copy:hover {
    background: linear-gradient(135deg, rgba(99,102,241,1), rgba(6,182,212,0.9));
    box-shadow: 0 8px 22px rgba(99,102,241,0.4);
    transform: translateY(-50%) scale(1.04);
}

.btn-copy.copied {
    background: linear-gradient(135deg, rgba(16,185,129,0.9), rgba(6,182,212,0.8));
    border-color: rgba(16,185,129,0.55);
    box-shadow: 0 8px 22px rgba(16,185,129,0.35);
}

/* Reveal animation */
.js .banner-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.js .banner-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .affiliate-page {
        padding: 110px 20px 20px;
    }
}

@media (max-width: 767.98px) {
    .affiliate-page {
        padding: 106px 16px 12px;
    }

    .affiliate-hero {
        padding: 4px 0 40px;
    }

    .affiliate-hero h1 {
        font-size: 36px;
    }

    .affiliate-hero-lead {
        font-size: 15.5px;
    }

    .affiliate-card-grid {
        grid-template-columns: 1fr;
    }

    .affiliate-card {
        padding: 24px 20px;
    }

    .affiliate-cta-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 24px 20px;
    }

    .affiliate-cta-box > div {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .affiliate-cta-box .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .legal-meta {
        gap: 8px;
    }

    .meta-chip {
        font-size: 12px;
        padding: 7px 14px;
    }

    .affiliate-hero-actions .btn {
        width: 100%;
    }
}
