/* Staff Grid */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.staff-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.staff-card:hover {
    transform: translateY(-3px);
}

.staff-avatar {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.staff-avatar:hover,
.staff-avatar:focus-visible {
    transform: scale(1.05);
    outline: none;
}

.staff-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-blue);
}

.avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    border: 3px solid var(--primary-blue);
}

.staff-info {
    flex: 1;
}

.staff-info h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.staff-position {
    color: var(--primary-blue);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.staff-experience, .staff-age {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.staff-info p {
    color: var(--text-dark);
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Responsive Staff */
@media (max-width: 768px) {
    .staff-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .staff-avatar img,
    .avatar-placeholder {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .staff-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-card {
        padding: 1.5rem;
    }
}

/* ===== Модальное окно с увеличенным фото сотрудника ===== */
.staff-photo-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.staff-photo-modal.active {
    display: flex;
}

.staff-photo-modal-content {
    position: relative;
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    align-items: stretch;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.staff-photo-close {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}

.staff-photo-close:hover {
    background: white;
    color: var(--primary-blue);
}

.staff-photo-modal-image {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg, #f5f9fc);
    border-radius: 15px 0 0 15px;
    padding: 20px;
    min-height: 320px;
}

.staff-photo-modal-image img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
}

.staff-photo-modal-image .avatar-placeholder {
    width: 160px;
    height: 160px;
    font-size: 4rem;
    border-radius: 50%;
}

.staff-photo-modal-info {
    flex: 1;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.staff-photo-modal-info h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.staff-photo-modal-info .staff-position,
.staff-photo-modal-info .staff-experience,
.staff-photo-modal-info .staff-age {
    margin-bottom: 0.5rem;
}

.staff-photo-modal-info p {
    color: var(--text-dark);
    line-height: 1.6;
    margin-top: 0.75rem;
}

/* На мобильных — фото сверху, описание под ним */
@media (max-width: 768px) {
    .staff-photo-modal-content {
        flex-direction: column;
        max-height: 95vh;
    }

    .staff-photo-modal-image {
        border-radius: 15px 15px 0 0;
        flex: none;
        min-height: 220px;
        padding: 30px 20px 10px;
    }

    .staff-photo-modal-image img {
        max-height: 300px;
        width: auto;
        max-width: 100%;
    }

    .staff-photo-modal-info {
        padding: 20px 25px 30px;
        text-align: center;
        align-items: center;
    }
}