/* Services Carousel Widget Styles - Redesigned with Glass Effect */

.services-carousel-container {
    position: relative;
    width: 100%;
    overflow: visible; /* Allow cards to move up on hover */
    padding: 30px 0; /* Extra padding to prevent cut-off */
}

.carousel-navigation {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.carousel-arrow {
    background: transparent;
    border: 2px solid #007cba;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #007cba;
    font-size: 18px;
    position: relative;
    outline: none;
}

.carousel-arrow:hover {
    background-color: #007cba;
    border-color: #007cba;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.carousel-arrow:active {
    transform: translateY(0);
}

.carousel-arrow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.3);
}

.carousel-arrow i {
    pointer-events: none;
    transition: color 0.3s ease;
}

.services-carousel-wrapper {
    overflow: hidden;
    margin-top: 70px;
    padding-top: 10px; /* Extra space for hover effect */
}

.services-carousel {
    display: flex;
    gap: 25px;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.services-carousel.animating {
    animation: slideCarousel 0.5s ease-in-out;
}

@keyframes slideCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--slide-distance, -345px));
    }
}

/* Glass Effect Card Design */
.service-card {
    flex: 0 0 400px; /* Wider to accommodate side-by-side layout */
    border-radius: 12px;
    border: 2px solid #11363E;
    background: rgba(9, 76, 74, 0.28);
    backdrop-filter: blur(4.5px);
    -webkit-backdrop-filter: blur(4.5px); /* Safari support */
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex; /* Side-by-side layout */
    flex-direction: row;
    align-items: flex-start; /* Default alignment, will be overridden by Elementor control */
    min-height: 300px; /* Default, will be overridden by Elementor control */
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Left side - Category Image */
.category-header {
    flex: 0 0 180px; /* Default width, will be overridden by Elementor control */
    position: relative;
    background-size: cover; /* Default, will be overridden by Elementor control */
    background-position: center center; /* Default, will be overridden by Elementor control */
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100%; /* Dynamic height - matches card height */
    align-self: stretch; /* Stretch to full card height */
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* Right side - Content area */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 25px;
    color: white;
}

.category-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.category-icon {
    margin-bottom: 10px;
    font-size: 24px;
    color: #ffffff;
    opacity: 0.9;
}

.category-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.service-item {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
}

.service-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.service-link:hover {
    text-decoration: none;
    color: inherit;
}

.service-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.service-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    width: 16px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.service-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.service-icon i {
    font-size: 16px;
}

.service-text {
    flex: 1;
}

.service-item:hover .service-content {
    transform: translateX(5px);
}

.service-item:hover .service-icon {
    color: #4FC3F7;
    opacity: 1;
}

.service-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.service-item:hover .service-name {
    color: #4FC3F7;
}

.service-description {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    transition: all 0.3s ease;
}

.service-item:hover .service-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .service-card {
        flex: 0 0 350px;
    }
    
    .category-header {
        flex: 0 0 140px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .category-title {
        font-size: 20px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .services-carousel-container {
        padding: 20px 0;
        overflow: hidden; /* Reset for mobile */
    }

    .carousel-navigation {
        top: -5px;
        right: 10px;
        gap: 10px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .services-carousel-wrapper {
        margin-top: 50px;
        padding-top: 5px;
    }

    .service-card {
        flex: 0 0 300px;
        flex-direction: column; /* Stack vertically on mobile */
        min-height: auto;
        align-items: stretch; /* Reset alignment for mobile */
    }

    .service-card:hover {
        transform: translateY(-4px); /* Reduced hover effect for mobile */
    }

    .category-header {
        flex: 0 0 120px; /* Fixed height for mobile */
        width: 100%;
        height: 120px; /* Fixed height for mobile stack */
        align-self: auto; /* Reset alignment */
    }

    .card-content {
        padding: 15px;
        flex: 1;
    }

    .category-title {
        font-size: 18px;
        margin-bottom: 15px;
        text-align: left;
    }

    .service-name {
        font-size: 14px;
    }

    .service-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .service-card {
        flex: 0 0 280px;
    }

    .category-header {
        flex: 0 0 100px;
    }

    .card-content {
        padding: 15px;
    }

    .category-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .services-list {
        gap: 10px;
    }

    .service-content {
        gap: 8px;
    }

    .service-icon {
        font-size: 14px;
        width: 14px;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .carousel-navigation {
        gap: 8px;
    }
}

/* Auto-scroll animations */
.services-carousel.auto-scrolling {
    animation: autoScroll linear infinite;
    animation-duration: var(--autoplay-speed, 3000ms);
}

.services-carousel-container:hover .services-carousel.auto-scrolling {
    animation-play-state: paused;
}

/* Scrollbar styles */
.services-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.services-carousel-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.services-carousel-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.services-carousel-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Loading state */
.services-carousel-container.loading .service-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Enhanced hover effects for glass cards */
.service-card:hover {
    border-color: #4FC3F7;
    background: rgba(9, 76, 74, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.service-card:hover .category-header::before {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Print styles */
@media print {
    .carousel-navigation {
        display: none;
    }

    .services-carousel {
        flex-wrap: wrap;
    }

    .service-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .category-header {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    .category-header::before {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card {
        border: 3px solid #000;
        background: rgba(255, 255, 255, 0.9);
    }

    .carousel-arrow {
        border: 3px solid #000;
    }

    .category-header::before {
        background-color: rgba(0, 0, 0, 0.7);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .services-carousel,
    .service-card,
    .carousel-arrow,
    .service-content,
    .service-icon,
    .service-name,
    .service-description {
        transition: none;
    }

    .services-carousel.auto-scrolling {
        animation: none;
    }

    @keyframes slideCarousel {
        to {
            transform: translateX(var(--slide-distance, -345px));
        }
    }
} 