/* --- Modal Styles --- */
#team-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 51, 102, 0.85);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none;
}
#team-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
#team-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 1001;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    pointer-events: none;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
}
#team-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
#modal-bio {
    white-space: pre-line;
    max-height: 300px;
    overflow-y: auto;
}
#modal-bio::-webkit-scrollbar { width: 8px; }
#modal-bio::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
#modal-bio::-webkit-scrollbar-thumb { background: #003366; border-radius: 10px; }
#modal-bio::-webkit-scrollbar-thumb:hover { background: #002244; }
#modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}
#modal-close-btn:hover {
    color: #003366;
    transform: rotate(90deg);
}
/* --- Animated Border & Card Styles --- */
.card-container {
    position: relative;
    cursor: pointer;
}

.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-container:hover .team-card {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 51, 102, 0.2), 0 4px 6px -2px rgba(0, 51, 102, 0.15);
}

.animated-border-box, .animated-border-box-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem; /* Matches rounded-lg */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease-in-out;
    pointer-events: none; /* Make it unclickable */
}

/* Show on hover */
.card-container:hover .animated-border-box,
.card-container:hover .animated-border-box-glow {
    opacity: 1;
}

.animated-border-box-glow {
    filter: blur(15px);
}

.animated-border-box:before, .animated-border-box-glow:before {
    content: '';
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 300%; /* Make it large enough to cover the card */
    height: 300%;
    background-image: conic-gradient(transparent, #00BFFF, transparent 30%);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

/* --- Card Content & Circular Photo --- */
.team-photo {
    width: 8rem;  /* 128px */
    height: 8rem; /* 128px */
    border-radius: 9999px; /* Full circle */
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}