/* ============================================
   Affiliate Benefits Section - Zencia.AI (FIXED VERSION)
   ============================================ */

/* ===== AFFILIATE BENEFITS SECTION ===== */
.affiliate-benefits {
    background: linear-gradient(135deg, #0f1419 0%, #082928 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Separate background image with opacity */
.affiliate-benefits::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://cdn.jsdelivr.net/gh/tech-zencia/website-images@main/language-background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.6; /* Only affects the background image */
    z-index: 1;
    pointer-events: none;
}

/* Gradient overlays */
.affiliate-benefits::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 217, 213, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 139, 139, 0.05) 0%, transparent 50%),
                rgba(15, 20, 25, 0.3);
    z-index: 2;
    pointer-events: none;
}

.affiliate-benefits .container {
    position: relative;
    z-index: 3; /* Above the background layers */
    max-width: 1200px; /* Set a reasonable max-width */
    width: 100%;
    margin: 0 auto; /* Center the content */
    padding: 0 2rem; /* Add padding for smaller screens */
}

/* ===== SECTION HEADER ===== */
.benefits-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
    padding: 0 2rem; /* Reduced padding since we have container padding */
}

.benefits-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.benefits-subtitle {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* ===== BENEFITS GRID ===== */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
    width: 100%;
    padding: 0; /* Removed padding since container now handles it */
}

/* ===== INDIVIDUAL BENEFIT ITEM ===== */
.benefit-item {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(0, 217, 213, 0.2);
    backdrop-filter: blur(10px);
}

/* Staggered animation delays */
.benefit-item:nth-child(1) { animation-delay: 0.1s; }
.benefit-item:nth-child(2) { animation-delay: 0.2s; }
.benefit-item:nth-child(3) { animation-delay: 0.3s; }

/* Hover effects */
.benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 217, 213, 0.4);
    border-color: rgba(0, 217, 213, 0.6);
    background: rgba(0, 217, 213, 0.1);
}

/* Background glow effect on hover */
.benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.05) 0%, rgba(0, 139, 139, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.benefit-item:hover::before {
    opacity: 1;
}

.benefit-item > * {
    position: relative;
    z-index: 2;
}

/* ===== BENEFIT NUMBER (FIXED) ===== */
.benefit-number {
    font-size: clamp(3rem, 3vw, 4.5rem);
    font-weight: 900;
    /* Primary gradient approach */
    background: linear-gradient(135deg, #00D9D5 0%, #40E0D0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
    text-shadow: 0 4px 20px rgba(0, 217, 213, 0.5);
    position: relative;
    z-index: 10; /* Higher z-index to ensure visibility */
    display: block;
    width: 100%;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
    .benefit-number {
        color: #00D9D5 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}

/* Alternative gradient for variety */
.benefit-item:nth-child(2) .benefit-number {
    background: linear-gradient(135deg, #40E0D0 0%, #00CED1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(64, 224, 208, 0.5);
}

/* Fallback for second item */
@supports not (-webkit-background-clip: text) {
    .benefit-item:nth-child(2) .benefit-number {
        color: #40E0D0 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}

.benefit-item:nth-child(3) .benefit-number {
    background: linear-gradient(135deg, #00CED1 0%, #008B8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0, 206, 209, 0.5);
}

/* Fallback for third item */
@supports not (-webkit-background-clip: text) {
    .benefit-item:nth-child(3) .benefit-number {
        color: #00CED1 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}

/* Hover effect for numbers */
.benefit-item:hover .benefit-number {
    transform: scale(1.05);
}

/* ===== BENEFIT TITLE ===== */
.benefit-title1 {
    font-size: clamp(1.1rem, 1vw, 1.3rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
    position: relative;
    z-index: 10; /* Ensure text is visible */
}

.benefit-item:hover .benefit-title1 {
    color: #FFFFFF;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for numbers */
@keyframes numberPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.benefit-number {
    animation: numberPulse 3s ease-in-out infinite;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .affiliate-benefits .container {
        max-width: 1000px;
    }
}

@media (max-width: 1024px) {
    .affiliate-benefits .container {
        padding: 0 1.5rem;
    }
    
    .benefits-grid {
        gap: 2rem;
    }
    
    .benefit-item {
        padding: 2rem 1rem;
    }
    
    .benefits-header {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .affiliate-benefits {
        padding: 80px 0;
    }
    
    .affiliate-benefits .container {
        padding: 0 1rem;
    }
    
    .benefits-header {
        margin-bottom: 60px;
        padding: 0;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
    }
    
    .benefit-item {
        padding: 2rem 1.5rem;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .affiliate-benefits .container {
        padding: 0 0.5rem;
    }
    
    .benefit-item {
        padding: 1.5rem 1rem;
    }
    
    .benefits-grid {
        gap: 1.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .benefit-item,
    .benefits-header,
    .benefit-number {
        animation: none !important;
    }
    
    .benefit-item:hover {
        transform: none;
    }
}

/* Focus states for accessibility */
.benefit-item:focus-within {
    outline: 2px solid #00D9D5;
    outline-offset: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .affiliate-benefits {
        background: white !important;
        padding: 2rem 0;
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .affiliate-benefits .container {
        max-width: none !important;
        margin-left: 0 !important;
    }
    
    .benefit-item {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .benefit-number {
        color: #0066ff !important;
        -webkit-text-fill-color: #0066ff !important;
        background: none !important;
    }
}