﻿/* ========== Modern Benefits Section ========== */
.modern-benefits {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
}

.modern-benefits::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.modern-benefits::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.modern-benefits__header {
    max-width: 800px;
    margin: 0 auto 3.5rem;
    position: relative;
    z-index: 1;
}

.modern-benefits__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--codeiks-dark-blue, #1e3a8a);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out;
}

.modern-benefits__intro {
    color: #64748b;
    font-size: 1.125rem;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.modern-benefits__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    position: relative;
    z-index: 1;
}

.modern-benefit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(2, 6, 23, 0.04);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.6s ease-out both;
}

.modern-benefit-card:nth-child(1) { animation-delay: 0.1s; }
.modern-benefit-card:nth-child(2) { animation-delay: 0.2s; }
.modern-benefit-card:nth-child(3) { animation-delay: 0.3s; }
.modern-benefit-card:nth-child(4) { animation-delay: 0.4s; }
.modern-benefit-card:nth-child(5) { animation-delay: 0.5s; }
.modern-benefit-card:nth-child(6) { animation-delay: 0.6s; }
.modern-benefit-card:nth-child(7) { animation-delay: 0.7s; }
.modern-benefit-card:nth-child(8) { animation-delay: 0.8s; }
.modern-benefit-card:nth-child(9) { animation-delay: 0.9s; }

.modern-benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.15);
    border-color: var(--codeiks-teal-light, #06b6d4);
}

.modern-benefit-card:hover::before {
    transform: scaleX(1);
}

.modern-benefit-card__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--codeiks-dark-blue, #1e3a8a) 0%, var(--codeiks-teal, #14b8a6) 100%);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-benefit-card__icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-benefit-card:hover .modern-benefit-card__icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(30, 58, 138, 0.35);
}

.modern-benefit-card:hover .modern-benefit-card__icon::before {
    width: 100px;
    height: 100px;
}

.modern-benefit-card__icon i {
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-benefit-card:hover .modern-benefit-card__icon i {
    transform: scale(1.15);
}

.modern-benefit-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--codeiks-dark-blue, #1e3a8a);
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.modern-benefit-card:hover .modern-benefit-card__title {
    color: var(--codeiks-teal, #14b8a6);
}

.modern-benefit-card__desc {
    font-size: 0.975rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL Support */
.rtl .modern-benefits__grid {
    direction: rtl;
}

.rtl .modern-benefit-card::before {
    transform-origin: right;
}

/* Responsive Design */
@media (max-width: 992px) {
    .modern-benefits__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .modern-benefits__title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .modern-benefits {
        padding: 3.5rem 0;
    }
    
    .modern-benefits__header {
        margin-bottom: 2.5rem;
    }
    
    .modern-benefits__title {
        font-size: 1.75rem;
    }
    
    .modern-benefits__intro {
        font-size: 1rem;
    }
    
    .modern-benefits__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .modern-benefit-card {
        padding: 1.5rem 1.25rem;
    }
    
    .modern-benefit-card__icon {
        width: 56px;
        height: 56px;
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .modern-benefits {
        padding: 3rem 0;
    }
    
    .modern-benefits__title {
        font-size: 1.5rem;
    }
    
    .modern-benefit-card {
        padding: 1.25rem 1rem;
    }
}
