/* Bio Image Panel - Displays image in the middle but behind the model */
.bio-image-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: auto;
    max-height: 85vh;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(58,65,73, 0.7);
    border-radius: 10px;
    z-index: 5; /* Lower z-index so it appears behind the model */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

.bio-image-panel.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.bio-image-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.bio-image-panel-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(58,65,73, 0.5);
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bio-image-panel-description-wrapper {
    display: flex;
    flex-direction: column;
}

.bio-image-panel-description {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    background-color: rgba(58,65,73, 0.1);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid rgba(58,65,73, 0.6);
    max-height: 300px;
    overflow-y: auto;
}

.bio-image-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(58,65,73, 0.5);
    color: rgba(58,65,73, 0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.2s ease;
}

.bio-image-panel-close:hover {
    background: rgba(58,65,73, 0.6);
    transform: scale(1.1);
}

/* Animation */
@keyframes fadeInBehind {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .bio-image-panel {
        width: 250px;
    }
    
    .bio-image-panel-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .bio-image-panel {
        width: 200px;
    }
}