/* Base Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: auto;
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.9); /* 90% opaque white */
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-sizing: border-box;
    border-radius: 8px;
}

/* For video modals - different styling */
.modal.video-modal .modal-content {
    background: #000;
    padding: 0;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    width: auto;
    height: auto;
}

.close-button:hover {
    color: #000;
}

.modal.video-modal .close-button {
    color: #fff;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
}

.modal.video-modal .close-button:hover {
    background: rgba(0,0,0,0.8);
    color: #fff;
}

/* Content iframe styling */
.content-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 4px;
}

/* Video container styling */
.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%;
    border: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .content-iframe {
        height: 85vh;
    }
    
    .close-button {
        font-size: 24px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 10px;
    }
    
    .content-iframe {
        height: 90vh;
    }
    
    .close-button {
        top: 5px;
        right: 10px;
        font-size: 22px;
    }
    
    .modal.video-modal .close-button {
        width: 35px;
        height: 35px;
        line-height: 35px;
    }
}