/* resourceHandler.css */

/* Modal base styles */
.resource-modal {
    display: flex;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.resource-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

.resource-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 5px;
    z-index: 1;
}

.resource-close:hover,
.resource-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Video modal styles */
.video-modal {
    width: 100%;
    max-width: 800px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* PDF modal styles */
.pdf-modal {
    width: 100%;
    height: 80vh;
    max-height: 600px;
}

.pdf-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.article-modal {
    width: 100%;
    height: 80vh;
    max-height: 600px;
    
}

.article-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 10px;
    }

    .video-modal,
    .pdf-modal {
        max-width: 100%;
    }
}