.image-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 100%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.image-popup.show {
    opacity: 1;
}

.popup-content {
    position: relative;
    margin: auto;
    padding: 20px 0;
    width: 800px;
    max-width: 90%;
    top: 50%;
    transform: translateY(calc(-50% + 40px)) scale(0.9);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

.popup-content.show {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.popup-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.popup-content:hover img {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.close-popup {
    position: absolute;
    right: 20px;
    top: 30px;
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #d11a1a;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10001;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transform: scale(1) rotate(0deg);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.popup-content.show .close-popup {
    transform: scale(1) rotate(0deg);
}

.close-popup:hover {
    background: #fff;
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #d11a1a;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

/* Email Button Styles */
.popup-email-button {
    position: relative;
    margin-top: 20px;
    text-align: center;
    z-index: 10002;
}

.email-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(145deg, #d11a1a, #b31414);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 16px rgba(209, 26, 26, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transform: translateY(20px);
    opacity: 0;
}

.popup-content.show .email-btn {
    transform: translateY(0);
    opacity: 1;
}

.email-btn:hover {
    background: linear-gradient(145deg, #fff, #f0f0f0);
    color: #d11a1a;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 30px rgba(209, 26, 26, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(209, 26, 26, 0.3);
}

.email-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.email-btn:hover i {
    transform: scale(1.2);
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .popup-content {
        width: 95%;
        transform: translateY(calc(-50% + 20px)) scale(0.95);
    }
    
    .popup-content img {
        border-radius: 15px;
    }
    
    .close-popup {
        width: 45px;
        height: 45px;
        line-height: 45px;
        font-size: 28px;
        right: 15px;
        top: 25px;
    }
    
    .email-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .popup-email-button {
        margin-top: 15px;
    }
}