/* ... existing styles ... */

/* Preview Overlay on Image */
.project-visual {
    position: relative;
    cursor: pointer;
}

.preview-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-visual:hover .preview-overlay {
    opacity: 1;
}

.preview-overlay svg {
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-visual:hover .preview-overlay svg {
    transform: scale(1);
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: 5% auto; 
    width: 90%;
    height: 85%;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

#preview-frame {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: white; /* Default bg for iframe */
}

/* Mobile Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 80%;
        margin: 10% auto;
    }
}
