/* Modern Service Carousel Styles */
.service-carousel-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    position: relative;
    overflow: hidden;
}

.service-carousel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%23ffffff" opacity="0.3" d="M0,0 L100,0 L100,100 Z"/></svg>');
    pointer-events: none;
}

.service-carousel-section .section-title {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 800;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.service-carousel-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
}

.service-carousel-section .section-subtitle {
    color: #5d6d7e;
    margin-bottom: 60px;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Modern Service Card Styles */
.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    margin: 15px;
    border: none;
    position: relative;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    z-index: 2;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(44, 62, 80, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.15);
}

.service-card:hover::after {
    opacity: 1;
}

.service-card-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
    filter: brightness(0.95);
}

.service-card:hover .service-card-img {
    transform: scale(1.05);
    filter: brightness(1);
}

.service-card .card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
    min-height: 300px;
}

.service-card .service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -50px auto 25px auto;
    position: relative;
    z-index: 3;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotateY(180deg) scale(1.1);
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
}

.service-card .service-icon i {
    font-size: 28px;
    color: white;
}

.service-card .card-title {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.4;
    position: relative;
}

.service-card .card-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #3498db;
    border-radius: 1px;
}

.service-card .card-text {
    color: #5d6d7e;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 25px;
    font-size: 1rem;
    text-align: center;
    padding: 0 10px;
}

.service-card .service-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: auto;
    padding: 12px 25px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(44, 62, 80, 0.05) 100%);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.service-card .service-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.service-card .service-link:hover {
    color: #2980b9;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(44, 62, 80, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.service-card .service-link:hover::before {
    left: 100%;
}

.service-card .service-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.service-card .service-link:hover i {
    transform: translateX(5px);
}

/* Modern Carousel Controls */
.service-carousel .carousel-control-prev,
.service-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.service-carousel:hover .carousel-control-prev,
.service-carousel:hover .carousel-control-next {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.service-carousel .carousel-control-prev:hover,
.service-carousel .carousel-control-next:hover {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    transform: translateY(-50%) scale(1.1);
}

.service-carousel .carousel-control-prev {
    left: -30px;
}

.service-carousel .carousel-control-next {
    right: -30px;
}

.service-carousel .carousel-control-prev-icon,
.service-carousel .carousel-control-next-icon {
    background-color: transparent;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    background-size: 60%;
    background-position: center;
    position: relative;
}

.service-carousel .carousel-control-prev-icon::before,
.service-carousel .carousel-control-next-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E") center/60% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E") center/60% no-repeat;
}

.service-carousel .carousel-control-next-icon::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") center/60% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") center/60% no-repeat;
}

.service-carousel .carousel-control-prev:hover .carousel-control-prev-icon::before,
.service-carousel .carousel-control-next:hover .carousel-control-next-icon::before {
    background: white;
}

/* Modern Carousel Indicators */
.service-carousel .carousel-indicators {
    bottom: -60px;
    margin: 0;
}

.service-carousel .carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: #e0e0e0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.service-carousel .carousel-indicators button:hover {
    background-color: #3498db;
    opacity: 1;
    transform: scale(1.2);
}

.service-carousel .carousel-indicators button.active {
    background-color: #3498db;
    border-color: #2c3e50;
    opacity: 1;
    transform: scale(1.2);
}

/* Progress Bar for Autoplay */
.service-carousel .carousel-progress {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.service-carousel .carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
    width: 0%;
    transition: width 5s linear;
}

/* Floating Animation for Cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.service-carousel .carousel-item.active .service-card {
    animation: float 6s ease-in-out infinite;
    animation-delay: calc(var(--card-index, 0) * 0.2s);
}

/* RTL Support */
.rtl .service-card .service-link i {
    margin-left: 0;
    margin-right: 8px;
}

.rtl .service-card .service-link:hover i {
    transform: translateX(-5px);
}

.rtl .service-carousel .carousel-control-prev {
    left: auto;
    right: -30px;
}

.rtl .service-carousel .carousel-control-next {
    right: auto;
    left: -30px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .service-carousel-section {
        padding: 80px 0;
    }
    
    .service-carousel-section .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .service-carousel-section {
        padding: 60px 0;
    }
    
    .service-card {
        margin: 10px;
    }
    
    .service-carousel .carousel-control-prev,
    .service-carousel .carousel-control-next {
        display: none;
    }
    
    .service-card-img {
        height: 180px;
    }
    
    .service-carousel-section .section-title {
        font-size: 1.8rem;
    }
    
    .service-carousel-section .section-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .service-carousel .carousel-inner {
        padding: 0 10px;
    }
    
    .service-card .card-body {
        padding: 20px;
    }
    
    .service-card .service-icon {
        width: 60px;
        height: 60px;
        margin: -40px auto 20px auto;
    }
    
    .service-card .service-icon i {
        font-size: 24px;
    }
    
    .service-card .card-title {
        font-size: 1.2rem;
    }
    
    .service-card .card-text {
        font-size: 0.9rem;
        padding: 0;
    }
}

/* Gradient Overlay for Images */
.service-card .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0));
    z-index: 1;
}

/* Badge for Featured Services */
.service-card .featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}