/* === MODERN AFFILIATE THEME (BRANDED) === */
:root {
    /* Updated to match site.css definition of --primary and generic gradients */
    --aff-primary: #7c5cff;
    /* Purple */
    --aff-primary-dark: #5a3eff;
    /* Darker Purple */
    --aff-accent: #30d5c8;
    /* Teal/Cyan */
    --aff-dark-bg: #0b0b12;
    /* Site Dark BG */
    --aff-card-bg: #ffffff;
    --aff-text-main: #1e293b;
    --aff-text-muted: #64748b;
}

/* Hero Section */
.affiliate-hero-section {
    position: relative;
    padding: 180px 0 160px;
    overflow: hidden;
    /* Updated background to match site's deep purple/blue vibe */
    background: radial-gradient(120% 120% at 50% 50%, #0b0b12 0%, #151531 100%);
    color: white;
}

.hero-glow-effect {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1400px;
    height: 800px;
    /* Purple glow */
    background: radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 70% !important;
    width: 100%;
}

.affiliate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #cfd4ff;
    /* Lighter purple tint */
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.affiliate-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.affiliate-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    /* Gradient Text: White to White-Purple */
    background: linear-gradient(180deg, #ffffff 0%, #b9bde0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.affiliate-desc {
    font-size: 1.25rem;
    color: #b9bde0;
    /* Muted purple-grey */
    max-width: 580px;
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero-btn {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.btn-glow-primary {
    /* Site Main Gradient */
    background: linear-gradient(135deg, #7c5cff 0%, #5a3eff 50%, #30d5c8 120%);
    color: white;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(124, 92, 255, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-glow-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px -5px rgba(124, 92, 255, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    color: white;
}

/* Custom Grid */
.custom-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
}

@media (min-width: 768px) {
    .custom-hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        text-align: left;
        align-items: center;
        gap: 50px;
    }
}

.hero-badge-wrapper {
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-badge-wrapper {
        justify-content: flex-start;
    }
}

/* Enhanced Dashboard Card */
.dashboard-preview-wrapper {
    position: relative;
    perspective: 1200px;
}

.affiliate-dashboard-card {
    background: rgba(20, 20, 39, 0.7);
    /* Darker card bg */
    border-radius: 24px;
    padding: 30px;
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    transform: rotateY(-8deg) rotateX(4deg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 380px;
}

.dashboard-preview-wrapper:hover .affiliate-dashboard-card {
    transform: rotateY(0) rotateX(0);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: white;
}

.dash-coupon-box {
    background: rgba(124, 92, 255, 0.15);
    border: 1px dashed rgba(124, 92, 255, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.dash-coupon-box:hover {
    background: rgba(124, 92, 255, 0.25);
    border-color: #7c5cff;
    transform: scale(1.02);
}

.dash-code {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #cfd4ff;
}

.dash-stat-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.dash-mini-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
}

.dash-mini-label {
    font-size: 0.75rem;
    color: #9aa0b4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.dash-mini-value {
    font-size: 1.75rem;
    color: white;
    font-weight: 700;
    line-height: 1;
}

.dash-trend {
    font-size: 0.8rem;
    color: #30d5c8;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-weight: 500;
}

/* Teal for trend */

.dash-main-card {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.15) 0%, rgba(90, 62, 255, 0.15) 100%);
    border: 1px solid rgba(124, 92, 255, 0.3);
    padding: 24px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

/* Floating Elements */
.floating-card {
    position: absolute;
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20;
    animation: float-y 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.floating-card-icon {
    width: 48px;
    height: 48px;
    background: #f5f3ff;
    color: #7c5cff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.floating-card.coupon-used {
    top: 20%;
    left: -40px;
    animation-delay: 2s;
}

.pos-bottom-right {
    bottom: 40px;
    right: -30px;
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Stats Bar (Floating overlap) */
.stats-overlap-bar {
    position: relative;
    margin-top: -80px;
    z-index: 20;
    padding-bottom: 60px;
}

.stats-container {
    background: white;
    border-radius: 30px;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.1);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.stats-container::after {
    display: none;
    /* Removed the bottom line */
}

.stat-item {
    text-align: center;
    position: relative;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fdfdfe;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(124, 92, 255, 0.1);
    border-color: #e0e7ff;
    background: white;
}

.stat-icon {
    font-size: 1.75rem;
    color: #7c5cff;
    margin-bottom: 20px;
    background: white;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(124, 92, 255, 0.15);
    border: 1px solid #f1f5f9;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(6deg);
    background: #7c5cff;
    color: white;
    box-shadow: 0 15px 30px -5px rgba(124, 92, 255, 0.3);
}

.stat-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a !important;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.stat-label {
    color: #0f172a !important;
    /* Slate 900 - Darkest slate for max contrast */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: none !important;
}

/* Features / Benefits Grid */
.features-section {
    padding: 80px 0 120px;
    background: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: Single column */
    gap: 30px;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Tablet: 2x2 grid */
    }
}

@media (min-width: 1200px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        /* Desktop: 4x1 grid */
        gap: 40px;
    }
}

.feature-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(124, 92, 255, 0.1);
    border-color: #cfd4ff;
}

.feature-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.icon-primary {
    background: #f5f3ff;
    color: #7c5cff;
}

/* Purple */
.icon-success {
    background: #e0f2fe;
    color: #0ea5e9;
}

/* Blue/Sky (keeping distinct) or map to Teal? Let's use standard blue for now as accent */
.icon-purple {
    background: #fdf4ff;
    color: #c026d3;
}

/* Fuchsia? Or map to Teal? */
.icon-orange {
    background: #fff7ed;
    color: #f97316;
}

.feature-card:hover .feature-icon-box {
    transform: scale(1.1) rotate(6deg);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.feature-desc {
    color: #64748b;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* How It Works (Timeline) */
.steps-section {
    padding: 120px 0;
    background: #f8f9ff;
}

.timeline-wrapper {
    position: relative;
    padding: 40px 0;
    margin-top: 60px;
}

.timeline-line {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(to right, #e2e8f0 0, #e2e8f0 10px, transparent 10px, transparent 20px);
    z-index: 0;
}

.timeline-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
    z-index: 1;
}

.timeline-step-card {
    background: #f8f9ff;
    padding: 20px;
    text-align: center;
}

.step-badge {
    width: 120px;
    height: 120px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2.5rem;
    color: #9aa0b4;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
}

.step-badge i {
    z-index: 2;
}

.timeline-step-card:hover .step-badge {
    border-color: #7c5cff;
    color: #7c5cff;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(124, 92, 255, 0.15);
}

.step-number-float {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #7c5cff;
    color: white;
    border-radius: 50%;
    border: 4px solid #f8f9ff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.step-desc {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.6;
}

/* CTA Section */
.cta-big {
    padding: 120px 0;
    background: #1a1a3a;
    /* Darker blue/black */
    position: relative;
    border-radius: 40px;
    margin: 0 20px 60px;
    overflow: hidden;
    text-align: center;
}

.cta-content {
    position: relative;
    z-index: 5;
    color: white;
}

.cta-decor {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    /* Purple glow */
    background: radial-gradient(circle, rgba(124, 92, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.decor-1 {
    top: -200px;
    left: -100px;
}

.decor-2 {
    bottom: -200px;
    right: -100px;
}

@media (max-width: 991px) {
    .affiliate-title {
        font-size: 3rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4rem;
    }

    .affiliate-desc {
        margin: 0 auto 2.5rem;
    }

    .dashboard-preview-wrapper {
        max-width: 450px;
        margin: 0 auto;
    }

    .affiliate-dashboard-card {
        transform: none !important;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stat-item::after {
        display: none;
    }

    .timeline-steps {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .timeline-line {
        display: none;
    }

    .cta-big {
        margin: 0 0 60px;
        border-radius: 0;
    }

    .floating-card.coupon-used {
        left: 0;
    }
}

/* Mobile Responsive Adjustments (< 768px) */
@media (max-width: 768px) {
    .affiliate-hero-section {
        padding: 120px 0 100px;
        text-align: center;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .affiliate-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .affiliate-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .hero-badge-wrapper {
        justify-content: center;
        display: flex;
        width: 100%;
    }

    .affiliate-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .stats-overlap-bar {
        margin-top: -60px;
        position: relative;
        z-index: 30;
    }

    .stats-container {
        padding: 15px;
        border-radius: 20px;
        gap: 15px;
    }

    .stat-item {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 15px;
    }

    .dashboard-preview-wrapper {
        margin-top: 2rem;
        transform: none;
        /* Remove perspective on mobile */
    }

    .affiliate-dashboard-card {
        padding: 20px;
        min-height: auto;
        transform: none;
    }

    .floating-card {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 15px;
        animation: none;
        width: 100%;
        justify-content: center;
    }

    /* Hide decorative elements that might cause overflow or clutter */
    .hero-glow-effect {
        width: 100%;
        height: 100%;
        opacity: 0.5;
    }
}