/* modal.css */

.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
}

.modal-content {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    margin: 5% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 90%; 
    max-width: 800px; 
    box-sizing: border-box;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    font-size: 3vw; 
    max-width: 90%; 
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center; 
}


.modal-content img, .modal-content video {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 10px;
}

.media-grid img, .media-grid video {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.case-image {
    background-color: rgba(0, 0, 0, 0.6);
    object-fit: cover;
}

/* Skaalautuvuuden varmistaminen */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
}
