/* Affiliate Section Specific Styles */
.affiliate-section {
    position: relative;
    padding: 5px 0;
    /* Reduced from 80px */
    overflow: hidden;
    background-color: #ffffff;
    font-family: 'Outfit', sans-serif;
    /* Changed from Inter to match site */

    /* Scoped Variables */
    --aff-primary: #6366f1;
    --aff-primary-light: #818cf8;
    --aff-primary-dark: #4f46e5;
    --aff-secondary: #8b5cf6;
    --aff-accent: #10b981;
    --aff-accent-light: #34d399;
    --aff-gold: #f59e0b;
    --aff-gold-light: #fbbf24;
    --aff-dark: #0f172a;
    --aff-dark-light: #1e293b;
    --aff-light: #ffffff;
    --aff-light-gray: #f8fafc;
    --aff-gray: #e2e8f0;
    --aff-gray-dark: #94a3b8;
    --aff-gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --aff-gradient-accent: linear-gradient(135deg, #10b981, #0d9488);
    --aff-gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
    /* Matched gradient from commission-section */
    --aff-gradient-multi: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    --aff-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --aff-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --aff-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --aff-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.1);
    --aff-shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --aff-radius-sm: 12px;
    --aff-radius-md: 16px;
    --aff-radius-lg: 24px;
    --aff-radius-xl: 32px;
}

/* Background Pattern */
.affiliate-section .background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--aff-light);
    opacity: 1;
    overflow: hidden;
    pointer-events: none;
}

.affiliate-section .pattern-network {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.03) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.03) 2px, transparent 2px);
    background-size: 60px 60px, 50px 50px;
    opacity: 0.7;
}

.affiliate-section .floating-network {
    position: absolute;
    width: 100%;
    height: 100%;
}

.affiliate-section .network-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--aff-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.affiliate-section .network-line {
    position: absolute;
    width: 0;
    /* JS handles width */
    height: 1px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    transform-origin: 0 0;
}

/* Particles */
.affiliate-section .particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

.affiliate-section .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--aff-primary);
    border-radius: 50%;
    opacity: 0;
    animation: affParticleFloat 25s infinite linear;
}

@keyframes affParticleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Layout */
.affiliate-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Header */
.affiliate-header {
    text-align: left;
    /* Changed from center to left */
    padding: 0 0 30px;
    /* Reduced from 60px */
    /* Reduced bottom padding */
    position: relative;
    max-width: 900px;
    /* Limit width for readability */
}

.affiliate-section h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: var(--aff-gradient-multi);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Removed margin: auto */
    font-family: 'Outfit', sans-serif;
}

.affiliate-section .subtitle {
    font-size: 1.1rem;
    /* Match block-description size */
    color: #475569;
    /* Match block-description color */
    max-width: 800px;
    margin: 0;
    /* Remove auto margin */
    line-height: 1.8;
    /* Match block-description line-height */
    font-weight: 400;
}

/* Program Intro */
.affiliate-section .program-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    /* Reduced from 80px */
}

.affiliate-section .intro-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 2px;
    /* Reduced from 24px */
    color: var(--aff-dark);
    font-family: 'Outfit', sans-serif;
}

.affiliate-section .intro-description {
    font-size: 18px;
    color: var(--aff-dark-light);
    line-height: 1.7;
}

/* Plans Container */
.affiliate-section .plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
    /* Reduced from 100px */
}

.affiliate-section .plan-card {
    background: var(--aff-light);
    border-radius: var(--aff-radius-lg);
    padding: 10px 20px;
    /* Reduced from 40px */
    position: relative;
    overflow: hidden;
    border: 1px solid var(--aff-gray);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--aff-shadow-md);
}

.affiliate-section .plan-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--aff-shadow-xl);
    border-color: var(--aff-primary);
}

.affiliate-section .plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--aff-gradient-primary);
}

.affiliate-section .plan-card.pro::before {
    background: var(--aff-gradient-accent);
}

.affiliate-section .plan-card.expert::before {
    background: var(--aff-gradient-gold);
}

.affiliate-section .plan-header {
    text-align: center;
    margin-bottom: 20px;
    /* Reduced from 32px */
    padding-bottom: 10px;
    /* Reduced from 24px */
    border-bottom: 1px solid var(--aff-gray);
}

.affiliate-section .plan-name {
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    /* Added to reduce space above */
    margin-bottom: 2px;
    /* Further reduced from 5px */
    font-family: 'Outfit', sans-serif;
}

.affiliate-section .starter .plan-name {
    color: var(--aff-primary);
}

.affiliate-section .pro .plan-name {
    color: var(--aff-accent);
}

.affiliate-section .expert .plan-name {
    color: var(--aff-gold);
}

.affiliate-section .referral-count {
    display: inline-block;
    padding: 8px 20px;
    background: var(--aff-gradient-primary);
    color: white;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    /* Reduced from 16px */
}

.affiliate-section .pro .referral-count {
    background: var(--aff-gradient-accent);
}

.affiliate-section .expert .referral-count {
    background: var(--aff-gradient-gold);
}

/* Commission Structure */
.affiliate-section .commission-structure {
    margin-bottom: 40px;
}

.affiliate-section .structure-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--aff-dark);
    text-align: center;
}

.affiliate-section .commission-levels {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.affiliate-section .commission-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: var(--aff-light-gray);
    border-radius: var(--aff-radius-sm);
    border: 1px solid var(--aff-gray);
    transition: all 0.2s ease;
}

.affiliate-section .commission-level:hover {
    transform: translateX(4px);
    border-color: var(--aff-primary-light);
}

.affiliate-section .level-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.affiliate-section .level-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.affiliate-section .level-1 .level-badge {
    background: var(--aff-primary);
}

.affiliate-section .level-2 .level-badge {
    background: var(--aff-secondary);
}

.affiliate-section .level-3 .level-badge {
    background: var(--aff-accent);
}

.affiliate-section .level-4 .level-badge {
    background: var(--aff-gold);
}

.affiliate-section .level-5 .level-badge {
    background: #f43f5e;
}

.affiliate-section .level-6 .level-badge {
    background: #8b5cf6;
}

.affiliate-section .level-text {
    font-weight: 500;
    color: var(--aff-dark);
}

.affiliate-section .level-1 .level-text {
    font-weight: 700;
}

.affiliate-section .commission-percentage {
    font-size: 24px;
    font-weight: 700;
    color: var(--aff-dark);
    font-family: 'Outfit', sans-serif;
}

.affiliate-section .level-1 .commission-percentage {
    color: var(--aff-primary);
}

/* Visual Network */
.affiliate-section .network-visualization {
    margin: 5px 0 50px;
    /* Reduced top margin to 5px */
    text-align: center;
}

.affiliate-section .network-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 2px;
    /* Reduced to 2px */
    background: var(--aff-gradient-multi);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Outfit', sans-serif;
}

.affiliate-section .network-subtitle {
    font-size: 18px;
    color: var(--aff-dark-light);
    max-width: 700px;
    margin: 0 auto 30px;
    /* Reduced from 60px */
    line-height: 1.6;
}

.affiliate-section .network-container {
    position: relative;
    height: 500px;
    background: rgba(248, 250, 252, 0.7);
    border-radius: var(--aff-radius-xl);
    border: 1px solid var(--aff-gray);
    overflow: hidden;
    margin-bottom: 80px;
}

/* Responsive */
@media (max-width: 992px) {
    .affiliate-section .plans-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .affiliate-section h1 {
        font-size: 42px;
    }

    .affiliate-section .network-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .affiliate-section h1 {
        font-size: 36px;
    }

    .affiliate-section .network-title {
        font-size: 28px;
    }

    .affiliate-section .commission-level {
        padding: 6px 12px;
    }

    .affiliate-section .commission-percentage {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .affiliate-section .container {
        padding: 0 16px;
    }

    .affiliate-section h1 {
        font-size: 32px;
    }

    .affiliate-section .plan-card {
        padding: 10px 15px;
    }
}