/**
 * Modern Features Section for CliveMart Landing Page
 * Revamped design with modern animations and styling
 */

/* Modern Service Featured Section - Carousel */
.modern-service-featured {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.modern-service-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

/* Carousel Container */
.features-carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.features-carousel {
    display: flex;
    animation: scroll-left 30s linear infinite;
    width: calc(200% + 40px);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Carousel Items */
.feature-carousel-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 240px;
    margin-right: 15px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.feature-carousel-item:hover {
    transform: translateY(-5px);
}

/* Remove old card styles */

/* Feature Icons */
.modern-feature-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-feature-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.modern-feature-card:hover .modern-feature-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.modern-feature-card:hover .modern-feature-icon::after {
    width: 100px;
    height: 100px;
}

/* Feature Content */
.modern-feature-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.feature-carousel-item:hover .modern-feature-title {
    color: #667eea;
}

.modern-feature-description {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.2;
    margin: 0;
}

/* Specific Feature Colors for Carousel Items */
.feature-carousel-item:nth-child(1) .modern-feature-icon,
.feature-carousel-item:nth-child(5) .modern-feature-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.feature-carousel-item:nth-child(2) .modern-feature-icon,
.feature-carousel-item:nth-child(6) .modern-feature-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.feature-carousel-item:nth-child(3) .modern-feature-icon,
.feature-carousel-item:nth-child(7) .modern-feature-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.feature-carousel-item:nth-child(4) .modern-feature-icon,
.feature-carousel-item:nth-child(8) .modern-feature-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }
.fade-in-up.delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Animation */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation:nth-child(2) { animation-delay: -2s; }
.float-animation:nth-child(3) { animation-delay: -4s; }
.float-animation:nth-child(4) { animation-delay: -6s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Pulse Effect for Icons */
.pulse-effect {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* Responsive Design for Carousel */
@media (max-width: 768px) {
    .modern-service-featured {
        padding: 15px 0;
    }
    
    .feature-carousel-item {
        min-width: 180px;
        padding: 12px 10px;
        margin-right: 12px;
    }
    
    .modern-feature-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .modern-feature-title {
        font-size: 0.8rem;
    }
    
    .modern-feature-description {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .feature-carousel-item {
        min-width: 160px;
        padding: 10px 8px;
    }
    
    .modern-feature-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .modern-feature-title {
        font-size: 0.75rem;
    }
    
    .modern-feature-description {
        font-size: 0.65rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modern-service-featured {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
    
    .feature-carousel-item {
        background: rgba(45, 55, 72, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .modern-feature-title {
        color: #e2e8f0;
    }
    
    .modern-feature-description {
        color: #a0aec0;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .features-carousel {
        animation: none;
    }
    
    .feature-carousel-item,
    .modern-feature-icon,
    .fade-in-up {
        animation: none;
        transition: none;
    }
    
    .feature-carousel-item:hover {
        transform: none;
    }
}
