/* Enhanced Modal Styles for New Database Structure */

.modal-details {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.modal-detail {
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.modal-detail strong {
    font-weight: 600;
    color: #333;
}

/* Enhanced Media Gallery */
.media-section {
    margin: 30px 0;
}

.media-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.media-item {
    display: flex;
    flex-direction: column;
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.media-item img:hover {
    transform: scale(1.02);
}

.media-caption {
    margin: 8px 0 0 0;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

.video-item video {
    max-height: 300px;
    object-fit: cover;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.document-item:hover {
    background: #e9ecef;
}

.document-link {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.document-link:hover {
    color: #000;
}

/* Professional Context Sections */
.modal-exhibitions,
.modal-collaborators,
.modal-workshops {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.modal-exhibitions h3,
.modal-collaborators h3,
.modal-workshops h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exhibitions-list,
.collaborators-list,
.workshops-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exhibition-item,
.collaborator-item,
.workshop-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #000;
}

.exhibition-main {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.exhibition-type {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.collaborator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.collaborator-item a {
    color: #666;
    text-decoration: none;
    margin-left: 8px;
}

.collaborator-item a:hover {
    color: #000;
}

.workshop-item {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Enhanced Modal Layout */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.modal-body {
    margin-bottom: 20px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-exhibitions,
    .modal-collaborators,
    .modal-workshops {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .exhibition-item,
    .collaborator-item,
    .workshop-item {
        padding: 10px;
    }
    
    .collaborator-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Loading States */
.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.modal-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Video Embedding */
.video-wrapper {
    position: relative;
    width: 100%;
    margin: 0 0 20px 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive iframe container with 16:9 aspect ratio */
.video-wrapper.iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* For direct video files */
.video-wrapper video {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

@media screen and (max-width: 768px) {
    .video-wrapper video {
        max-height: 250px;
    }
}

/* Enhanced Tags in Modal */
.modal-tags .tag {
    margin: 2px 4px 2px 0;
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.modal-tags .tag:hover {
    background: #dee2e6;
    color: #000;
} 