/* Stylish Services Carousel */
#myCarousel {
    background: #0E3386;
    border-radius: 10px;
    padding: 10px 8px;
    position: relative;
    overflow: hidden;
}

#myCarousel::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="80" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.service-card {
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 10%;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.service-card .card-img-top {
    height: 120px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .card-img-top {
    transform: scale(1.05);
}

.service-card .card-body {
    padding: 1rem;
    position: relative;
}

.service-card .card-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.service-link {
    background: #0E3386;
    color: white;
    padding: 5px 10px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.service-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Stylish Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: #0E3386;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: -26px;
}

.carousel-control-next {
    right: -26px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: #0E3386;
    border-color: #0E3386;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 20px;
    width: 20px;
    height: 20px;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

/* Carousel Animation */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-item.active {
    animation: slideIn 0.6s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Card spacing */
.carousel-item .col-lg-3 {
    padding-left: 5px;
    padding-right: 5px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .carousel-item .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .carousel-control-prev {
        left: -20px;
    }
    
    .carousel-control-next {
        right: -20px;
    }
}

@media (max-width: 575.98px) {
    .carousel-item .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    #myCarousel {
        padding: 20px 10px;
        border-radius: 15px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control-prev {
        left: -15px;
    }
    
    .carousel-control-next {
        right: -15px;
    }
}