#image-carousel {
    position: relative;
    width: 100%;
    padding: 50px 0;
    overflow: hidden;
    background: white;
    contain: layout style paint;
}

#image-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(25, 25, 112, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(25, 25, 112, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 1;
}

.carousel-header {
    text-align: center;
    margin-bottom: 40px;
}

.carousel-badge {
    display: inline-block;
    color: #191970;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    background: transparent;
    padding: 0;
}

.carousel-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
}

.carousel-subtitle {
    font-size: 15px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    contain: layout style paint;
}

.carousel-wrapper:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 24px;
    will-change: transform;
    padding-left: 20px;
    padding-right: 20px;
    transform: translateX(0);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

.carousel-card {
    flex: 0 0 320px;
    height: 420px;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    user-select: none;
    -webkit-user-select: none;
    padding: 4px;
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.03) 0%, rgba(25, 25, 112, 0.06) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 12px;
    overflow: hidden;
    contain: layout style paint;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.carousel-card.active {
    z-index: 10;
    background: linear-gradient(135deg, rgba(25, 25, 112, 0.08) 0%, rgba(25, 25, 112, 0.12) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    padding: 5px;
    transform: scale(1.05) translateZ(0);
    filter: brightness(1.05);
}

.carousel-card:not(.active) {
    filter: brightness(0.95) contrast(0.95);
}

.carousel-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    user-select: none;
    position: relative;
    border-radius: 8px;
    will-change: transform, filter;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.carousel-card.active .carousel-card-image {
    filter: brightness(1.08) saturate(1.15) contrast(1.05);
    transform: scale(1.02) translateZ(0);
}

.carousel-card:hover .carousel-card-image {
    transform: scale(1.03) translateZ(0);
}

.carousel-card-overlay {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 4px;
    padding: 28px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    transform: translateY(10px);
    border-radius: 0 0 8px 8px;
    will-change: opacity, transform;
}

.carousel-card.active .carousel-card-overlay,
.carousel-card:hover .carousel-card-overlay {
    opacity: 1;
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
}

.carousel-card-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.carousel-card-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(25, 25, 112, 0.15);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    will-change: transform, background, border-color;
    position: relative;
    overflow: hidden;
}

.carousel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(25, 25, 112, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.carousel-btn:hover {
    border-color: #191970;
    background: rgba(25, 25, 112, 0.08);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(25, 25, 112, 0.2);
}

.carousel-btn:hover::before {
    width: 100%;
    height: 100%;
}

.carousel-btn:active {
    transform: scale(1.05);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    stroke: #374151;
    position: relative;
    z-index: 1;
    transition: stroke 0.3s ease;
}

.carousel-btn:hover svg {
    stroke: #191970;
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    background: #d1d5db;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.carousel-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #191970;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 4px;
}

.carousel-indicator.active {
    width: 24px;
    background: #191970;
}

.carousel-indicator.active::before {
    transform: scaleX(1);
}

.carousel-indicator:hover {
    background: rgba(25, 25, 112, 0.5);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    #image-carousel {
        padding: 40px 0;
    }
    
    .carousel-header {
        margin-bottom: 30px;
    }
    
    .carousel-title {
        font-size: 24px;
    }
    
    .carousel-subtitle {
        font-size: 14px;
    }
    
    .carousel-card {
        flex: 0 0 280px !important;
        height: 380px;
        border-radius: 10px;
    }
    
    .carousel-wrapper {
        padding: 15px 0;
    }
    
    .carousel-controls {
        margin-top: 25px;
        gap: 12px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-track {
        padding-left: 16px;
        padding-right: 16px;
        gap: 20px;
    }
    
    .carousel-indicators {
        margin-top: 24px;
        gap: 6px;
    }
    
    .carousel-card-overlay {
        padding: 24px 20px;
    }
    
    .carousel-card-title {
        font-size: 16px;
    }
    
    .carousel-card-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .carousel-card {
        flex: 0 0 260px !important;
        height: 360px;
        border-radius: 8px;
    }
    
    .carousel-header {
        margin-bottom: 25px;
    }
    
    .carousel-title {
        font-size: 22px;
    }
    
    .carousel-subtitle {
        font-size: 13px;
    }
    
    .carousel-track {
        gap: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .carousel-container {
        padding: 0 16px;
    }
    
    .carousel-controls {
        margin-top: 20px;
        gap: 10px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
    }
    
    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .carousel-indicators {
        margin-top: 20px;
        gap: 5px;
    }
    
    .carousel-indicator {
        width: 6px;
        height: 6px;
    }
    
    .carousel-indicator.active {
        width: 20px;
    }
    
    .carousel-card-overlay {
        padding: 20px 16px;
    }
    
    .carousel-card-title {
        font-size: 15px;
    }
    
    .carousel-card-subtitle {
        font-size: 12px;
    }
}

