.section-work {
    padding-top: 25px;
    width: 100%;
    text-align: center;
    background-color: rgb(232, 239, 247);
}

.card {
    margin: 25px;
    width: 360px;
    height: 420px;
    display: flex;
    border-radius: 24px;
    background: #eef2f7;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 
        -8px -8px 16px rgba(255, 255, 255, 0.8),
        8px 8px 16px rgba(163, 177, 198, 0.4);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 
        -12px -12px 24px rgba(255, 255, 255, 0.9),
        12px 12px 24px rgba(163, 177, 198, 0.6);
}

.card-image {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(1.1) contrast(1.1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: absolute;
    top: 0;
    left: 0;
}

.main-image {
    opacity: 1;
    z-index: 2;
}

.before-image {
    opacity: 0;
    z-index: 1;
}

.card:hover .main-image {
    filter: saturate(1.3) brightness(1.2) contrast(1.2);
    transform: scale(1.05);
}

.card:hover .before-image[style*="display: block"] {
    filter: saturate(1.3) brightness(1.2) contrast(1.2);
    transform: scale(1.05);
}

.image-controls {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 3;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.control-btn {
    background: rgba(255, 255, 255, 0.4);
    color: #2c3e50;
    border: none;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.control-btn.active {
    background: linear-gradient(135deg, #007bff, #00bfff);
    color: white;
    box-shadow: 
        0 4px 12px rgba(0, 123, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.control-btn.active:hover {
    background: linear-gradient(135deg, #0069d9, #0099cc);
    box-shadow: 
        0 6px 18px rgba(0, 123, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.control-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.9);
}

.image-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 25px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover .image-text-overlay {
    opacity: 1;
}

.image-text-overlay p {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-align: center;
    padding: 18px 28px;
    
    color: rgba(60, 60, 60, 0.9); 
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    
    text-shadow: 
        0 1px 1px rgba(255, 255, 255, 0.8),
        0 2px 2px rgba(255, 255, 255, 0.7),
        0 3px 3px rgba(255, 255, 255, 0.5),
        0 0 1px rgba(255, 255, 255, 0.9),
        0 0 2px rgba(255, 255, 255, 0.6);
    
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateY(10px);
    will-change: transform, opacity, text-shadow;
}

.card:hover .image-text-overlay p {
    transform: translateY(0);
    
    color: rgba(40, 40, 40, 0.95); 
    
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.9),
        0 2px 3px rgba(255, 255, 255, 0.8),
        0 3px 4px rgba(255, 255, 255, 0.6),
        0 4px 5px rgba(255, 255, 255, 0.4),
        0 0 2px rgba(255, 255, 255, 0.95),
        0 0 3px rgba(255, 255, 255, 0.7);
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,   
        rgba(255, 255, 255, 0.05) 20%,  
        rgba(0, 0, 0, 0.05) 50%,        
        rgba(0, 0, 0, 0.1) 80%,         
        rgba(0, 0, 0, 0.15) 100%      
    );
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover .card-image::before {
    opacity: 0.25; 
}

.slider-container {
    min-height: 50%;
    position: relative;
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: 100%;
    padding: 20px 0 40px;
}

.swiper-wrapper {
    align-items: center;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.swiper-slide-active {
    transform: scale(1.05);
}

.swiper-button-next,
.swiper-button-prev {
    color: #007bff;
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.swiper-pagination-bullet {
    background: #007bff;
    opacity: 0.5;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

.swiper-button-next,
.swiper-button-prev {
    position: relative;
    z-index: 100 !important;
}

.control-btn {
    position: relative;
    z-index: 50;
}

.swiper-slide {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.swiper-button-next:not(.swiper-button-disabled):hover,
.swiper-button-prev:not(.swiper-button-disabled):hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.card-image {
    position: relative;
}

.card-image .main-image,
.card-image .before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease;
}

.section-work h1 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif !important;
    font-size: 2.4rem;
    font-weight: 800;
    color: rgba(60, 60, 60, 0.9);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
    text-shadow: 
        0 1px 1px rgba(255, 255, 255, 0.8),
        0 2px 2px rgba(255, 255, 255, 0.7);
}

.section-work h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #00bfff);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

@media (max-width: 1024px) {
    .card {
        width: 300px;
        height: 360px;
    }
    
    .image-text-overlay p {
        font-size: 1.8rem;
        padding: 16px 24px;
    }
    
    .control-btn {
        padding: 7px 18px;
        font-size: 0.85rem;
        min-width: 75px;
    }
}

@media (max-width: 768px) {
    .card {
        width: 280px;
        height: 340px;
        margin: 15px;
    }
    
    .image-text-overlay p {
        font-size: 1.6rem;
        padding: 14px 20px;
    }
    
    .control-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .image-controls {
        bottom: 12px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .card {
        width: 260px;
        height: 320px;
        margin: 10px;
    }
    
    .image-text-overlay p {
        font-size: 1.4rem;
        padding: 12px 18px;
    }
    
    .control-btn {
        padding: 5px 14px;
        font-size: 0.75rem;
        min-width: 65px;
    }
    
    .image-controls {
        bottom: 10px;
        gap: 10px;
    }
}