/* Team Modal Styles */
.team-modal {
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 99999 !important;
}

.team-modal-dialog {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(-50px);
    opacity: 0;
}

.team-modal.show .team-modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

.team-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    max-width: 100%;
}

.team-modal-header {
    background: linear-gradient(135deg, #2db094, #37c8a9);
    color: white;
    border: none;
    padding: 25px 30px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.team-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.team-modal-image-container {
    position: relative;
    z-index: 1;
}

.team-modal-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.team-modal-image:hover {
    transform: scale(1.05);
}

/* Specific positioning for Ognjen's modal image */
.team-modal-image[data-team-member="ognjen"] {
    object-position: center 20% !important;
}

/* Specific positioning for Emina's modal image */
.team-modal-image[data-team-member="emina"] {
    object-position: 95% top !important;
}

.team-modal-title-container {
    flex: 1;
    position: relative;
    z-index: 1;
}

.team-modal-title {
    margin: 0 0 5px 0;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.team-modal-position {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    opacity: 0.9;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.team-modal .btn-close {
    display: none;
}

.team-modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.team-modal-bio {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin: 0;
    text-align: left;
    font-weight: 300;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.team-modal-bio a {
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

.team-modal-footer {
    background: #f8f9fa;
    border: none;
    padding: 20px 30px;
    gap: 15px;
}

.team-modal-footer .btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.team-modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

.team-modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.team-modal-footer .btn-primary {
    background: linear-gradient(135deg, #2db094 0%, #37c8a9 100%);
    border: none;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.team-modal-footer .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #37c8a9 0%, #2db094 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.team-modal-footer .btn-primary:hover::before {
    left: 0;
}

.team-modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 176, 148, 0.3);
}

.team-modal-footer .btn-primary i {
    transition: transform 0.3s ease;
}

.team-modal-footer .btn-primary:hover i {
    transform: translateX(3px);
}

/* Animation for modal entrance */
@keyframes teamModalSlideIn {
    0% {
        transform: translateY(-100px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.team-modal.show .team-modal-dialog {
    animation: teamModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Backdrop animation */
.team-modal-backdrop {
    transition: opacity 0.3s ease;
}

.team-modal-backdrop.show {
    opacity: 0.6;
}

/* Custom scrollbar for modal body */
.team-modal-body::-webkit-scrollbar {
    width: 6px;
}

.team-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.team-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2db094, #37c8a9);
    border-radius: 10px;
}

.team-modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #259d7f, #2fb396);
}

/* Fix for smaller laptops (13-15 inch) - ensure footer is always clickable */
@media (min-width: 769px) and (max-width: 1440px) {
    .team-modal-body {
        max-height: 45vh !important;
    }

    .team-modal-footer {
        position: relative;
        z-index: 1000;
        pointer-events: auto !important;
        background: #f8f9fa !important;
    }

    .team-modal-footer .btn {
        pointer-events: auto !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-modal-dialog {
        margin: 10px;
    }

    .team-modal-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .team-modal-image {
        width: 85px;
        height: 85px;
    }

    .team-modal-title {
        font-size: 1.3rem;
    }

    .team-modal-position {
        font-size: 0.85rem;
    }

    .team-modal-body {
        padding: 20px;
    }

    .team-modal-bio {
        font-size: 14px;
        line-height: 1.6;
    }

    .team-modal-bio a {
        word-break: break-all !important;
        overflow-wrap: anywhere;
        line-height: 1.4;
    }

    .team-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }

    .team-modal-footer .btn {
        width: 100%;
    }
}