/* Department & Course Popup Styles */
#deptModal,
#courseModal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.popup-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0
    }

    to {
        top: 0;
        opacity: 1
    }
}

.close-btn {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    z-index: 20;
}

.close-btn:hover,
.close-btn:focus {
    background: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Image Container */
.modal-image-container {
    width: 100%;
    position: relative;
    flex-shrink: 0;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Content Container */
.modal-text-content {
    padding: 30px;
}

#deptTitle,
#courseTitle {
    color: #fd7e14;
    margin-bottom: 5px;
    margin-top: 0;
    font-size: 2rem;
}

#deptCourse,
#courseText {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    display: block;
}

/* Specific styling for rich content if needed */
#deptText h3,
#courseText h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: #333;
    border-left: 4px solid #fd7e14;
    padding-left: 10px;
}

#deptText ul,
#courseText ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

#deptText li,
#courseText li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.highlight {
    background: #fff8e1;
    padding: 15px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
    border-radius: 4px;
}