/* Enhanced Service Card Styling with Sequential Animations */

.service-description {
    text-align: right;
    direction: rtl;
    overflow: hidden;
    position: relative;
    min-height: 180px; /* Reduced height */
}

.service-overview {
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 10px;
    border-right: 4px solid #007bff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.8s ease-out;
    transform: translateX(0);
}

.service-overview p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.service-features {
    margin: 15px 0;
    position: relative;
    height: 120px; /* Fixed height for consistent card size */
}

.feature-group {
    position: absolute; /* Position absolutely to overlap */
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 3px solid #007bff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    
    /* Sequential Animation - Only one visible at a time */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: sequentialShow 6s ease-in-out infinite;
    animation-fill-mode: both;
}

.feature-group:nth-child(1) { 
    animation-delay: 0s; 
}
.feature-group:nth-child(2) { 
    animation-delay: 2s; 
}
.feature-group:nth-child(3) { 
    animation-delay: 4s; 
}

.feature-group h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.feature-group h4:before {
    content: "";
    width: 6px;
    height: 24px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 3px;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

.feature-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-group li {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    position: relative;
    padding-right: 25px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.feature-group li:hover {
    transform: translateX(-5px);
    color: white;
    font-weight: 500;
}

.feature-group li:before {
    content: "";
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    position: absolute;
    right: 0;
    top: 10px;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
    animation: glow 2s ease-in-out infinite alternate;
}



/* Keyframe Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes sequentialShow {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    5% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    30% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    33.33% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    100% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.4);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 15px rgba(0, 123, 255, 0.8);
        transform: scale(1.1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.7;
        transform: scaleY(0.8);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-3px) scale(1.1);
    }
    60% {
        transform: translateY(-1px) scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-overview p {
        font-size: 13px;
    }
    
    .feature-group h4 {
        font-size: 12px;
    }
    
    .feature-group li {
        font-size: 11px;
    }
    

}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .service-overview {
        background: rgba(255, 255, 255, 0.05);
        border-right-color: var(--primary-color, #0d6efd);
    }
    
    .feature-group h4 {
        color: var(--text-primary-dark, #ffffff);
    }
    

}

/* Animation for better UX */
.feature-group {
    transition: all 0.2s ease;
}

.service-card:hover .feature-group {
    transform: translateX(-2px);
}

/* Enhanced typography */
.service-description {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Print styles */
@media print {
    .service-description {
        color: black !important;
        background: white !important;
    }
    
    .service-overview {
        background: #f8f9fa !important;
        border: 1px solid #dee2e6 !important;
    }
}