/* 💙 Bright Blue Image & Video Modal Styles */
.image-clickable {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.image-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(65, 105, 225, 0.3);
    cursor: pointer;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(135, 206, 235, 0.3) !important;
    box-shadow: 0 10px 40px rgba(65, 105, 225, 0.2) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.8) 0%, rgba(230, 243, 255, 0.8) 100%);
}

.modal-footer {
    border-top: 1px solid rgba(135, 206, 235, 0.3);
    background: linear-gradient(135deg, rgba(240, 248, 255, 0.8) 0%, rgba(230, 243, 255, 0.8) 100%);
}

.modal-title {
    color: #1E3A8A !important;
    font-weight: 600;
}

.btn-close-white {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(200deg);
}

#modalImage {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(65, 105, 225, 0.2);
}

/* Profile image specific styles */
.profile-img.image-clickable {
    border: 3px solid rgba(135, 206, 235, 0.4);
}

.profile-img.image-clickable:hover {
    border-color: rgba(65, 105, 225, 0.8);
}

/* Loading animation for images */
.image-clickable {
    position: relative;
}

.image-clickable::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(135, 206, 235, 0.3);
    border-top: 2px solid rgba(65, 105, 225, 1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-clickable.loading::before {
    opacity: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Modal Button Styles */
.modal .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal .btn-outline-light {
    color: #4169E1;
    border-color: #4169E1;
    background: transparent;
}

.modal .btn-outline-light:hover {
    background: #4169E1;
    border-color: #4169E1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.3);
}

.modal .btn-outline-warning {
    color: #FF69B4;
    border-color: #FF69B4;
    background: transparent;
}

.modal .btn-outline-warning:hover {
    background: #FF69B4;
    border-color: #FF69B4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.modal .btn-secondary {
    background: #87CEEB;
    border-color: #87CEEB;
    color: white;
}

.modal .btn-secondary:hover {
    background: #4169E1;
    border-color: #4169E1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.3);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    #modalImage {
        max-height: 60vh !important;
    }
}

/* Video Modal Styles */
#modalVideo {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(65, 105, 225, 0.2);
    background: #000;
}

#modalVideo:focus {
    outline: 2px solid rgba(65, 105, 225, 0.5);
    outline-offset: 2px;
}

/* Video controls styling */
#modalVideo::-webkit-media-controls-panel {
    background-color: rgba(30, 58, 138, 0.8);
}

#modalVideo::-webkit-media-controls-play-button,
#modalVideo::-webkit-media-controls-volume-slider,
#modalVideo::-webkit-media-controls-timeline {
    filter: brightness(1.2) hue-rotate(200deg);
}

/* Video modal specific styles */
.modal-xl .modal-body {
    padding: 0;
}

.modal-xl #modalVideo {
    width: 100%;
    height: auto;
    max-height: 80vh;
}

/* Video loading state */
#modalVideo[data-loading="true"] {
    background: rgba(30, 58, 138, 0.9);
    position: relative;
}

#modalVideo[data-loading="true"]::before {
    content: "Loading video...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 10;
}

/* Responsive video modal */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
    }
    
    #modalVideo {
        max-height: 60vh !important;
    }
}

/* Certificate Card Hover Effects */
.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(65, 105, 225, 0.25) !important;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(65, 105, 225, 0.2) !important;
}

/* Ensure all cards have consistent styling */
.card {
    transition: all 0.3s ease !important;
}